This question already has an answer here:

I am a Wordpress developer and currently I don't use version control but do keep regular backups before and after altering files of both the database and file system.

I am seriously considering incorporating git into my workflow, not only to try and streamline how I do things but to do things the 'proper' way.

I have been doing a hell of a lot of reading about this and trying to get my head around a complete change in my workflow.

Here is my current configuration: develop site locally using MAMP Pro and manually dump database, upload to VPS using PHPmyadmin and edit the sites urls using queries and then FTP the wp-content folder to my dev. 'staging' sub domain and when everything is approve then repeat the process to the live domain.

I've never had problems with having no backups due to the amount of backups I have but I like to keep up to date although I'm quite far behind in the times now.

The way I've currently planned on doing things now from what I've read is to develop locally, push wp-content to git when finished for the day and pull when going to start working again.

Once I've finished working locally I'll pull the pushed git from my repository which I plan on hosting on my synology nas to my dev. sub domain and then when that's approved do the same to the live domain.

I think that seems correct but please advise if someone can suggest a better way!!

My main queries are, how do I keep the databases up to date? Do I manually dump and import databases and edit the urls using queries or can I streamline this too? I've seen plugins like revisr but haven't seen a great deal on the web about this so just after advise.

I ssh in to my VPS from time to time and have various raspberry pis doing different things so fairly confident with the command line but the whole git thing is a bit daunting.

Any advise will be GREATLY appreciated. I've tried to make everything clear but obviously if anything above doesn't make sense (hopefully it does) then I'll try explain clearer.

marked as duplicate by Dave Romsey, fuxia May 16 '17 at 12:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can someone please let me know whether I have posted this in the correct place? Maybe in the Programmers part of Stack Exchange instead of Wordpress? – WPDEVE Jun 25 '15 at 13:25
  • 1
    I think you'll find some answers at: WordPress and Git Workflow – Simon East May 12 '17 at 3:13

Browse other questions tagged or ask your own question.