Upgrading Wordpress
Created this article to document the upgrading of Wordpress on my server.
Contents |
[edit] Backing up old files
Just incase, we should backup the whole Wordpress instance folder by doing something like the following:
cp -Rp html html.backup
[edit] Download latest version
Using wget we could download the latest version.
I tend to download to my ~/downloads.
cd ~/download wget http://wordpress.org/latest.tar.gz
Now, we un-tar it:
tar -xzf latest.tar.gz
There should be a directory called ~/downloads/wordpress. You could view the readme.html file for information on the downloaded version.
[edit] Modifying files
Now we could modify permissions and ownership to match our configuration. For example, I change group of all apache served files.
chgrp -R www wordpress
[edit] Upgrading instances
Finally, we upgrade the files on all our Wordpress installations. This is my example:
rsync -gorRv wordpress/./ /var/www/sites/iambelmin/html rsync -gorRv wordpress/./ /var/www/sites/bfworks/html
(We use the ./ in the origin because we need to set the base for the relative copying. See man rsync for more information)
Explanation of the options:
- -g - Preserve the group attribute of files.
- -o - Preserve the ownership of files.
- -r - Copy files recursively.
- -R - Copy files relatively.
- -v - Tell us what's going on.
[edit] Double checking
Double check files like:
- Site's icon (favicon.ico)
- Custom content (in wp-content like themes and uploads)
- Apache config file (.htaccess, .htaccess, etc)
- Other non-Wordpress files you are hosting
Also, visit the administration section (usually http://sitename/wp-admin) and the actual blog site.

