A Complete Guide to Safely Updating Your WordPress Theme

WordPress has made updating your theme a straightforward process. But hold on. Easy as it may be to believe that clicking Update is all it takes, we’ve got news for you. There’s more to it.

WordPress theme safely updating on computer

WordPress has made updating your theme a straightforward process. Simply go to Dashboard > Updates, select your theme, and click Update Themes.

But hold on. Easy as it may be to believe that clicking Update is all it takes, we’ve got news for you. There’s more to it.

Sure, your theme will update. Problem is, this is not a safe way to do it. We recommend creating a backup of your WordPress website every time you update an element of it. Once the update is complete, test the software to make sure it works as it should.

The safest way to update your WordPress theme is by first running it on a WordPress staging version of your website. That way, in case anything goes wrong, as it sometimes does, the live version of your site is safe. So, let’s take you through the steps of safely updating your WordPress theme.

First and Foremost, Back Up Your WordPress Site

We can’t emphasize this enough. Before you run an update on your WordPress, you must — we repeat, must — make a backup of the site. Doing so ensures that in the event that the update somehow breaks your WordPress website, you can restore it using the backup.

If you’re diligent about always testing the update on a staging server before finalizing the update, then you will avoid some serious frustrations. Painstaking as this process may be, it beats the alternative: having to rebuild your site.

It helps to use a hosting service that automatically backs up your WordPress site on a daily basis. Nonetheless, before you run the update, back up the site manually just to ensure that the backup includes any changes to your site since the most recent automatic backup. If your hosting service doesn’t offer an easy way to back up your site, you can use a backup plugin.

When Should You Update Your WordPress Theme?

You need to decide how often you’ll be updating your WordPress theme. You want to do it in a way that minimizes the downtime on your WordPress website. For that reason, the best time to run updates is when the number of visitors on your site is typically at its lowest. This might be a certain time during the day or a certain day of the week.

Avoid the mistake of believing that the best time to update your site is during your personal downtime, such as when you’re asleep. If the visitors to your site come from all over the world, then it’s likely that your site is often getting a lot of traffic even while you sleep.

The most effective way to determine the low-traffic periods for your site is by using a site analytics tool such as Google Analytics. This way, you can plan your updates when your site receives the least traffic.

Note that you don’t necessarily need to perform the testing of the staging version at the times when your site updates. You can do this task at your convenience. However, when it comes to updating the live version of your site, it’s best to do it when visits to your site are at their lowest.

How to Update Your WordPress Theme Safely in a Staging Site

You must test the updated theme to make sure that it works before you take it live. That way, you can be sure that the update doesn’t conflict with other code on your WordPress website and that the site will be fully operational following the update.

To do this, you should have a version of your site that is inaccessible to the general public. Testing the update on this copy safeguards you from the consequences of a case where a faulty update breaks the site.

A staging site is the best place to perform this test. The staging site is identical to your live site, and they’re both on the same server. So, if the update works on your staging site, it will work on your live site.

Your hosting service may provide a staging environment for all your sites. You need to refresh the staging site before testing the WordPress theme update.

To do this, delete the existing staging site and create a new one. Alternatively, remember the backup you created? You can restore that to the staging site.

Once you’re done testing the WordPress theme update on the staging site (we show you how to do this in the next section), you can proceed to the staging environment on your hosting provider’s dashboard and publish the staging version into the live version.

All the changes in the staging version will then reflect in the live version. We recommend running a final check on your live site just to make sure that everything is working as it should.

At Swarmify, our mission is to bring an accelerated, distraction-free video experience to websites of all sizes. Whether you’re a website owner, an agency, or you just want to get in on our affiliate program, we have a plan for you!

Testing Your WordPress Theme Update

After creating the staging version of your site, the next step is installing and testing the theme update. First, make sure that the theme and your version of WordPress are compatible. If not, update WordPress and test that update using the process we outline in this section.

Run the WordPress update on a staging site and publish it. At this point, your version of WordPress and theme should be compatible, and you can proceed to the next step: updating the theme. Once the theme update is complete, test it. Some of the components you need to test include:

  • Content types (individual posts and pages, home page, archive pages)
  • Any taxonomies or custom post types
  • Menus or widgets
  • Processes such as purchasing or submission

The components you should test vary from one site to another. However, what components you need to test, be diligent and thorough. Testing the theme update painstakingly helps you get ahead of any potential problems that users on your site may encounter.

If updating the theme breaks the site, report it to the theme developer. Doing so helps them identify problem areas that they need to address in the next update of the theme. When the next update is released, repeat the process outlined in this article to update your WordPress theme safely.

Updating a Custom WordPress Theme

What if you’ve made changes to your theme and want to keep them after updating the theme? Well, that’s not as straightforward as the above process, but you can still do it provided you remember which files you edited and the changes you made.

If you have a custom WordPress theme, then the safest way to update it is by creating a child theme and doing all your customizations there. The WordPress child theme should include your edited theme files.

Once again, we highly recommend that you do this on a staging site just in case something goes wrong and the site breaks. The process is as follows.

  1. Create a backup of the parent theme and store it locally.
  2. Create a child theme from your current theme. It should include the parent theme’s stylesheet details and functions.
  3. Copy any changes you made in the parent theme’s function file into the child theme’s function file.
  4. Copy any changes you made to the parent theme’s stylesheet to the child theme’s stylesheet.
  5. Copy any changes you made to the parent theme’s template file to the child theme’s template file, and use an identical file structure.
  6. Activate the child theme.
  7. Test the site, including all the customizations.
  8. Check all your files to make sure they’re all there.
  9. Use your staging site to update the parent theme.
  10. Test the site again, ensuring the template files work properly.

The great thing about this process is that you don’t need to repeat it in subsequent updates of your parent theme. In case you need to make changes later on, make them on the child theme. Before you make any changes, backup the child theme and thoroughly test the changes on a staging site using Github or another version control system.

How Changes in Your Child Theme May Affect the Update of Your Parent Theme

There may be cases where you want to update the parent theme, but the changes you made to the child theme break the site. Perhaps a function in the parent file connects to a hook that’s no longer present in the child theme. Or maybe the template theme in the child theme doesn’t match with the one in the parent theme.

In that case, you have two options:

  • Remove the relevant files from the child theme so that WordPress uses the one in the parent theme.
  • Make the necessary changes to the files in the child theme to match them with the ones in the parent theme.

Whichever option you go with, create a backup of the child theme before editing it and test the results on your staging site. Again, stay on top of your changes by using GitHub. Doing so helps you track changes you make to both the child and parent themes and how the changes interact.

Consider comparing the code from the new and previous versions of the child and parent themes to identify potential problems and address them proactively. Peruse the documentation for the latest parent theme release. The documentation will help you determine which changes in the theme may affect your child's theme.


How to Create a Video Sharing Site With WordPress
WordPress is the most popular CMS for a reason: it’s free and easy to get started. But how do you create a video-sharing site with WordPress? Read on to find out!
Why You Should Never Upload Your Video to Your WordPress Website
Videos are great for capturing your viewer’s attention and boosting your sales. But here’s why you shouldn’t upload videos to your WordPress website.
How to make WordPress page loading blazing fast
Many websites are using the WordPress platform to publish the content and tomonitor the performance. This WordPress platform has coined its name and passedthe vigorous tests, but it lacks at one point; the slow loading. However, that’snot something incurable as the implementation of correct preca…

Try SmartVideo today!