Besides new features, updates address security vulnerabilities, and generally improve the overall WordPress experience. Keeping your site updated with the newest version will give you the latest and greatest that WordPress has to offer.
However, staying up to date can be tedious. Unforeseen hiccups, compatibility issues with plugins, and other unfortunate consequences are not unheard of. More than a few users have had their site break, experienced downtime, or lost data due to problems with the update process.
Why You Should Keep WordPress up to Date
The main reason to keep your WordPress site up to date is security. Although WordPress is growing increasingly more popular, it isn’t perfect—security loopholes have existed in the past.
For hackers, not updating to the latest version translates into a large amount of websites they can try to gain access to in order to inject malicious software or cause other kind of distress. Making sure your website is running on the latest version of WordPress is a good way of reducing the risk of being hacked.
Even with the most rigorous testing bugs, however minor, will sometimes find their way into software. Especially when new features and functionality—which translate to additional code—are added, the likelihood of something going wrong increases.
Every new version of WordPress addresses bugs that have been found since the last release. You can view the release notes to find out exactly what has been taken care of in each version. There doesn’t have to be anything noticeably wrong with your WordPress site for you to benefit from those fixes.
With the growth of WordPress, users are regularly treated to new features and functionality. For example, in the case of going from version 3.7 to 3.8, there was an updated design for the WordPress dashboard as well as a new default theme (Twenty Fourteen). In a different update, the media manager was greatly improved.
New features are implemented to make running a WordPress website more comfortable. They are often the direct result of feedback from users, and can make your life as a website owner or administrator much easier.
Best Practices for a Smoother Updating Process
In most cases, when updating to the latest version of WordPress, there are rarely issues. However, to ensure a smooth updating process, there are a few precautions you can take. Adhering to the following practices eliminates some of the most common error sources.
If It Can Be Avoided, Never Make an Upgrade on a Live Install
There is nothing more frustrating than having to restore your website after a botched update attempt. Knowing that visitors are hit with an empty screen while you’re stuck watching an ftp-client push the old files back up on your server can be quite torturous.
To avoid this, always try out new updates on a remote copy of your website first. Whether on a local installation or a staging server. Build yourself a sandbox environment where things can go wrong without immediate negative consequences for your traffic.
Skip the Major Updates, at First
Major updates (the ones where the second or first number in the WordPress version changes) often introduce new features and functionalities that have not yet been shared with a larger audience. As a consequence, this makes them more likely to contain bugs or conflict with existing plugins.
You will notice that major updates are often quickly followed by minor ones. The latter address bugs, which have come up after the WordPress version went live on thousands of sites. If you can, wait for the follow-ups with the additional bugfixes. Of course, when it comes to security updates, you should try to install those as quickly as possible.
Use Child Themes and Plugins
It should be common practice by now, but it bears repeating: Do not edit theme or core files directly. Changes to these files will be overwritten upon update, making your customizations obsolete. Use child themes and plugins instead.
Configure WordPress Auto-Updates
By default, every site running WordPress has automatic updates enabled for minor core releases and translation files. While convenient, the automation of this process is not always helpful. Plugin developers are often slower in bringing their creations up to speed when the next WordPress version hits.
In some cases, this can break your site without you even knowing it happened. Therefore, opting for updating manually might be the better idea. Disabling automatic updates can be done with a simple edit of wp-config.php as laid out in the WordPress Codex.
Check Compatibility for Your Most Important Plugins
Some plugins can play a major role in the functionality or design of a website. If they ‘throw a fit’ after a WordPress upgrade, this can be a major headache. Just to be safe, it is therefore a good idea to make sure plugins work with the new WordPress version before upgrading. You can do so under “compatibility” on the plugin site in the WordPress directory.
Backing up Your WordPress Website
Before updating, you should always, always, always back up your site first. If something goes wrong, this ensures you can restore it to a functioning version and don’t stand to lose everything you have built.
A WordPress site consists of two parts: the files on the server and the database. Both need to be preserved in order to safely backup your site.
The simplest solution to back up your WordPress installation is to access your server with an ftp-client and download the entire folder to your desktop. There are also ways to automate this and some web hosts who provide backup solutions for clients. Whichever you choose, it is recommended to keep at least three backups on file and store them in different places and on different mediums.
There are several server software solutions available for backing up your database. Among the most common are phoMyAdmin and cPanel. It depends on your web host which one your server uses. One of the quickest and most convenient ways is to use the plugin WP-DBManager. It can create backups on demand or on schedule, place them on your server, or even email them to a specified address.
How to Update WordPress
There are two principle ways of installing a new version of the WordPress platform to your website. First is the automatic one-click update accessible from the dashboard. Second is a manual update via ftp.
No matter which one you choose, make sure you first try out the update on a copy of your website that is not currently served to your visitors, but is run locally or on a staging server. That way you can detect issues before they cause downtime.
The WordPress One-Click Update
The one-click update can be found under dashboard > plugins. This is also where you’ll find a list with all themes and plugins for which newer versions are available. If an update for WordPress is available, you will also see a banner in your backend, urging you to install it.
Before hitting the “Update Now” button for the core files, first update your plugins and themes. Developers often give a heads-up for WordPress releases so they have time to adjust their software beforehand.
If afterwards you hit the big blue button, WordPress should automatically download and install its new version without you having to do anything else. Once it’s finished, your site is up to date.
Updating WordPress Manually
The manual update process involves a few more steps:
- Make sure to back up your database as well as your WordPress installation.
- Download the latest WordPress version and extract the files on your computer.
- Deactivate all plugins.
- Access your server via ftp and delete all old WordPress files EXCEPT: the file wp-config.php, the wp-content folder, wp-includes/languages, any custom content or plugins inside the wp-content folder, your .htaccess file( if existent), your robots.txt file(if existent).
- Upload the new files from your computer to the respective folders from your site. Only update those files in the wp-content folder that are new or changed, like if there’s a new default theme.
- Go to the WordPress backend at the usual /wp-admin location to run the upgrade script.
- Update your permalinks in the respective menu under the WordPress settings.
- Check again if any new versions for themes and updates are listed under dashboard > updates, and install them.
- Reactivate plugins one by one to see if any of them are causing problems with the new WordPress core version.
- Use the automatic generator to generate new security keys and add them in the respective place to the wp-config.php file on your server.
How to Check Your Website after an Update
After completing the update, you want to make sure that everything is working as expected. It’s better to catch errors immediately rather than somewhere down the line.
In order to test your site, you’ll need to perform a few operations as listed below. While doing so, look for layout breaks and other design changes, check if posts are displayed properly, or if anything else unusual is happening on your website or in the dashboard.
- Open your homepage.
- Navigate to a few subpages.
- Open a few posts.
- Log in to the dashboard.
- Create a new post.
- Upload an image and insert it into the post.
If you don’t encounter any problems during the above steps, you should be good to go. If, however, something is broken or not working as it should, you might have to restore to the last working version of your website.
How to Restore Your Site after a Failed Update
In the unlikely event that your site is wrecked by an update, fear not. If you have backed up all components as addressed in the beginning, you can revert it to its old glory without a problem. All you have to do is perform the backup process in reverse.
Restoring the Database
A database restore will typically be done using phpMyAdmin or a similar management tool for MySQL databases. No matter what you use, the process should look something like this:
- Log in to the admin account of your database.
- Navigate to the database that you need to restore.
- Mark all current tables and drop them.
- When the database is empty, click ‘import’.
- Browse to the backup file on your computer and select it.
- Start the import.
- Grab a drink as this may take a while.
- Wait for the success message.
Restore the Files
After the database is restored, you’ll have to do the same with the files on your server. Here is how to do it with the help of an ftp-client:
- Fire up your client and connect to your website’s ftp-server.
- Delete everything on your server except for the wp-content/uploads folder. This contains your media which usually makes up a major part of the files and therefore takes the longest to upload
- Browse to the backed up version of the website on your hard drive.
- Upload everything except for the wp-content folder back onto your server.
- When that is done, open the wp-content folder both in the backup and on your server. Restore all the files except for the ‘uploads’ folder, which should already exist online.
That’s it. Now go back to your site and see if the restore was successful. If it was, you can go ahead and start troubleshooting what went wrong in the update process on a local or online copy of your website.