How to add to git the wordpress installation

April 28, 2016 1.9k views
WordPress Git

I used wordpress in my app and installed it in ubuntu. We will be working in a team - I wonder if we can put do version control with wordpress app?

1 Answer

If you mean you want to make it so your WordPress site is on GitHub/GitLab/etc. it's fairly simple:

  • Make sure you have SSH keys configured on your server.
  • Copy your public SSH key on the server
  • On the Git service you've decided to go with, add the public key. I'm going to assume GitHub going forward
  • for github, you'd go here:
  • Create the repository on the git service of your choice (I use GitHub -- you pay $7.00USD a month, and you get 5 private repositories)
  • Once you create the repo, go to the repo. It will have the commands you need to run to set up your existing code as a repository.
  • You'll want to back up your database and upload it as well, so follow this guide to use mysqldump
Have another answer? Share your knowledge.