Setting up a WordPress website is the more straightforward part of starting a new online project. You can now install the CMS in seconds, and thanks to the notoriously user-friendly WP dashboard, you can easily add and manage content.
It’s the day-to-day maintenance tasks, like updating a WordPress theme, that usually prove more difficult.
Users who have updated regular WordPress themes in the past will probably say that there’s nothing particularly complex or technical about the process. Examine it in a bit more detail, however, and you’ll see that there are a few things worth bearing in mind.
Let’s have a look at them.
Why Should You Update Your WordPress Theme?
The reasons for updating your software have been reiterated time and again. However, just in case someone missed them, we’ll go over them real quick:
Your WordPress website is a collection of components that work together. The theme is one of them, and like the rest, if it has a security bug, it can present cybercriminals with an easy entry point to your site.
Reputable developers and security specialists invest a lot of time and effort into hunting down and patching these bugs. All you have to do is ensure you use the theme’s latest version where all the holes are plugged.
The theme is mostly associated with the website’s looks. However, modern WP templates are complex software products that contribute a great deal to the site’s overall user experience.
Theme developers know this all too well, and they constantly try to stay on top of the latest web design trends, giving their customers the newest, most advanced features they can get. If you want to keep visitors interested, you’ll want to have those features on your website.
The theme isn’t the only thing you need to update. You must also install the latest versions of the WP core and all the plugins you use for precisely the same reasons – keeping your website as secure and functional as possible.
However, when you update the core and plugins, you must also ensure your theme will work well with them. The best way to do that is to update it to its latest version as well.
So, you have plenty of reasons for updating your WordPress theme. Let’s see how to do it safely.
Updating a WordPress Theme: Tips and Tricks
Updating a WordPress theme is a relatively straightforward process, especially if it’s available on WP’s official repository. Here are the steps:
- STEP 1: Log into your WordPress dashboard.
By default, you can get to the WP dashboard login page by adding “/wp-admin” to your domain (e.g., https://yourdomain.com/wp-admin/).
- STEP 2: Go to the Updates page.
As soon as you log in, WordPress will alert you about the available update. Under the Dashboard menu from the navigation panel on the left, you have the Updates page. If there’s an available update for the core, a theme, or a plugin, it’ll look like this:
- STEP 3: Select the theme and update it.
You’ll see a list of all the components that can be updated. Select the ones you want and click Update Themes.
If your theme isn’t available in the official WordPress repository, the steps will depend on the template itself. Some developers might implement automatic update functionality. Others will give you the files themselves and ask you to upload them via FTP.
Whatever the case, there are a few precautions you can take to make the update as seamless as possible. Here’s what you can do:
Pick the right timing
You mustn’t forget that the theme is vital for the functionality of the entire website. If something goes wrong during the update and you’re not prepared, you could be facing costly downtimes. Minimizing the damage in case things don’t go according to plan might not be a bad idea.
Analyze your site’s traffic patterns and pick the least busy time of the day for the update. It might mean waking up in the middle of the night to install the new version, but at least you can be sure that if something breaks – fewer people will know about it.
Backup your website
Of course, if things do go awry, you need to bring them back to a fully functional state as quickly as possible. That’s why you should create a full backup before any major change to your website. Updating the theme is one such major change.
Use a staging environment
A staging environment will help you test the theme’s new version before putting it on the live website. Do some research and ask your hosting provider whether they have the tools to let you clone your WordPress installation and use the copy as a testbed for all updates and changes you make to your website.
If you use ScalaHosting’s SPanel management platform, for example, you have access to the SWordPress Manager. With it, you can clone your main WP installation and place the copy in a separate folder on your account. You can then use the clone to test new versions of themes and plugins before pushing them to production.
Updating a Custom WordPress Theme
An update of a WordPress theme should cause no problems as long as it’s planned and executed according to the experts’ advice. However, so far, we’ve only covered updating a standard, off-the-shelf template.
If you’ve done some custom work to tailor the design to your own liking, you might be worried that you’ll lose your modifications when applying the theme’s latest version.
Whether these fears are founded depends on the changes you’ve made to your theme. If you’ve used the Appearance > Customize menu to edit the design – you have nothing to worry about. Every theme has its own customization options available in the menu, and the changes you make via this method are saved in your site’s database. This way, they won’t be affected during an a theme update.
Things are slightly different if you modify the theme’s files themselves.
During an update, WordPress downloads an archive containing the theme’s latest version and unzips it, overwriting the old template files. Therefore, any changes you’ve made to the old files will be lost.
To avoid this, you need to use a child theme.
A child theme is the best way to customize your design and ensure you won’t lose your changes when an update is due. It has its own theme folder inside the /wp-content/themes/ directory and is available on the same list as your other themes in the WP dashboard.
Still, the child theme is not a standalone template – it needs a parent theme to pair up with.
The clone consists of at least two files – styles.css and functions.php. Through them, WordPress knows that it’s working with a child theme, and it also identifies the parent.
If you’re going to make relatively minor changes to your theme – these two files will be enough to carry all your customizations. However, if the design is more heavily overhauled, you’ll need additional template files (like page.php, index.php, etc.). If a particular template file is missing, WordPress will retrieve it from the parent theme, so in terms of functionality, the differences are imperceptible.
The purpose of the child theme is to store your custom code while still enabling you to install the parent theme’s vital updates.
Updating a WooCommerce Theme
Updating a WooCommerce theme is not much different from updating a standard WP template. WordPress will still alert you whenever there’s a new version of one of your themes, and in many cases, it can take care of installation on its own.
As usual, schedule the update for the quiet hours of the day if possible, and make sure you have a working backup before you start. Once again, a staging environment will allow you to troubleshoot potential problems before updating the live website.
Additional steps may be required if you’re using a page builder or a custom theme built from the ground up just for your project. The theme’s developers should be able to provide you with further instructions on the exact procedure.
If you’re using a WooCommerce version prior to WooCommerce 3.3, additional edits to the theme may be required to make it compatible with the ecommerce add-on. However, it’s safe to say that if you’re using a plugin that is now more than four years old – you need to seriously consider updating it.