Since WordPress 3.7, WordPress attempts to update automatically, as long as an update is minor and doesn’t require a backup to be created. Minor core and translation updates are by default enabled on all installations and further automatic updates can be configured, using wp-config.php.
Whenever an update is major, it’s necessary for you to approve it, after performing a backup. Even then though, you can for the most of it update or upgrade with a single click.
In such cases, WordPress displays a notification on your Dashboard that a newer version is available and you’re prompted to update. You can then click on Dashboard->Updates to review the available updates, including those for WordPress core. When you’re ready, you can simply click on the available Update/Upgrade button and wait for a confirmation that the process was successful.
Sometimes, however, WordPress is unable to perform automatic or one-click updates. The reasons can be many, including restrictions on the server, plugin incompatibility, custom settings or an error in your current WordPress core.
No matter what is the reason, whenever WordPress can’t update automatically, you have to perform a manual update.
Preparing For Manual Update Of WordPress
Before initiating the update process, you must back up your site. This is necessary, as updates and upgrades can change, invalidate or delete your data. When you have backed up your site, you have to take care of site visitors: are they going to see a maintenance message or a live copy of your site, while the update is being performed?
If you prefer to keep your site live while updating manually, you can choose one of many site cloning tools. I can’t recommend one in specific, as, in my experience, they all have their pros and cons. My best advice would be to perform a search for cloning tools and evaluate them in respect to your specific needs. As long as your site isn’t large, you can possibly use Duplicator, a quite popular plugin, for free.
If you want to show users a maintenance message, you still need a cloning plugin that offers such a function. The reason is that you must disable all plugins while manually updating WordPress. This means that simple plugins as Coming Soon & Maintenance Mode will be disabled in the process and will therefore have not display an eventual maintenance mode page that you design in it. Cloning plugins allow you to pull a copy of your site to local host for maintenance, while your site continues to be live and unchanged. Once you’re ready updating WordPress, the plugin makes your changes public.
WordPress does also have its own maintenance page that is put up, whenever plugins or WordPress itself are updated automatically or via Updates in the Admin Panel. However, when performing manual updates, this won’t work either, as you practically destroy WordPress by deleting the old files and replacing them with new ones, instead of activating WordPress’ update function.
If you have modified some of WordPress’ core files, you must make a copy of these, as they will be deleted when updating. As long as the edits are easy to implement, it’s recommended that you note them down and edit the new files accordingly. This way you won’t risk that an improved version of a core file gets discarded, if you decide to stick to the old modified file. Alternatively, you should compare the code in the two versions and update manually by adding new or altered code.
Once you have this covered, you can move to updating.
How To Update WordPress Manually: Step-By-Step Guide
To update WordPress manually, you should simply follow these steps:
- Download the new WordPress version as a .zip archive. In most cases, you can download the file directly from within WordPress’ Updates screen (Dashboard->Updates). The download is available next to the Update button. If you for some reason can’t or don’t want to do that, you can download the .zip archive from wordpress.org/download.
- Save the file on your computer.
- Unzip the files.
- Go to your WordPress Admin panel and deactivate all plugins. No worries, as long as you have cloned your site and are working on the local copy, this won’t affect the performance of your live site.
- Access your site’s core files on the server via FTP.
- Delete wp-includes and wp-admin directories.
- Upload the new wp-includes and wp-admin, so that they replace the old directories in the root directory for your site on the server.
- Do not delete wp-content! This directory stores all of your settings and content. Instead, upload the new wp-content directory via FTP and choose to overwrite existing files. This way, your content and settings are left intact, while all core files are updated.
- Select all loose files from the .zip archive and upload them to your site’s root. Choose to overwrite existing files.
- Go back to your WordPress Admin Panel. You’ll be prompted to log in again.
- As long as it’s required to update your database, a notification with a link will appear on the screen. Click on the link and wait for a success message.
- Enable all plugins again.
- As long as you cloned your site, it’s now time to make your changes live.
- If you have cache enabled, it’s a good idea to purge it now, so that you and your site’s users get access to all the changes right away.
- Important! After updating WordPress manually and purging the cache, you must check your site for issues. Even though it’s pretty certain that WordPress’ code is clean, an update or upgrade can still cause incompatibility. This is due to the fact that some WordPress updates require that plugins and themes also get updated. If they don’t get updated, incompatibility issues occur. If you’re in doubt, you might want to postpone updating WordPress until your current theme and plugins indicate that they are compatible with the newest version (can normally be seen on the download page, you got them from).
- Your WordPress site is now successfully updated.
Note! Even though this is described as the way you manually update WordPress, the same procedure can sometimes be useful as a WordPress refresh. As long as you suspect that your WordPress files don’t work as they should, you can always follow the steps, described above, to freshen them up and remove eventual errors. This way, you can also restore an older version of WordPress, if the most current one appears to be incompatible with your theme or plugins.
As long as you have experienced troubles with updates before, are updating across multiple versions or are new to the process, you might want to follow these safety instructions before updating WordPress manually:
- Back up your database. You can do that via the Backup Wizard on the server (cPanel).
- Back up all of your files via the Backup Wizard and download the backups onto your computer. You can also download a copy of your site’s core (usually Public_html) directory via FTP and use it as an easy restore option.
- If updating across more than 2 major updates, you should do it by consequently updating to a slightly higher version, instead of jumping to the newest version right away. For example, you can update from v3.2 to v3.4, then to v3.6, and so on to v4.7, instead of jumping directly from v3.2 to v4.7.
- If you still can’t figure out what goes wrong, you can check out this safety guide to updating WordPress manually.