Upgrading wordpress

So last week i upgraded wordpress. I had a number of sites running 2.6 and the new 2.7 has been out for a while. So it was time for me to start doing this.

So what do you do when upgrading.

Backup

Well the first obvious thing is to make a backup. One of the sites is on our own servers and that’s not a problem. System backed up every night. Database backed up at the same time. For the other site that we are running for an organisation its not on our own servers so there is a bit more work.

First you have to back up the site itself. I prefer to use FileZilla – the ftp client and download all the files to a local directory on my hard drive. You can use any other ftp program or what suits you environment.

Next is to make sure you have a god backup of the database. There are plugins for doing this in wordpress, but if the things go totally down the drain i prefer to have a real database dump outside that. The hosting company supplies a special version of phpmyadmin. So just login there and do a dump and store that also locally and you should be ok.

Starting the upgrade

Now its time to start the upgrade. First of all you don’t want all customer coming in and see strange things when upgrading. There is a god plugin for this and its called Maintenance mode. This gives a small page instead if the normal site when its activated. Admins can still access the site but normal users only se the “Sorry we are down for maintanence” page. So I always start the upgrade with turning this plugin on.

Disabling all other plugins

To make sure that plugins don’t screw up the upgrade, the manual for upgrading wordpress recommends that you disable all the plugins. This is probably a wise thing to do, but I have made mistakes and done the upgrade without it, and it worked also. But to be god – disable all the plugins.

Except the Maintenance Mode plugin as you want that one active during the upgrade.

Upload the new wordpress files.

With wordpress 2.7 you can do upgrades to the base code from within the system (tools->upgrade) but before that you have to make it manually. So I downloaded the zip-file from wordpress, unpacked it to my local hard drive.

In the manual they say that you should clean out a number of directories. The reason for this is to make sure that you overwrite all the files in there and i am more OK with making sure I do that then to delete files. So I just upload it all.

Then start up the site again. Go to http://your.site/wp-admin/ and the system will tell you if you need to upgrade the database or not. In not – fine – just go on. If it need to – just let it – remember you have backups – right?

Enabling all the plugins

So the upgrade when ok. Its now time to enable the plugins again. Do this one by one and test that each work before you start to enable a new one. Just to mke shure you find any problems one by one.

Setting permissions

Now you have it up and going again. The first thing that happened to me was that it found out that there are new and upgraded plugins. So I went in there and now the system wont upgrade them automatcally. You can only donwload and install them manually. So onto the normal site for all knowledge – googeling for this gave me some ideas and I did found out that the owners where wrong on the files. So a quick find did help it all:

And now its all ok. Upgradng the plugins that is new and fixing some small things and I am up and running wordpress 2.7

Disabling the Maintanence mode

Now its time to let users in again I think. Perhapes doing some small fixes but if you happey with the site its only to disable the Maintanence mode in the Maintanence Mode plugin and the users should be able to see the site again as normal.

Small fixes

There is one small bug and that is that the css files that NextGen Gallery plugin is using has the clear:both; flags and that will make the pages look very strange when you have a menu to the right (or left).

I have to do this veery time I upgrade NextGen Gallery plugin. Go in and edit the wp-content/plugins/nextgen-gallery/css/nggallery.css and comment out all the places where its used. Then its ok.

One thought on “Upgrading wordpress

  1. There’s obviously a great deal to know about this. I believe you made some beneficial points in Features also.
    Keep operating , terrific task!

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.