Question: Is the built-in WordPress automatic install / upgrade process compatible with a SVN deployment of WordPress?
Short answer: Yes.
Ever since WordPress came out with the automatic upgrade functionality in 2.7 I’ve hesitated to use it since the majority of our client installs are deployed using Subversion (svn) and I wasn’t sure how it would react with the .svn directories.
Today I finally decided to figure it out, and found that the WordPress team coded their upgrading functions exactly correctly (as far as not overwriting or deleting .svn directories goes). In addition, their script correctly removes old and unneeded files that might be present.
First, check to make sure that our svn checkout is clean:
$ svn st
Next, we begin the automatic upgrade process.
Step 1: Click the WordPress 2.8.5 “Please update now.” link:
Step 2: Backup your files as suggested – http://codex.wordpress.org/WordPress_Backups
Step 3: Enter your FTP connection details and click the Proceed button
Step 4: Wait while the files are downloaded and unzipped. This can take a minute or two, so be patient.
Now we can check to see what files were changed:
$ svn st
Notice that some old files have been removed and others have been modified. (See http://codex.wordpress.org/Files_Automatically_Replaced_by_Core_Upgrade for details on all the old files that the automatic upgrader removes).
Next we schedule old files to be removed from svn:
$ svn st | grep ! | sed 's/! *//' | xargs svn rm;
Next we commit the modified files and the removed files:
$ svn ci -m "Upgrading to the latest version of WordPress 2.8.5"
That’s it. The WordPress automatic upgrade process does not interfere with .svn directories, and is therefore compatible with maintaining a deploy from Subversion workflow.