Here is the simple script I use to upgrade all the WordPress sites I run on a single server in one fell swoop. Each site is a Subversion checkout of the WordPress trunk so getting the latest changes and merging them with my version is a simple command, however remembering to do each site was a pain. It also helped me figure out exactly how many WordPress installation I’m responsible for upgrading. (Twenty-seven.) Just fill out the array with the site roots of each install (use locate wp-login.php
to find them) and run the script on the command like php upgrade-sites.php
. I also like to put the time
command in front to see how long things take.
That is usable if you’ve got shell acess, not everyone does π Plus how does the upgrading process works if some of my files (not in the theme folder) are altered (for example some admin files because to add rel=”external” or added snippet to show my smilies when I post a new msg), does the old file gets overwritten or? Just curious. I use Araxis Merge to compare my installation folder to newly downloaded nightly, pretty easy to use π
It merges them, unless there’s been another change to that line it just works out the differences. However I strongly recommend never touching core files, you should be able to do everything through plugins. This aimed at more advanced users who are somewhat shell savvy.
I got shell access at some servers (running some eggdrops and psybncs) but just not for my personal site :/ Hmmm… Prolly should set up mandrake in vmware and give svn a try just because of the curiosity”.
Sounds like a good idea. I think I might do somwething like this too …. but I only have to manage 2 blogs. π I’ll probably update from a tag, so that I know what I’m getting.
Any reason why a tag hasn’t been created for 1.5.1.1 yet?
I use svk to manage my WordPress changes. Yes, I touch core files but I know what I’m doing. If it breaks, I’ll keep the pieces π
svk makes it quite to easy to manage your own local branch of a Subversion project.
I’d been avoiding moving my site to an svn build for a while now simply cause it’s a little intimidating. After taking the last 40 minutes to do it, I had good reason.
Turns out you have to uninstall (eg, delete) wordpress and all it’s associated files, etc before you can run the command to get your blog on SVN. Very scary process – taking down your site. However, once you’ve backed up!! the command is pretty easy and straight forward:
svn checkout http://svn.automattic.com/wordpress/trunk ./
Then, as in the php file,
svn up
gets you up-to-date. Scary the first time around, but worth it for future upgrade ease (and downgrade if you want!)Can’t wait until I figure out how to run “svn blahblah” commands. I’ve never done anything involving shell access before in my life.
My problem with running SVN from the command line is that I have no clue how to tell SVN not to update any files under wp-content. In other words, I don’t want any of the default themes, in particular, because t hen they show in the theme switcher I might have installed on some blogs… So I always do an SVN update to a folder on my Desktop and upload all files except wp-content/* manually… It’s a pain in the ass.
God bless you, Matt. I’m gonna have to send you some CD in appreciation.
Is that first echo supposed to be an
exec
? Or perhaps backticks instead of double quotes?Yes that was supposed to be an exec. Thanks!
Its painful to admit (on account of the simplicity of it) but thats a great post. Will make life easier
Okay, if I have a working wordpress install, and a brand new subversion install, has anyone written a short howto on getting the process started? Do I simply issue the svn /path/to/wordpress file:///blahblah -m “initial”; rm -rf /path/to/wordpress; svn co blah/trunk ?? And then what do I do with upgrades? Unpack update; check it in to svn, and then check it out on top of my site?
So basically drop rewrite the appropriate files on each blog, lets say all 27, then run the upgrade script from shell 1x (as long as all 27 paths point to upgrade.php)?
Sounds easy, and I like it.
Does anyone have an idiot proof(ish) walkthrough for this SVN upgrade malarky? Its means nothing to me, but Id like to do this easy upgrading thing if I can.
While im here, how about a little “Upgrade” button in the WP admin, Matt?
ahh, I got svn listing with svnx and subversion
http://www.macupdate.com/search.php?keywords=svn&os=macosx
now what? how do I update my server?
nevermind, Im pursuing this elsewhere. Apologies for the spam-a-like practices.