Jeffro raised a point of reformating your blog for WordPress 2.7. I’ve been blogging with WordPress since late 2003 and have been the blog software go through tonnes of upgrades. Over time, the use of tonnes of plugins and themes has caused my database to get extremely cluttered, so I decided to start afresh with WordPress 2.7, which was released today.
Note: Most users will not need to follow these steps. These are meant for advanced users. Normal users should follow the Upgrading WordPress instructions in the Codex. Proceed with extreme caution. You will not receive any support if you choose to follow the tutorial below. Remember to backup before upgrading.
Here are the steps I took in this process:
Step 1: Delete unnecessary junk before backing up
This is an optional but recommended step.
If you’re using Akismet, you should first delete all the spam comments to ensure that your exported file is not cluttered with junk.
Users of WP Super Cache would want to delete the cache as well before proceeding to the next step.
You could also clear out some useless tags and categories which you may not be using.
Step 2: Backup!
I also suggest downloading a copy of wp-config.php. We will use this to copy-paste the database settings.
If you are using cPanel, I suggest performing a Home Directory backup and a mySQL Database Backup. You can access the same under Backup after logging into your cPanel.
Step 3: Exporting WordPress
WordPress allows you to export all your WordPress content as a WXR file. WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.
To export this file navigate to Manage > Export and hit Download Export File. Save this file. We’ll be using this to import your posts after the upgrade.
If this file is greater than 8MB, then stop and read this. WordPress has a problem with WXR files greater than 8MB. You will need to split the file into multiple files in case you run into problems during the import process.
Step 4: Creating a Maintenance File
Create a simple html file that will be used to indicate that your blog is currently undergoing maintenance. This file will need to be called index.html so that your server will display this directly. Download a sample file.
Step 5: Deleting your WordPress installation
We will now delete our WordPress installation. This is of two stages. Deleting the database and deleting the files. You have two options w.r.t. deleting the database.
- Delete the database in cPanel / Plesk or your webhosting control panel and then create a database with the same name and link it again to the same user.
- Open phpMyAdmin and drop all the tables.
I chose to go with option 1.
For deleting the files, you will need to knock off the following files / directories. Either FTP into your installation and delete the following folders or delete the same using ssh.
- All php files in the root directory
Do not delete the whole of the wp-content or the themes folders, just the classic and default subdirectories.
If you have a reseller account, a VPS or your own server, then you can even choose to delete the entire cPanel account and create a new one afresh. However, for the purpose of the tutorial we will stick to only deleting the database and files.
Step 6: Installing WordPress 2.7
Follow the Installing WordPress instructions for this. If you kept the database name and user same in step 5, then you can copy the database settings from the wp-config.php file we backed up in step 2.
Step 7: Importing WordPress
We will now import the WXR file we created in step 3.
Navigate to Tools > Import and select WordPress. Select the WXR file that you downloaded and hit Upload File and Import.
You’re WXR file needs to be 8MB or below. Some hosting installations restrict the upload to only 2MB. In this situation you may need to create a .htaccess or php.ini file in your root directory to take care of
You may need to split your WXR file into multiple files if its size is greater than 8MB and repeat this step till all the posts are imported.
Step 8: Installing Plugins and Themes
You now have a fresh installation of WordPress. Now, all you need to do is activate plugins that you want as well as the theme you wish to use. All settings will need to be reconfigured, but it’s worth the while!
Have you any tips regarding upgrading WordPress? Do comment below.