WordPress 1.2.2

By | January 2, 2005

WordPress 1.2.2 was released in mid-December and includes a couple of important PHP-related security fixes, so everyone should upgrade, especially with the santy worm going around.

I upgraded tonight, and it was a pretty easy process:

Download and Prep New Version

  1. While connected to the root dir of the website via ssh, download the newest version $ wget http://wordpress.org/latest.tar.gz
  2. Make a temp dir in the wombatnation.com directory $ mkdir t
  3. Move tarball there $ mv latest.tar.gz t
  4. Unzip it $ tar xzf t/latest.tar.gz
  5. Move it back to root dir with different name than original install $ mv t/wordpress wpnew

Now, I have a pristine version of WordPress 1.2.2 in the wpnew directory.

Backups

  1. Use standard instructions to backup database
  2. Backup files. In root directory of website $ tar czf wordpress_backup_20050101.tgz wordpress
  3. FTP the backup file to an off-site location
  4. Make a copy of the wordpress directory, preserving file attributes $ cp -Rp wordpress wp2

Now, I have an exact copy of my current install. While I could always restore it from the backup file, diskspace is cheap and I like to have an easy-to-access copy while doing upgrades and migrations. Once the new version seems to be up and running, it’s easy enough to remove this directory.

Copy Customized Files

  1. Copy .htaccess, wp-config.php, wp-layout.css from wordpress dir to wpnew
  2. Copy comments related files $ cp wordpress/wp-comment* wpnew
  3. The file wp-comments-post.php was changed for the WP 1.2.2 release. Since I had previously renamed this file in order to ward off spam comments, I had to redo that again. I’ve posted the details elsewhere.

I verified that the admin interface worked via accessing the files in the wpnew directory, and then switched in the new directory for the old one. This approach allowed me to keep my blog available for virtually the entire switchover.

  1. $ mv wordpress wpold
  2. $ mv wpnew wordpress

Obviously, the wpold and wp2 directories can now be deleted.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.