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 (Upgrade 2.0.2 to {{Template:CurrentVersion}}: Fix version number)
m
 
(262 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
The latest version, [http://wordpress.org/development/2006/03/security-202/ WordPress {{CurrentVersion}}], has been released to the public. If you just need to upgrade from WordPress 2.0.2 to 2.0.3, a special instruction section, [[#Upgrade_2.0.2_to_2.0.3|Upgrade 2.0.2 to 2.0.3]], is presented below. For other upgrade paths, such as '''1.5.2 to 2.0.3''' or '''2.0 or 2.0.1 to 2.0.3''', please see the [[#Detailed Instructions|Detailed Instructions]] or [[#How to Upgrade in Five Steps|How to Upgrade in Five Steps]].
+
{{Languages|
  +
{{en|Updating_WordPress}}
  +
{{es|Actualizar_WordPress}}
  +
{{fr|Mettre_a_Jour_WordPress}}
  +
{{fi|WordPressin päivittäminen}}
  +
{{he|שדרוג וורדפרס}}
  +
{{it|Aggiornare_WordPress}}
  +
{{ja|WordPress のアップグレード}}
  +
{{ka|ვორდპრესის განახლება}}
  +
{{nl|WordPress updaten}}
  +
{{pt-br|Atualizando o WordPress}}
  +
{{ru|Обновление WordPress}}
  +
{{sk|Aktualizácia WordPress}}
  +
{{zh-cn|升级 WordPress}}
  +
{{zh-tw|升級WordPress}}
  +
}}
   
__TOC__
+
{{Warning|The upgrade process will affect all files and folders included in the main WordPress installation. This includes all the core files used to run WordPress. If you have made any modifications to those files, your changes will be lost.}}
   
==How to Upgrade in Five Steps==
+
You should always update WordPress to the [http://wordpress.org/download/ latest version]. When a new version of WordPress is available you will receive an update message in your WordPress Admin Screens. To update WordPress, click the link in this message.
   
'''Read the [[#Detailed Instructions|Detailed Upgrade Instructions]] if you want more intricate instructions!!!'''
+
There are two methods for updating - the easiest is the one-click update, which will work for most people. If it doesn't work, or you just prefer to be more hands-on, you can follow the manual update process.
   
Upgrading WordPress can be a little tricky, but fear not, this guide will help make quick work of upgrading your jazzed-up WordPress! This process will provide pointers to protect you against disasters (which other software providers might call "user errors").
+
If you are updating across multiple versions, follow the procedure at [http://codex.wordpress.org/Upgrading_WordPress_Extended#Upgrading_Across_Multiple_Versions Upgrading WordPress - Extended Instructions]
   
Before starting, you need to understand WordPress itself is easy to upgrade. Preserving any customizations you might have made is what makes this a 5-step process instead of 3-step one. It would be nice to believe this is a 5-minute process, but the part about backing up your data and files might take a little more than 5 minutes if you are a prolific blogger.
+
= Back up WordPress =
  +
Before you get started, it's a good idea to back up your website. This means if there are any issues you can easily restore your website. Complete instructions to make a backup can be found in the [[WordPress Backups]] section of the Codex.
   
  +
= Automatic Background Updates =
   
Let us assume your blog has a URI like <nowiki>http://example.com/wordpress/</nowiki>.
+
For [[Version 3.7|WordPress 3.7]]+, you don’t have to lift a finger to apply minor and security updates. Most sites are now able to automatically apply these updates in the background. If your site is capable of one-click updates without entering FTP credentials, then your site should be able to update from 3.7 to 3.7.1, 3.7.2, etc. (You’ll still need to click “Update Now” for major feature releases.)
   
The steps to a healthy upgrade are as follows:
+
See Also: [[Configuring_Automatic_Background_Updates|Configuring Automatic Background Updates]]
   
===Step 1: Backup Database Tables and Files including .htaccess===
+
= One-click Update =
Here, the objective is to save the data, and your customizations
+
Current versions of WordPress (2.7+) feature one-click updates. You can launch the update by clicking the link in the new version banner (if it's there) or by going to the Dashboard > Updates screen. Once you are on the "Update WordPress" page, click the button "Update Now" to start the process off. You shouldn't need to do anything else and, once it's finished, you will be up-to-date.
====Step 1a: Save Data====
 
Use [[phpMyAdmin]] or other appropriate tools provided by your webhost, to [[Backing Up Your Database | backup the database]] used by WordPress.
 
   
====Step 1b: Save Customizations====
+
One-click updates work on most servers. Here's the technical criteria for what must be satisfied:
Basically, [[WordPress_Backups#Backing_Up_Your_WordPress_Site|backup the files]] that you have changed or added since you installed the standard WordPress.
 
Use an [[FTP_Clients | FTP tool]] to download a copy of all the files on the server, in the directory where you installed WordPress, including the .htaccess files if you have been playing with it. Backup at least the [[Glossary#.htaccess|.htaccess]] file, the files used by your current theme (which will be in the <tt>/wp-content/</tt> directory), the <tt>/wp-images/</tt> directory with your uploaded images and files, any WordPress core files that you modified to use some "hack" directory, and the <tt>wp-config.php</tt> file which contains your database username, password etc.
 
   
===Step 2: Deactivate Plugins===
+
(a) file ownership: all of your WordPress files must be owned by the user under which your web server executes. In other words, the owner of your WordPress files <strong>must match</strong> the user under which your web server executes. The web server user (named "apache", "web", "www", "nobody", or some such) is not necessarily the owner of your WordPress files. Typically, WordPress files are owned by the ftp user which uploaded the original files. If there is no match between the owner of your WordPress files and the user under which your web server executes, you will receive a dialog box asking for "connection information", and you will find that no matter what you enter in that dialog box, you won't be able to update using the "Update Now" button.
Deactivate all the Plugins you use at the [[Managing_Plugins|Plugin Management Page]] ( <nowiki>http://example.com/wordpress/wp-admin/plugins.php</nowiki> ). Some Plugins might not work with WordPress {{CurrentVersion}}, and that is why you want to deactivate them all. This will ensure that you don't end up with an upgraded-but-broken installation of WordPress after the upgrade process.
 
   
===Step 3: Overwrite Files===
+
(b) file permissions: all of your WordPress files must be either owner writable by, or group writable by, the user under which your Apache server executes.
[http://wordpress.org/download Get the latest and greatest WordPress] and upload it to the WordPress directory, overwriting all the files that exist there. This will preserve your images and themes. What if something goes wrong, you ask? Well, did you not create a backup of all files in [[#Step 1: Backup Database Tables and Files including .htaccess|Step 1]]? You can fall back upon them in the worst case scenario. [[#Step_7:_Delete_the_old_WordPress_files|Deleting your old files on the server]] and uploading the newer files from the new version you downloaded is an alternative which will ensure that the files on the server have been replaced for sure.
 
   
===Step 4: Run the upgrade script===
+
On shared hosts, WordPress files should specifically NOT be owned by the web server. If more then one user owns different files in the install (because of edits made by deleting and re-uploading of files via different accounts, for example), the file permissions need to be group writable (for example, 775 and 664 rather then the default 755 and 644). File permissions (in general) should be adjusted as appropriate for the server environment (the shared host RackSpace CloudSites for example recommends 700 and 600 for a single ftp user, or 770 and 660 for multiple ftp users). See the file permission section for more (some files and folders require stricter permissions).
Visit your blog's Upgrade Page ( <nowiki>http://example.com/wordpress/wp-admin/upgrade.php</nowiki> ) and follow the instructions that are displayed.
 
   
===Step 5: Reactivate Plugins one by one===
+
If you see a "failed update" nag message, delete the file '''.maintenance''' from your WordPress directory using FTP. This will remove the "failed update" nag message.
Awaken the monsters, one by one, at the [[Managing_Plugins|Plugin Management Page]] ( <nowiki>http://example.com/wordpress/wp-admin/plugins.php</nowiki> ). Check if everything works as expected. There is [[User:Matt/2.0_Plugin_Compatibility| a list of Plugins that are known to work with WordPress 2.0 here]]. If some Plugins do not work, deactivate the plugin, then contact the plugin author to encourage the author to upgrade the plugin.
 
   
There, that does it.
+
If the one-click upgrade doesn't work for you, don't panic! Just try a manual update.
   
Something went wrong, you say? No worries. Since you backed everything up earlier, restore the files and database tables you backed up, and this time, consider following the '''[[#Detailed Instruction|Detailed Instructions]]''' below.
+
= Manual Update =
   
<hr />
+
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 Update, you may want to review the [[Upgrading_WordPress_Extended|more detailed upgrade instructions]]
<hr />
 
   
==Detailed Instructions==
+
For these instructions, it is assumed that your blog's URL is <code><nowiki>http://example.com/wordpress/</nowiki></code>.
   
===Before You Start===
+
== Step 1: Replace WordPress files ==
# Backup your database.
 
# Backup ALL of your WordPress files, including [[Glossary#.htaccess<|<tt>.htaccess</tt>]] if you have one.
 
# Verify that the backups you created are there and usable.
 
# Deactivate ALL your Plugins.
 
   
'''Important Note: if you haven't completed the steps above, do not attempt the upgrade.'''
+
# Get the [http://wordpress.org/download/ latest WordPress] zip (or tar.gz) file.
  +
# Unpack the zip file that you downloaded.
  +
# Deactivate plugins.
  +
# Delete the old <code>wp-includes</code> and <code>wp-admin</code> directories on your web host (through your [[FTP_Clients|FTP]] or shell access).
  +
# Using [[FTP_Clients|FTP]] or your shell access, upload the new <code>wp-includes</code> and <code>wp-admin</code> directories to your web host, in place of the previously deleted directories.
  +
# Upload the individual files from the new <code>wp-content</code> folder to your existing <code>wp-content</code> folder, overwriting existing files. Do NOT delete your existing <code>wp-content</code> folder. Do NOT delete any files or folders in your existing <code>wp-content</code> directory (except for the one being overwritten by new files).
  +
# Upload all new loose files from the root directory of the new version to your existing wordpress root directory.
   
===Overview of the Upgrade Process===
+
NOTE - you should replace all the old WordPress files with the new ones in the <code>wp-includes</code> and <code>wp-admin</code> directories and sub-directories, and in the root directory (such as index.php, wp-login.php and so on). Don't worry - your wp-config.php will be safe.
# [[#Step 1: Backup your database|Backup your database]]. Read [[Backing Up Your Database]] for a detailed explanation.
 
# [[#Step 2: Backup ALL your WordPress files|Backup ALL your WordPress files]] in your WordPress directory. Don't forget your [[Glossary#.htaccess<|<tt>.htaccess</tt>]] file.
 
# [[#Step 3: Verify the backups|Verify the backups]] you created are there and usable. This is essential.
 
# [[#Step 4: Deactivate ALL your Plugins|Deactivate ALL your Plugins]].
 
# [[#Step 5: Ensure first four steps are completed|Ensure first four steps are completed]]. Do not attempt the upgrade unless you have completed the first four steps.
 
# [[#Step 6: Download and extract the WordPress package|Download and extract the WordPress package]] from http://wordpress.org/download/.
 
# [[#Step 7: Delete the old WordPress files|Delete the old WordPress files]] on your site, but '''DO NOT DELETE'''
 
#*<code>wp-config.php</code> file;
 
#*<code>wp-content</code> folder; Special Exception: the <code>wp-content/cache</code> folder should be deleted.
 
#*<code>wp-images</code> folder;
 
#*<code>wp-includes/languages/</code> folder--if you are using a language file do not delete that folder;
 
#*<code>.htaccess</code> file--if you have added custom rules to your <code>.htaccess</code>, do not delete it;
 
#*<code>robots.txt</code> file--if your blog lives in the root of your site (ie. the blog is the site) and you have created such a file, do not delete it.
 
# [[#Step 8: Upload the new files|Upload the new files]] from your computer's hard drive to the appropriate WordPress folder on your site.
 
# [[#Step 9: Run the WordPress upgrade program|Run the WordPress upgrade program]] and follow the instructions on the screen.
 
# [[#Step 10: Update Permalinks and .htaccess|Update Permalinks and .htaccess]]. Update your Permalink Structure and merge the custom rules, if necessary, into your [[Glossary#.htaccess<|<tt>.htaccess</tt>]] file.
 
# [[#Step 11: Install updated Plugins and Themes|Install updated Plugins and Themes]]. Please review the [[User:Matt/2.0_Plugin_Compatibility|list of Plugins that work in Version 2.0]] and check if your Theme author has a new version.
 
# [[#Step 12: Reactivate Plugins|Reactivate Plugins]]
 
# [[#Step 13: Review what has changed in WordPress|Review what has changed in WordPress]].
 
   
That's the overview of the upgrade process. Please continue reading the Detailed Upgrade Instructions.
+
Be careful when you come to copying the wp-content directory. You should make sure that you only copy the files from inside this directory, rather than replacing your entire wp-content directory. This is where your themes and plugins live, so you will want to keep them. If you have customized the default or classic themes without renaming them, make sure not to overwrite those files, otherwise you will lose your changes. (Though you might want to compare them for new features or fixes..)
   
Remember, if you do encounter problems, re-read the Instructions below to insure you've followed the proper procedures and consult [[Installing_WordPress#Common_Installation_Problems|Troubleshooting: Common Installation Problems]].
+
Lastly you should take a look at the wp-config-sample.php file, to see if any new settings have been introduced that you might want to add to your own wp-config.php.
   
===Detailed Upgrade Instructions for 1.5.x to 2.0.3 and 2.0 to 2.0.3===
+
== Step 1.5: Remove .maintenance file ==
The following are the instructions that explain the above steps in more detail. Please read all of the instructions before starting.
 
   
====Step 1: Back up your database====
+
If you're upgrading manually after a failed auto-upgrade, delete the file .maintenance from your WordPress directory using FTP. This will remove the "failed update" nag message.
Perform a backup of your database. All of your WordPress data, such as Users, Posts, Pages, Links, and Categories, are stored in your [[Glossary#MySQL|MySQL]] [[Database Description|database]]. Please read [[Backing Up Your Database]] for a detailed explanation of this process.
 
   
It is extremely important to back up your database before beginning the upgrade. If, for some reason, you find it necessary to revert back to the 'old' version of WordPress, you may have to restore your database from these backups.
+
== Step 2: Update 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 <code><nowiki>http://example.com/wordpress/wp-admin/upgrade.php</nowiki></code>. Follow that link and follow the instructions. This will update your database to be compatible with the latest code. You should do this as soon as possible after step 1.
   
====Step 2: Back up ALL your WordPress files====
+
== Step 3: Do something nice for yourself ==
Back up ALL of your files in your WordPress directory and your [[Glossary#.htaccess<|<tt>.htaccess</tt>]] file. Typically, this process involves using an [[FTP Clients|FTP program]] to download ALL your WordPress files from your host to your local computer.
 
Please read [[WordPress_Backups#Backing_Up_Your_WordPress_Site|Backing Up Your WordPress Site]] for further explanation.
 
   
If you have made changes to any core WordPress files, or if you've got customized Plugins or Themes, you will want to have a good backup of those files. It is extremely important to back up your files before beginning the upgrade. If for some reason you find it necessary to revert back to the 'old' version of WordPress you will need to upload these files.
+
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).
   
====Step 3: Verify the backups====
+
Your WordPress installation is successfully updated. That's as simple as we can make it without [[Installing/Updating_WordPress_with_Subversion|Updating WordPress Using Subversion]].
Verify that the backups you created are there and usable. '''This is the most important step in the upgrade process!'''
 
The verification process involves making sure you can see the backup files on your local computer (or wherever you've stored them) and that you can navigate into any sub-folders. If the files are in a zip file, make sure you can open the zip file.
 
   
====Step 4: Deactivate ALL your Plugins====
+
Consider rewarding yourself with a blog post about the update, reading that book or article you've been putting off, or simply sitting back for a few moments and letting the world pass you by.
In your [[Administration Panels|Administration panel]], under the Plugins choice, deactivate any Plugins. Because of the changes to WordPress, some Plugins may conflict with the upgrade process.
 
   
====Step 5: Ensure first four steps are completed====
+
= Final Steps =
If you have not completed the first four procedures, STOP, and do them! Do not attempt the upgrade unless you have completed the first four steps.
 
   
The best resource for problems with your upgrade is the [http://wordpress.org/support/ WordPress Support Forums], and if you have problems, the volunteers at the [http://wordpress.org/support/ WordPress Support Forums] will likely ask if you have completed the first four steps.
+
Your update is now complete, so you can go in and enable your Plugins again.
  +
If you have issues with logging in, try clearing cookies in your browser.
   
====Step 6: Download and extract the WordPress package====
+
= Troubleshooting =
Download and unzip the WordPress package from http://wordpress.org/download/.
 
* If you will be uploading WordPress to a remote web server, download the WordPress package to your computer with your favorite web browser and unzip the package.
 
* If you have [[Glossary#Shell|shell]] access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your [[Glossary#Web server|web server]]. You can do so using <tt>wget</tt> , <tt>lynx</tt> or another console-based web browser, which are valuable if you want to avoid [[Glossary#FTP|FTPing]]. Place the package in a directory parallel to your current wordpress directory (like "uploads," for example). Then, unzip it using: <tt>gunzip -c wordpress-{{CurrentVersion}}.tar.gz | tar -xf -</tt> or by using: <tt>tar -xzvf latest.tar.gz </tt>
 
   
The WordPress package will be extracted into a folder called <tt>wordpress</tt>.
+
If anything has gone wrong, then the first thing to do is go through all the steps in our [[Upgrading_WordPress_Extended|extended upgrade instructions]]. That page also has information about some of the most common problems we see.
   
====Step 7: Delete the old WordPress files====
+
If you run into a request for FTP credentials with trying to update WP on a IIS server automatically, it may well be a matter of rights. Go into the IIS Management Console, and there to the application pool of your blog. In its advanced settings, change the Process Model Id into LocalSystem. Then on Sites, choose your blog, right click, click on Edit permissions and on security tab add authenticated users. That should do it.
'''Why Delete?''' Generally, it is a good idea to delete whatever is possible because the uploading (or upgrading through cPanel) process may not correctly overwrite an existing file and that may cause problems later.
 
   
'''DO NOT DELETE these folders and files:'''
+
If you experience problems after the upgrade, you can always [[Restoring_Your_Database_From_Backup|restore your backup]] and replace the files with ones from your previous version from the [http://wordpress.org/download/release-archive/ release archive].
*<code>wp-config.php</code> file;
 
*<code>wp-content</code> folder;
 
*<code>wp-images</code> folder;
 
*<code>wp-includes/languages/</code> folder--if you are using a language file, do not delete this folder;.
 
*<code>.htaccess</code> file--if you have added custom rules to your <code>.htaccess</code>, do not delete it;
 
*Custom Content and/or Plugins--if you have any images or other custom content or Plugins inside the <code>wp-content</code> folder, do NOT delete them.
 
   
'''Delete these Files and Folders:'''
+
== Other options ==
*<code>wp-* (except for those above), readme.html, wp.php, xmlrpc.php, and license.txt; </code> files; Typically files in your root or wordpress folder. Again, don't delete the <code>wp-config.php</code> file.
+
If you have some knowledge of unix shells you should check out [[wp-cli]].
*<code>wp-admin</code> folder;
 
*<code>wp-includes</code> folder; If using a language file remember don't delete the <code>wp-includes/languages/</code> folder
 
*<code>wp-content/cache</code> folder; You only see this folder if you are upgrading FROM WordPress 2.0.
 
 
'''How to Delete?''' There are several ways to delete the files from your WordPress site. You can use your FTP Client, or if you have access to Telenet or SSH you can use that. Some host providers also provide the ability to delete files and folders.
 
 
;Using FTP to delete files and folders :The same [[FTP_Clients|FTP client]] you use for [[Uploading_WordPress_to_a_remote_host|uploading]] can be used to delete files and folders. If your [[FTP_Clients|FTP client]] does not appear to permit you to delete non-empty folders, check the available options for your [[FTP_Clients|FTP client]]. You'll usually find an option that permits deleting non-empty folders. Deleting non-empty folders is a quick and thorough method cleaning out an old installation of WordPress. It is recommended that once the deleting is done, you switch back to the original setting for safety reasons.
 
 
;Using Telnet or SSH to delete file :If you have a command-line login (telnet or ssh), you can enter the following commands to make backup copies of the files you need to keep and to delete ONLY the wordpress files in your directory (plus .htaccess):
 
:* <code>mkdir backup</code>
 
:* <code>cp wp-config.php .htaccess backup</code>
 
:* <code>cp -R wp-content backup</code>
 
:* <code>rm wp*.php .htaccess license.txt readme.html xmlrpc.php</code>
 
:* <code>rm -rf wp-admin wp-includes</code>
 
:* <code>cp backup/wp-config.php .</code>
 
:* After you have finished with the upgrade, you can restore any customizations to your templates or plugins from your backup directory. For example, <code>cp backup/index.php.</code>
 
: Alternatively, using SSH, you could copy <code>wp-config.php, .htaccess</code>, and any content files you've added or altered into the ''new'' wordpress directory. Then, rename the old one (to archive it), and move the new one into its place.
 
 
====Step 8: Upload the new files====
 
With the new upgrade on your local computer, and using [[Glossary#FTP|FTP]], [[Uploading_WordPress_to_a_remote_host|upload]] the new files to your site server just as you did when you first installed WordPress. See [[Using FileZilla|Using FileZilla]] and [[Uploading_WordPress_to_a_remote_host|Uploading WordPress to a remote host]] for detailed guidelines in using an FTP Client to upload.
 
 
'''NOTE: If you did not delete the <code>wp-content</code> folder, you will need to overwrite some files during the upload.'''
 
 
The <code>wp-content</code> folder holds your WordPress Themes and Plugins. These should remain. Upload everything else first, then upload only those WordPress files that new or changed to your new <code>wp-content</code> folder. Overwrite any old versions of default plugins with the new ones.
 
 
The WordPress default theme has changed so you will want to upload the <code>wp-content/themes/default</code> folder. If you have custom changes to the default theme, those changes will need to be reviewed and installed after the upgrade.
 
 
====Step 9: Run the WordPress upgrade program====
 
Run the WordPress upgrade script by accessing <tt>wp-admin/upgrade.php</tt> in your favorite web browser and follow the instructions presented on your screen.
 
* If WordPress is installed in the root directory, point your browser to: <tt><nowiki>http://example.com/wp-admin/upgrade.php</nowiki></tt>
 
* If WordPress is installed in its own subdirectory called <tt>blog</tt>, for example, point your browser to: <tt><nowiki>http://example.com/blog/wp-admin/upgrade.php</nowiki></tt>
 
 
====Step 10: Update Permalinks and .htaccess====
 
In your [[Permalinks_Options_SubPanel|Options->Permalinks]] panel update your Permalink Structure and, if necessary, place the rules in your [[Glossary#.htaccess<|<tt>.htaccess</tt>]] file. Also see [[Using_Permalinks|Using Permalinks]] for details regarding Permalinks and the [[Glossary#.htaccess<|<tt>.htaccess</tt>]] file.
 
 
====Step 11: Install updated Plugins and Themes====
 
Please review the [[User:Matt/2.0_Plugin_Compatibility|list of Plugins that work in Version 2.0]]. You will want to upload and install any new versions of your Plugins and Themes. Check with the author of those Plugins and Themes for the updated versions.
 
 
====Step 12: Reactivate Plugins====
 
Use your Administration Panel, Plugins, to activate your Plugins.
 
 
Please note that if you are using the new WordPress Database Backup Plugin you may need to change the permissions on your <code>wp-content</code> folder to make it writeable by your webserver (either mode 666 or even 777). See [[Changing_File_Permissions|Changing File Permissions]] for more details.
 
 
====Step 13: Review what has changed in WordPress====
 
As of now, there is no official list in Codex that describes all the new features, but look at these resources:
 
 
*[http://wordpress.org/development/2005/12/wp2/ WordPress Development Blog: WordPress 2]
 
*[http://asymptomatic.net/2005/11/29/2135/whats-new-in-wordpress-20 Owen Winkler's What's New in WordPress 2.0]
 
*[[Roles and Capabilities|Codex Article, Roles and Capabilities]]
 
*[[User:PotterSys/Media_Managment|Codex Article, Media Management]]
 
 
===Upgrade 2.0.3 to {{Template:CurrentVersion}} ===
 
 
This is a security upgrade. Information can be found in the
 
[http://wordpress.org/development/2006/06/wordpress-203/ WordPress Dev Blog 2.0.3 Announcement].
 
 
As with all WordPress upgrades, the contents of your <code>/wp-content/</code> folder should remain intact and unchanged.
 
 
# Delete <code>/wp-admin/</code> folder.
 
# Delete <code>/wp-includes/</code> folder. Note: '''You must backup <code>/wp-includes/languages/</code> directory if exists.'''
 
# Delete all the wordpress files in the root directory where the root <code>index.php</code> file is found. '''DO NOT DELETE <code>wp-config.php</code> (nor any files you may have added yourself: <code>robots.txt</code>, <code>.htaccess</code>, <code>favicon.ico</code>).'''
 
# Download and extract the new version.
 
# Upload it to the appropriate folders such as <code>/wp-admin/</code> and <code>/wp-includes/</code>.
 
# Upload all the files in the root directory.
 
# If existed, restore <code>/wp-includes/languages/</code> directory
 
# Login as admin into your site, and you will be prompted to click on the link to upgrade your database.
 
 
That's it.
 
 
Volunteers are assisting with problems on the [http://wordpress.org/support/ WordPress Support Forums] and there is useful information in the [http://wordpress.org/support/topic/64309 2.0.2 upgrade thread].
 
 
==Upgrade Instructions in Other Languages==
 
* [http://www.gtp2p.com/wiki/wordpress:%E5%8D%87%E7%BA%A7_wordpress 简体中文]
 
* [http://keeg.ca/?p=375 Passage de WordPress 1.5.* à 2.0 en Français]
 
* [http://www.wordpress-it.it/wiki/Main/Upgrade-20 Aggiornamento WordPress da 1.5.x a 2.0 in italiano]
 
* [http://www.andreabeggi.net/2005/07/07/aggiornare-wordpress/ Aggiornare WordPress in italiano]
 
* [http://www.manuelbieh.de/www/blog/2005/12/27/detaillierte-upgrade-anleitung-fur-15x-zu-20 Upgrade Anleitung 1.5.x zu 2.0 in Deutsch]
 
*[http://86400.es/2005/12/27/actualizacion-de-wordpress-de-15x-a-20/ Actualización de WordPress en español]
 
* [http://wordpress-ar.sourceforge.net/archives/2006/02/upgrade-15-to-20/ الترقية من الإصدارة 1.5 إلى 2.0 باللغة العربية]
 
 
==Troubleshooting==
 
;Scrambled Layout or Errors :If your blog looks scrambled now or features line errors, an old plugin that doesn't work with the new code may be the culprit. In your WordPress [[Administration_Panels|Administration Panel]], deactivate all plugins that do not come with WordPress by default. Re-activate them one by one.
 
;Made Custom Changes/Hacks? :If you have made changes to other WordPress files ("hacked" WordPress), you are supposed to keep track of your changes. You will have to transfer your edits into the new code. [[WordPress Versions]] lists the files that have changed in each release.
 
;Resist Using Old Code :Upgrading gives you the newest and best code. Using your old code, no matter how much you have customised it, almost certainly will cause problems. The temptation just to use your old modified code will be great, but the chances of errors are much greater.
 
;Can I Go Back to Old Versions :You can, but it is usually not recommended to rollback (revert) your current version to an older version. That is because newer versions often include security updates and a rollback may put your site at risk. Second, the change between the database structure between versions may cause complications in maintaining your site content, posts, comments, and plugins that are dependent upon the information stored in the database. If you are still intent on this, proceed at your own risk. '''Please note, that without a backup of your entire site and your database, made prior to your upgrade attempt, a successful rollback is near impossible.''' Delete all WordPress files except for <tt>wp-config</tt>. [[Uploading_WordPress_to_a_remote_host|Upload]] the files from your backup to your server and [[Restoring_Your_Database_From_Backup|restore your database backup]]. Remember, you must have good backups for the rollback to work. For older WordPress versions, a rollback might not work.
 
;Get More Help :If you get any errors following an upgrade, check [[Installing_WordPress#Common_Installation_Problems|Troubleshooting: Common Installation Problems]], [[Troubleshooting]], and the [http://codex.wordpress.org/Category:Installation Codex Installation Category of Articles]. If you can't find an answer, post a clear question on the [http://www.wordpress.org/support WordPress Suppport Forums]. You will be asked if you have used any old code. You'll be told to change it then, so you may as well change it now :)
 
 
==Old Upgrade Information==
 
If you are considering upgrading to WordPress Version 2.0.1, but you are at Version 1.2, then follow the 1.2 to 1.5 upgrade as describe in [[Upgrade_1.2_to_1.5|Upgrading From WordPress Version 1.2 to 1.5]]. Once you are upgraded to Version 1.5.x, then follow the instructions as listed above to upgrade from 1.5 to 2.0.1.
 
   
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 22:31, 1 October 2014

WARNING: The upgrade process will affect all files and folders included in the main WordPress installation. This includes all the core files used to run WordPress. If you have made any modifications to those files, your changes will be lost.

You should always update WordPress to the latest version. When a new version of WordPress is available you will receive an update message in your WordPress Admin Screens. To update WordPress, click the link in this message.

There are two methods for updating - the easiest is the one-click update, which will work for most people. If it doesn't work, or you just prefer to be more hands-on, you can follow the manual update process.

If you are updating across multiple versions, follow the procedure at Upgrading WordPress - Extended Instructions

Back up WordPress

Before you get started, it's a good idea to back up your website. This means if there are any issues you can easily restore your website. Complete instructions to make a backup can be found in the WordPress Backups section of the Codex.

Automatic Background Updates

For WordPress 3.7+, you don’t have to lift a finger to apply minor and security updates. Most sites are now able to automatically apply these updates in the background. If your site is capable of one-click updates without entering FTP credentials, then your site should be able to update from 3.7 to 3.7.1, 3.7.2, etc. (You’ll still need to click “Update Now” for major feature releases.)

See Also: Configuring Automatic Background Updates

One-click Update

Current versions of WordPress (2.7+) feature one-click updates. You can launch the update by clicking the link in the new version banner (if it's there) or by going to the Dashboard > Updates screen. Once you are on the "Update WordPress" page, click the button "Update Now" to start the process off. You shouldn't need to do anything else and, once it's finished, you will be up-to-date.

One-click updates work on most servers. Here's the technical criteria for what must be satisfied:

(a) file ownership: all of your WordPress files must be owned by the user under which your web server executes. In other words, the owner of your WordPress files must match the user under which your web server executes. The web server user (named "apache", "web", "www", "nobody", or some such) is not necessarily the owner of your WordPress files. Typically, WordPress files are owned by the ftp user which uploaded the original files. If there is no match between the owner of your WordPress files and the user under which your web server executes, you will receive a dialog box asking for "connection information", and you will find that no matter what you enter in that dialog box, you won't be able to update using the "Update Now" button.

(b) file permissions: all of your WordPress files must be either owner writable by, or group writable by, the user under which your Apache server executes.

On shared hosts, WordPress files should specifically NOT be owned by the web server. If more then one user owns different files in the install (because of edits made by deleting and re-uploading of files via different accounts, for example), the file permissions need to be group writable (for example, 775 and 664 rather then the default 755 and 644). File permissions (in general) should be adjusted as appropriate for the server environment (the shared host RackSpace CloudSites for example recommends 700 and 600 for a single ftp user, or 770 and 660 for multiple ftp users). See the file permission section for more (some files and folders require stricter permissions).

If you see a "failed update" nag message, delete the file .maintenance from your WordPress directory using FTP. This will remove the "failed update" nag message.

If the one-click upgrade doesn't work for you, don't panic! Just try a manual update.

Manual Update

These are the short instructions, if you want more check out the extended upgrade instructions. If you experience problems with the Three Step Update, 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/.

Step 1: Replace WordPress files

  1. Get the latest WordPress zip (or tar.gz) file.
  2. Unpack the zip file that you downloaded.
  3. Deactivate plugins.
  4. Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
  5. Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, in place of the previously deleted directories.
  6. Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
  7. Upload all new loose files from the root directory of the new version to your existing wordpress root directory.

NOTE - you should replace all the old WordPress files with the new ones in the wp-includes and wp-admin directories and sub-directories, and in the root directory (such as index.php, wp-login.php and so on). Don't worry - your wp-config.php will be safe.

Be careful when you come to copying the wp-content directory. You should make sure that you only copy the files from inside this directory, rather than replacing your entire wp-content directory. This is where your themes and plugins live, so you will want to keep them. If you have customized the default or classic themes without renaming them, make sure not to overwrite those files, otherwise you will lose your changes. (Though you might want to compare them for new features or fixes..)

Lastly you should take a look at the wp-config-sample.php file, to see if any new settings have been introduced that you might want to add to your own wp-config.php.

Step 1.5: Remove .maintenance file

If you're upgrading manually after a failed auto-upgrade, delete the file .maintenance from your WordPress directory using FTP. This will remove the "failed update" nag message.

Step 2: Update 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. You should do this as soon as possible after step 1.

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

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

Final Steps

Your update is now complete, so you can go in and enable your Plugins again. If you have issues with logging in, try clearing cookies in your browser.

Troubleshooting

If anything has gone wrong, then 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.

If you run into a request for FTP credentials with trying to update WP on a IIS server automatically, it may well be a matter of rights. Go into the IIS Management Console, and there to the application pool of your blog. In its advanced settings, change the Process Model Id into LocalSystem. Then on Sites, choose your blog, right click, click on Edit permissions and on security tab add authenticated users. That should do it.

If you experience problems after the upgrade, you can always restore your backup and replace the files with ones from your previous version from the release archive.

Other options

If you have some knowledge of unix shells you should check out wp-cli.