How to Deploy WordPress Website Directly Through GitHub?

Some WordPress hosts let you connect your WordPress folder to a git repository in different ways.

  • One popular option is setting up a plain git repository within your project folder. It won’t be connected to any hosted version control system – but it is still a git that you can update in the same manner.
  • Others let you connect a GitHub repository right away.
  • If you have ssh access, you can also clone the GitHub repository straight to your folder and pull the changes there.

Automated deployment is also possible and usually requires ssh. Capistrano is a good option that would also help to sync your databases, handling backups, and rolling back to a previous version in case of a problem. The same process is doable with chef or Ansible. This could be combined with a CI server that handles the heavy lifting.

GitHub offers webhooks which can be connected to your VPS as well. You can listen for certain events and update your install accordingly.

Beanstalk is a version-controlled hosting platform that lets you commit code, review, and push to production with a simple button.

DeployBot is another proxy service that comes handy whenever you don’t have ssh access. You can connect the bot to a GitHub repository and set your SFTP credentials in order to automatically pass git commits through an FTP stream uploading the files to production on your behalf.


Part of:

Mario Peshev is a 5x CEO and operator, founder of DevriX and Growth Shuttle, global value creation advisor, angel investor, and author of “MBA Disrupted.”

His original background in engineering rode the wave of IT entrepreneurship in the last 25 years, from product and service entrepreneurship through acquiring and selling businesses, to investing in global startups like beehiiv, doola, the Stacked Marketer, Alcatraz, SeedBlink.

Peshev spent over 10,000 hours in consulting and training contracts for mid-market and enterprise organizations like VMware, SAP, Software AG, CERN, Saudi Aramco since 2006. His books and guides are referenced in over 50 universities in North America, Europe, and Asia.


Follow Mario on social:

Latest Editions:

Latest Answers: