WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

How To: Easily Deploy a WordPress Theme from Github to Microsoft Azure

Last Updated on December 12th, 2018

Published on April 8th, 2015


Share This Article

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.


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.


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


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

Article Continues Below


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.


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.


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.


Azure will now deploy your WordPress theme from Github:

Article Continues Below


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


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;


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


Signup for Azure »

Oliver Dale is the founder of Kooc Media, An Internet Company based in Manchester, UK. I founded WPLift in 2010.