Before you begin WordPress upgrade exercise, it's a good idea to backup your WordPress website. In case, if you face any issues while upgrading WordPress, you can easily restore your website from the backup. You can find the complete instructions to make a WordPress website backup here. After WordPress 3.7+, you do not have to manually update minor and security updates. WordPress is capable to update itself to a new minor release without any user input(For major updates to you still need to click “Update Now”).
There are mainly two methods for updating WordPress. We will discusss both of them.
One-click update is the most easiest WordPress upgrade method and is preferred by most of the people. When WordPress update is available, you will receive an update message at WordPress dashboard. You can launch the update by clicking the link in the new version banner. At Update WordPress page, you’ll have to click the button Update Now to start the process off.
Once the WordPress upgrade is launched, you do not need to do anything else. Once the WordPress upgrade is finished, your WordPress website will be up-to-date. In case, WordPress website update fails or you receive failed update message, you will have to follow below mentioned steps:
- Access your WordPress directory though cPanel OR FTP.
- Locate and delete .maintenance file from your WordPress directory.
- This should remove the "failed update" message.
If the one-click upgrade doesn't work for you, have a patience, take a deep breath and try a manual update.
Manual upgrade through FTP
The Manual backup method is an advanced option to upgrade WordPress website and demands more technical skills. If you prefer to be more hands-on or you have made several failed one click upgrade attempts previously, you can follow the manual update process.
Replace WordPress files through FTP
- Go to current WordPress website dashboard and deactivate all the plugins.
- Go to existing WordPress directory and delete the wp-includes and wp-admin directories through FTP.
- Now, download the latest WordPress zip (or tar.gz) file.
- Unpack the zip file that you downloaded.
- Locate wp-includes and wp-admin directories and upload them to your web host, in place of the previously deleted directories.
- Locate wp-content directory. 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).
- Upload all new loose files from the root directory of the new version to your existing wordpress root directory.
- Try to login at WordPress dashboard. If a database upgrade is necessary at this point, WordPress will detect it and give you a link to a URL like http://website.com/wp-admin/upgrade.php Browse that link and follow the instructions. This will update your database to be compatible with the latest code. </ol >
- You should replace all the old WordPress files with the new ones in root directories (such as index.php, wp-login.php and so on).
- Make sure that you only copy the files from wp-content directory, rather than replacing your entire wp-content directory. wp-content contains your themes and plugins, so you will want to keep them.
- If you have made custom changes in default or classic themes without renaming them, do not overwrite those files, otherwise you will lose your changes.
- Check wp-config-sample.php file, if there any new settings have been introduced that you might want to add to your own wp-config.php.
Removal of .maintenance file and flush the cache plugins
If you have attempted one click upgrade previously and received failed auto-upgrade error,You will have to delete the file .maintenance from your WordPress directory using FTP. If you have caching enabled, clear the cache so the changes will go live immediately. Now, your WordPress 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.
If anything has gone wrong, refer all the steps in extended upgrade instructions.