Upgrading WordPress with rsync
WordPress upgrades are a pain in the neck. You're meant to unpack. copy, delete some files, add some files, stir.
Step 1: back up everything.
If you know rsync, and you've checked the upgrade instructions for what files you should preserve (usually it's the wp-content dir, wp-config.php and .htaccess but no guarentees), and you've unpacked the new WordPress source to WORDPRESSLOC, change to the directory where your WordPress directory:
Note that this does delete files that aren't in the --exclude settings and that aren't found in WORDPRESSLOC, which should mean out-of-date PHP files but which might also mean custom files you put in there. Triple check the directory contents and the --exclude settings.
Sometimes the wp-content directory has updated files, but you don't want to overwrite your own themes and plugins. You can upgrade it like this:
rsync -av WORDPRESSLOC/wp-content/ .
After all this, you still need to visit http://YOURWORDPRESSSITE/wp-admin/upgrade.php to upgrade the database values.
To the extent possible under law, Mary Gardiner has waived all copyright and related or neighboring rights to Wordpress. This work is published from Australia.
Last modified: 15 April 2009