Upgrading a WordPress Blog
Upgrading a WordPress blog can be a daunting task. I assume you have
a copy of your WordPress blog on your local computer.
- Get the
latest version of WordPress. It will be in zip format which
means the zip file needs to be expanded. I always name my
downloads wp-2.5.zip or whatever version I am downloading.
- Back up WordPress (WP) code on your local drive. I create
a separate folder called blogname-version (e.g. webdev-2.5.1)
and copy the ENTIRE blog to it. This will include the .htaccess
file, any custom images or custom modifications to WP you have
- Back up the WordPress database. I use a
backup plug-in that emails me (or writes to the local drive)
the MySQL database backup or check out
backing up your WordPress database.
- Put the blog in maintenance mode using a
maintenance mode plug-in. Any visitor is shown a maintenance
screen while you are upgrading.
- Deactivate all plug-ins except the maintenance one.
- Do NOT delete these files and folders
- wp-config.php file
- wp-content folder
- wp-../images folder
- wp-includes/languages/ folder–if you are using a language
file, do not delete this folder
- .htaccess file–if you have added custom rules to your
.htaccess, do not delete it
- Custom Content and/or Plugins–if you have any ../images
or other custom content or Plugins inside the wp-content
folder, do NOT delete them. This would also include any
custom ../images folder in your root directory.
- Don’t delete favicon.ico or robots.txt if they exist.
- Delete the following files and folders on the server
- wp-* (except for those above), readme.html, wp.php,
xmlrpc.php, and license.txt; files; Typically files in your
root or WordPress folder. Again, don’t delete the wp-config.php
- wp-admin folder
- wp-includes folder. If using a language file don’t delete
the wp-includes/languages/ folder
- wp-content/cache folder; You only see this folder if
you are upgrading FROM WordPress 2.0.
- wp-content/plugins/widgets folder; You only see this
folder if you previously installed the Sidebar Widgets plugin.
The Sidebar Widgets code conflicts with the built-in widget
- Delete all wp files on local side
- Copy the new WordPress source code to your local wp
- Make sure wp-config.php is filled out correctly. Compare
to new wp-config-sample.php for any new or renamed fields.
- Upload all wp files to your blog site. I use Filezilla ftp
program because I have found it to be reliable, fast...and
free. One advantage to using Expression Web to upload is
there will be no conflicts.
- Run mydomain.com/wp-admin/upgrade.php to upgrade the database.
If you cannot get out of maintenance mode, delete the maintenance
mode plug-in on the server.
- Check the blog. It should work since it has no plug-ins
activated; i.e. it is the WP upgrade
- Deactivate the maintenance mode plug-in. If you deleted
it previously, upload it again.
- Reactivate plug-ins that require no modifications to the
theme. (if a major upgrade, do it one at a time) and make sure
they still work.
- Make modifications to the theme (i.e. PHP files), one at
a time, for each plug-in that requires it.
- Click on Settings > Permalinks and click on Save Changes
(even though you did not make any changes).
- Create a test blog and apply the upgrade to it before your real
- For major upgrades you may want to wait until the first update
(i.e. 2.5 -> 2.5.1) because there is generally several critical
- I always keep the last WP source code in case the one I download
doesn't work right.
- If the upgrade is a fix (like 2.5 -> 2.5.1) I make a diff between
the versions (using WinMerge). Then I overwrite the 2.5 version
with the diff file for each of my blogs.