Git and WordPress workflow for Local Development to Staging Webserver
read more
Categories

Git and WordPress workflow for Local Development to Staging Webserver


This guide shows a Git and WordPress workflow and demonstrates version control using Git from a local development environment on OSX to a staging site webserver.

For the Database control we will use WP Migrate Pro.

A second remote repo for a production server would also need to be added in a real world scenario.

This guide uses CentOS as the staging server which comes with Git and you can install Git for OSX, an easy install method here.

The benefits of a Git workflow are numerous, including the ability to work local and sync your files in seconds to a remote repo.

Set up SSH (no passwords)

A key requisite for this is that you have SSH access to your website which in some shared hosting instances can be limited.

The biggest initial hurdle in getting the workflow going is to have passwordless SSH connection by transferring your locally generated public key into the authorised file of the remote server, once this is done and the connection works without passwords, you are good to go.