This question already has an answer here:
- WordPress and Git Workflow 6 answers
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.