4 ms·
Nice tut on git. Although not very real-world practical in case of Wordpress. First - wordpress core does version control itself and offers one-click update fo
by gesman 14y ago
Nice tut on git. Although not very real-world practical in case of Wordpress.
First - wordpress core does version control itself and offers one-click update for core files that are updated frequently.
Second - wordpress website consists of ever updating database (that is hard to version control) + set of custom files (like custom plugins, themes, uploads, images, media, etc...).
It does not really make sense to version control wordpress-based website although it makes perfect sense to take care of backups, especially comprehensive off-site backups in case of hack-attack or crash.
For that I use backupbuddy plugin (not affiliated, just grateful customer).
It allows you to automatically create unattended, complete, compressed backups for your whole website: core files + your files + database. All in one piece - without you lifting a finger.
Plus it auto-uploads your regular backups to chozen destination like amazon S3 or another FTP server and allows you to keep, say, last 10 backups.
This allows you to accomplish two very important things (that git does not do):
1. You may restore complete website from scratch in minutes - including full database structures.
2. You may copy your website to different domain and it will automatically update all URL's from old to new URL - again - in minutes.
That's a perfect tool for the job.
Thanks for putting tutorial though - I love git and use it often for separate projects.
- roybarberuk 14y agoThanks for the feedback, I too used to use backup buddy, but found this way the quickest for deploying different branches to different sit-ups, an example would be dev/staging/live. I agree it could be overkill to version control the full Wordpress install, but I prefer to have instant roll back if a update goes wrong. Can backup buddy now deploy a backup via ssh? For locked down servers
- scarecrowbob 14y agoI use a method very similar to the one in the tutorial to manage development on a site that I've been developing features on for the last six months. Basically the site is the MVP for a proudct that is being redeveloped in another system, but for the time being, they just want to push out features to see how well they work, and so... WordPress. So I am sending out revisions to custom plugins and the theme daily, and for me there is a great advantage in that I can just push to my production environment and not have to do all the annoying things that I used to do as far as uploading files via FTP. Generally, I have the uploads directory outside of the repo, and so if I need to sync up my local version to the site I will pull the uploads directory down and create another version of the database, and then update my local config file. This is a very different use case than backing up the site (but obviously that needs to be possible as well). But git is very helpful in my case as well.
- scarecrowbob 14y agoAs a note, wordpress core is also not part of my repo.