Posted by Chris M. on 25 January 2012 12:12 AM

Upgrading WordPress

Beginning with WordPress 2.7, a built-in upgrade function makes it easier than ever to upgrade your WordPress installation. Simply go to Tools > Upgrade in the main menu. You’ll be given the option to perform a one-click upgrade or download the files. If you choose to perform the one-click upgrade, you will be upgraded in mere moments. Some hosting setups do not support this function, so if you receive an error rather than a notice that the upgrade is complete, check to see if your host is compatible with the one-click upgrade. A list of host compatibility has begun to be compiled in the Codex.If your host is not compatible with the automatic upgrade, you can still upgrade the old way.

For these instructions, it is assumed that your blog’s URL is Note that during the upgrade process access to your blog may not work for your visitors.

Step 1: Prepare

  • Just in case something goes wrong, make sure you have a backup.

  • Make sure the database user name registered to WordPress has permission to create, modify, and delete database tables. If you installed WordPress in the standard way, and nothing has changed since then, you are fine.

  • Deactivate your plugins. A plugin might not be compatible with the new version, so it’s nice to check for new versions of them and deactivate any that may cause problems. You can reactivate plugins one-by-one after the upgrade.

Step 2: Replace WordPress files

  1. Get the latest WordPress. Either download and extract it to your computer or download it directly to the server.


    • As a reminder, to extract a tar.gz to a folder use this command, replacing (folder name) with the name of your folder: tar -xvzf latest.tar.gz -C ./(foldername)


  3. Delete your old wp-includes and wp-admin directories.

  4. Copy the new WordPress files to your server, overwriting old files in the root, except perhaps the wp-content folder (see "NOTE" below). You may use FTP or shell commands to do so. Note that this means all the files, including all the files in the root directory as well. If you use the default or classic theme and have customized it, then you can skip that theme.


The wp-content folder requires special handling, as do the plugins and themes folders. You should copy over the contents of these folders, not the entire folder. In some cases, copying the entire folder may overwrite all your customizations and added content.

Also take care to preserve the content of the wp-config.php file in the root directory. This file contains current settings for your existing installation, e.g. database sign-in information. Occasionally new versions of WordPress adds statements to this file. (E.g. in version 2.5 the SECRET_KEY variable was added, see Extended upgrade instructions). Compare your existing file with the new installation file which is named wp-config-sample.php . Either transfer your settings to the sample-file and rename it to wp-config.php or copy the new statements from the sample file into your current file.

Step 3: Upgrade your installation

Visit your main WordPress admin page at /wp-admin . You may be asked to login again. If a database upgrade is necessary at this point, WordPress will detect it and give you a link to a URL like Follow that link and follow the instructions. This will update your database to be compatible with the latest code. If you fail to do this step, your blog might look funny. If you have caching enabled, your changes will appear to users more immediately if you clear the cache at this point (and if you don’t, you may get confused when you see the old version number in page footers when you check to see if the upgrade worked). Your WordPress installation is successfully upgraded.

(2 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
Full Name:
Help Desk Software by Kayako