WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Updating WordPress"

m (Reverted edits by Richee (Talk); changed back to last version by Filosofo)
(Three Step Upgrade: delete ref to maint mode plugin as all plugins are to be deactivated)
Line 5: Line 5:
 
These are the short instructions, if you want more check out the [[Upgrading_WordPress_Extended|extended upgrade instructions]]. If you experience problems with the Three Step Upgrade, you may want to review the [[Upgrading_WordPress_Extended|more detailed upgrade instructions]].
 
These are the short instructions, if you want more check out the [[Upgrading_WordPress_Extended|extended upgrade instructions]]. If you experience problems with the Three Step Upgrade, you may want to review the [[Upgrading_WordPress_Extended|more detailed upgrade instructions]].
   
For these instructions, it is assumed that your blog's URL is <code><nowiki>http://example.com/wordpress/</nowiki></code>. Note that during the upgrade process access to your blog may not work for your visitors. You may consider a plugin like [http://wordpress.org/extend/plugins/maintenance-mode/ Maintenance Mode].
+
For these instructions, it is assumed that your blog's URL is <code><nowiki>http://example.com/wordpress/</nowiki></code>. Note that during the upgrade process access to your blog may not work for your visitors.
   
 
=== A Warning before you start ===
 
=== A Warning before you start ===

Revision as of 00:57, 26 November 2008

Before you get started, make sure you meet the minimum requirements.

Three Step Upgrade

These are the short instructions, if you want more check out the extended upgrade instructions. If you experience problems with the Three Step Upgrade, you may want to review the more detailed upgrade instructions.

For these instructions, it is assumed that your blog's URL is http://example.com/wordpress/. Note that during the upgrade process access to your blog may not work for your visitors.

A Warning before you start

If you run into problems Upgrading WordPress with the three Steps described here, you need to revert to your old version first before using the more detailed upgrade instructions (ie. restore the backup made in step 0). Even though you might not run into any errors with this process right away, you might run into problems later down the line. Then it may not be possible to revert far enough back to fix the problem without losing any recent changes.

So If you use Plugins and Themes other than the ones that come with the default WordPress installation, it is advisable to start over with the more detailed upgrade instructions.

Step 0: Before You Get Started

  • Just in case something goes wrong, make sure you have a backup. WordPress Backups is a comprehensive guide.
  • 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 1: Replace WordPress files

  1. Get the latest WordPress. Either download and extract it to your computer or download it directly to the server.
    1. 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 ./(folder name)
  2. Delete your old wp-includes and wp-admin directories.
  3. 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.

NOTE   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 2: 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 http://example.com/wordpress/wp-admin/upgrade.php. 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.

Step 3: Do something nice for yourself

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. That's as simple as we can make it without Updating WordPress Using Subversion.

Consider rewarding yourself with a blog post about the upgrade, reading that book or article you've been putting off, or simply sitting back for a few moments and let the world pass you by.

Troubleshooting

If anything has gone wrong the first thing to do is go through all the steps in our extended upgrade instructions. That page also has information about some of the most common problems we see.