WordPress releases updates for WordPress self-hosted blogging platform very quickly. As soon as they invent a new feature or a new bug-fix is created, an update is thrown to the public. This is annoying for the users but this is also important as there are always many bug fixes in almost every release of WordPress. Many people are scared of updating WordPress because they feel that if something goes wrong they should not lose their so dear blog. Below is the efficient and simple way of Upgrading/Updating WordPress manually.
The updating article at WordPress suggest that you should simply overwrite the files on server which is not a bad way, but if you want to decrease the downtime of your site the below method will help you. The downtime occurred with the following method is just for some seconds which is simply unnoticeable. Another misconception with some people is they don’t know that WordPress stores most of the settings in the database. Even the plugin settings are also stored in the database itself. The only thing we have to care is about the “wp-content” folder which contains the themes and plugin’s and the “wp-config.php” file which is used by WordPress to locate the database.
The effective way of updating is not by replacing the current files on server but by creating a temporary new directory & then uploading all the files (except config.php & the wp-content folder) to the newly created directory. Here are the step by step instruction on how to do it without worrying about the loss of data. We are assuming that the WordPress files are stored in the folder named “wordpress” on the server currently.
IMPORTANT: IF YOU HAVE ANY OTHER FOLDER OR FILES THAT YOU HAVE CREATED MANUALLY NEEDS SPECIAL CARE AS METIONED BELOW IN 5TH STEP IN BOLD LETTERS.
- Download & extract the latest version of WordPress.
- Now rename the folder where you have just extracted the files with any name like “wordpress-new“.
- Open “wordpress-new” folder and delete “wp-content” folder & “wp-config.php” file from it.
- Now upload the folder “wordpress-new” to the server adjacent to, where “wordpress” folder is located.
- Copy or Move “wp-content” folder, “wp-config.php” file and “.htaccess” file (if present) from “wordpress” to “wordpress-new“. (Also if you have created any files or folders manually, copy or move. This is very important, do not take it lightly.)
By this time your site is up & is ready to be updated. Your site will now go down as soon as you will follow the next step. But this downtime will last just for few seconds. Your site will be up again when you complete the last step.
- Rename the folder “wordpress” to “wordpress-old“.
- Again rename the folder “wordpress-new” to “wordpress“.
- Now go the update link of your blog “http://www.example.com/(path-to-wordpress)/wp-admin/update.php” (Replace example.com with your domain and (path-to-wordpress) with the correct path to you blog where “wordpress” folder is located.
By this time your WordPress has been updated and your site should run properly. You may backup “wordpress-old” folder, so that if something goes wrong you can get it back.
Advantages of this method over directly over-writing all the files:
- Less Downtime of blog: The downtime period of blog is just for few seconds, whereas when over-writing the files it could last for some heavy minutes.
- Deletion of junk: Sometimes the files are not only added but also deleted in new release. Overwriting adds the new files but it does not deletes the files which have been deleted from the new version.
- Less time consumption: In over-writing the files have to be deleted and then the new files are uploaded, while in this method the file does not have to be deleted thus consuming less time.
- Provides Backup: This method keeps files of both old and new version thus providing backup, if something goes wrong you can easily restore your blog within seconds and try again.
Related: Four ways to Blog Offline & their comparison.
on August 11th, 2008 at 9:21 pm
Thanks for this, I’ve had some snafus in my time regarding improperly upgrading WP. Much appreciated.