Get fresh WordPress Content delivered in your inbox with warpspeed!

learn wordpress wplift wordpress rocket

If you create your own WordPress themes then using some sort of version control is essential, there are a few options such as SVN and Git for hosting your repositories. Github is where you can store your repositories and its free to use for public ones, you can pay to upgrade if you wish to use it for private repositories.

11

If you wish to use Github for hosting your themes, in this tutorial we are going to walk you through how to automatically deploy from Github to a live WordPress site hosted on Microsoft Azure - this means, that you can create changes to your theme and when you commit them, they will automatically be added to your site. You also have the option from within Microsoft Azure to roll back to any previous versions of your theme should you need to - it's a neat way to keep your site up to date with the latest version of your theme hosted on Github.

In partnership with Microsoft

Signup for Azure »

Create a WordPress Site in Azure

Once you are logged into Azure, visit the console and choose "New" > "Compute" > "Web App" > "From Gallery" which will load up the list of available apps that you can deploy automatically.

1

Scroll down and choose "WordPress" from the list of apps and click the arrow, bottom right.

2

Then enter a URL for the site, choose a new database and pick a region.

3

Once Azure has finished provisioning your new WordPress site, it will display the site URL which you can click on and finish off the WordPress setup.

4

Deploy Your Theme from Github

In your Azure dashboard, click your WordPress installation name and on the next page in the right hand menu click the "Set up deployment from source control" link.

5

All your repositories will be listed so you can choose which one to deploy, for this tutorial I forked the WordPress foundation theme to my account.

One thing to note at this point is you should setup your folder structure as follows : repository-wp-content-themes-themename.

That is so when the theme is deployed it goes to the correct folder on your WordPress installation.

6

Azure will now deploy your WordPress theme from Github:

7

You can now login to your WordPress site and visit "Appearance" > "Themes" and you will see the new theme listed.

8

Now you any changes you make to the theme and commit to Github will automatically be pushed to your website via Azure. You can view deployments in your Azure dashboard under the "Deployments" tab;

9

If you wish to roll back any changes, you can select a deployment from the history and click "Redeploy".

10

Signup for Azure »

Published:

Last updated on:

Oliver Dale is the founder of Kooc Media, An Internet Company based in Manchester, UK. I founded WPLift and ThemeFurnace, find out more on my Personal Blog. Thanks!

Join 40,000 WordPress Astronauts
AND GET OUR LATEST CONTENT IN YOUR INBOX WITH WARPSPEED

We will never spam you.
close-link
siteground coupon
Get 60% Off the No. 1 WordPress Hosting!