WordPress update on server(ssh)

Just thought i’d expand a little on the instructions provided on wordpress . This is by no means a cookbook but its what worked for me. I am not responsible for anybody screwing up their installation even if you follow the steps to the T.

This is just a slightly cleaned up version of the instructions i wrote
for a friend who wanted to do the upgrade too and later suggested that i
post them for others to use. For the record we are both on Linux servers
and have either root or user SSH access.

Anyway, here goes:

  • BACKUP YOUR WORDPRESS FOLDER AND DATABASE
  • Backup your wordpress folder and database
  • I assume you are ssh’ed in to server at this point, change directory to your root folder if you are not
    already there ('cd ~' or 'cd ~yourusername') or any folder where
    you want to put the new files that we will be copying into your
    current installation
  • Did you backup your database and wordpress folder, this might be a good time to do that.
  • get the current release of wordpress(2.5 at time of writing), ‘wget http://wordpress.org/latest.zip'
  • if your wordpress folder is named ‘wordpress’ and you downloaded the latest.zip file into the folder that contains your wordpress folder, you should create a temp folder and move the latest.zip file into it so that you don’t overwrite your current installation
  • unzip the latest release (‘unzip latest.zip‘)
  • Go into the wordpress admin and deactivate all your plugins(I only had one plugin activated and left it on during the upgrade and that did not cause any problems, but that’s just my specific case)
  • change directory to your wordpress folder(‘cd www/wordpress‘ if your web folder is ‘www’ and the wordpress folder is ‘wordpress’)
  • you can either delete or rename the admin and includes folders. I chose to rename first then delete afterwards('mv wp-includes wp-includes-old' and 'mv wp-admin wp-admin-old')
  • move the new admin and includes folders into place; assuming you are still in the live wordpress folder and the newly downloaded files are in your
    root/home folder ('mv ../../wordpress/wp-admin .' and 'mv ../../wordpress/wp-includes .')
  • copy the new contents folder over the current one: NOTE; i was not using neither the default nor the classic themes so if you are you are and have made changes to those themes, backup the themes folder inside the wp-content
    folder so you can put those themes back after the update if need be.
  • to copy the new contents folder, going by the same assumptions as in #11 above; ('/bin/cp -Rf ../../wordpress/wp-content .')
  • In case you don’t have ownership of the files(maybe you logged in as root), change the ownership of the files to your username. In the wordpress folder: ('chown yourusername. * -R')
  • Pull up the upgrade script: http://yourdomain.com/wordpressfolderifany/wp-admin/upgrade.php
  • Click continue or whatever the button on that page says.
  • Pull up your blog, cross your fingers and hope all is well. If not, you did make a backup right? You can restore those if you need the blog back online now.
  • Here are the official extended upgrade instructions: click
  • Re-activate your plugins and test them.
  • For help troubleshooting, feel free to contact me or better yet, visit the forums

Posted by scribbles on April 4th, 2008 | Filed in Web Stuff | Comments Off on WordPress update on server(ssh)

Comments are closed.