I have several installations of WordPress on a VPS. Instead of going into each installation and manually upgrading it I would like a way to upgrade each installation at the same time. After doing some research it looks like Git would be the best way to go about that but I am completely lost about how to do this.
I download SmartGit for OS X so I could try to visualize the process but I haven’t gotten anywhere. So far, it seems like I need to keep the updated version on WordPress on a local machine. When I am ready to update all of my installations on the VPS I just replace the VPS installations with the current version on my local machine, correct? My question is how do I do that? I would almost prefer using the command line but would sticking with SmartGit be better for an absolute beginner?
I don’t think that git is the best tool for this particular job. Git is ideal for managing versions of files; but that’s not what you want to be doing. You want to be replacing files on the WordPress installation with new files. While I’m sure you could bash this particular shaped peg with the git-shaped hammer, there’s probably a better solution.
The manual steps for a WordPress installation upgrade found here are pretty clear. You could do step 1 with a shell script, I would imagine – that wouldn’t be too difficult. You could automate the fetching of the newer version, unpacking it, deleting relevant folders on the WordPress installations you’re upgrading, and so on.
However, even for a manual upgrade, you still need to log into WordPress to do the database update. This means that, even with an automatic update process, you’re going to be doing more work, because you’ll have at minimum two steps: (1) update files, (2) log into WordPress and update database.
If you’re trying to avoid some of the ‘pre-update’ steps for an automatic install, you could certainly do that automatically, and you should be – you do have a script to record a snapshot of the database and WordPress installation and back it up every day, don’t you?