how to update wordpress theme

How To Update WordPress Theme

WordPress theme is one of the most important parts of the WordPress site. It governs how your site looks, and how your content is displayed and makes your site look modern and professional. In this tutorial, we are going to discuss why and how to update the WordPress theme automatically and manually without losing any customization, settings, and content.

One of the best things about WordPress is how easy it is to customize. But unfortunately, there’s a high chance you’ll lose some of your changes when you update your theme.

Why do you have to update the WordPress theme?

Themes not only impact your site’s design but also impact your site’s performance, security, new features, SEO, and user experience. Updating WordPress and parts like themes and plugins is important at least for security and performance reasons. Not taking advantage of an update could put your site at risk. Let’s take a closer look at these reasons below.

1. Security

WordPress is an open-source system, which means everyone can find vulnerabilities and fix them, but there is a downside too. The attackers can find them too.

One of the best ways to keep your WordPress site secure is by updating the WordPress itself, plugins, and themes as soon as updates become available. These updates often include the latest security patches to protect against known vulnerabilities and backdoors. Not installing these updates leaves your site vulnerable to known threats as well as unknown threats.  

2. Compatibility

When a new version of the software is released, the theme may develop compatibility problems, theme developers will test their themes against the latest version, make any necessary changes, and release an update. 

It’s far less common for themes to become incompatible than it is for plugins, but it is still something you need to be aware of.

3. Features

From time to time, themes are updated with new features, either because users have requested extra features or for any other reasons.

For example, when WordPress released the Gutenberg editor, some theme updates added a block-based theme builder. By installing updates, you’ll be able to leverage the full potential of your theme.

4. Performance Optimization

Many theme updates are focused on reducing the weight, HTTP requests, and SEO optimization of a theme so it loads faster. Installing updates will ensure your theme is running at its maximum performance.

WordPress theme updating risks

Sometimes updating means you risk losing your customization or content. If you’re running a WooCommerce store with a theme that you’ve customized, you’ll need to make sure this works after the update.

Updating the theme with the latest versions will overwrite all your customizations. To safely update a customized theme, use a child theme.

When to run updates

An update to the live site will cause some downtime, so schedule it for a time when that will be least disruptive and your visitor numbers are at their lowest.

Use a tool like Google analytics to identify when your site gets the fewest visits and schedule updates accordingly.

Which customizations you will lose during a theme update

Some customizations are stored in the WordPress database, these customizations will remain during the update.

Which data you won’t lose:

  • Changes made through the built-in WordPress theme customizer (Appearance » Customize)
  • Theme customization. You can change the header image, colors, layout, custom CSS, and more
  • WordPress widgets and navigation menus
  • Plugins changes like themes companion plugins, or any other plugin, for example, contact forms, Google Analytics, email newsletter popups, and more
  • Customization of WordPress page builders like SeedProd, Divi, or Beaver Builder

Which data you will lose:

  • Added code to the themes “functions.php” file
  • Added CSS styling to the theme’s stylesheet file (style.css)
  • If you have made changes to any of your theme’s templates, such as index.php, header.php, and footer.php. These files will also be overwritten and you will lose your changes.

How to safely update a custom WordPress theme

In this section, you are going to learn how to update the WordPress theme without losing customization or settings or any content through Dashboard

First things first, you should make a backup of your website before starting.

Here are WordPress backup plugins:

Every time you update any element of a WordPress website (themes, plugins, or WordPress core) through Dashboard or manually, you should test the updated software to check whether everything clicks.

If you are worried about updating your live WordPress site, you should run the update on a WordPress staging version of your site first.

To Update your theme in WordPress go to Dashboard > Updates and select your theme, then click the Update Themes button. Or, another way, go to Appearance > Themes and update your theme from there. If there’s an update for your theme, you’ll spot a notice about it directly underneath.

WordPress will then download the theme package, unzip it, and replace the old files with the newer version. If you manually added custom code to your WordPress theme files as we discussed above, then you’ll lose those changes.

What if you’ve already edited the theme, and want to update it without losing your changes?

If you remember what customizations you made to the previous version of your theme, then re-adding them to the updated version is easy. Just copy the code snippets from the outdated theme files and paste them into the new ones.

The safest way to update a custom WordPress theme is by creating a child theme and adding your customizations there.

Sometimes you might find that you update a parent theme and it breaks your site because of changes you made to a child theme. It might happen for many reasons. A deprecated hook or changed files.

If this happens, you’ll need to do one of two things:

  • If child theme files changed in the parent theme, stop using the relevant files from the child theme by removing them from the child theme. Once you remove the file from the child theme, WordPress will use the one from the parent theme.
  • Edit the files in your child theme so they’re consistent with the parent theme.

If you need to use the second method and edit your child theme files, you’ll need to identify exactly what changes you made, what the changes are to the parent theme, and how they interact. It pays to compare the code from the previous and new versions of the parent theme, and also from the child theme. This way you can see where any problems arise and fix them.

What If you can’t remember the customizations you made before

You’ll need to use file comparison software to see the difference between the new and old versions of each file. We recommend Windows users use WinMerge, Mac users use Kaleidoscope, and Linux users use Meld.

If the software displayed the differences, except functions.php and style.css, you could copy the different files into your child’s theme folder.

Your child theme already has its own functions.php and style.css files so you need to copy any changes you have made to those files and paste them at the bottom of your child theme’s files.

Testing the updates

Which items you should test after updating:

  1. Check that the theme is compatible with your version of WordPress
  2. Test that the staging version of the site works. Test different content types (home page, individual posts, and pages, archive pages, any custom post types or taxonomies).
  3. Check that there aren’t any issues with widgets or menus.
  4. Test processes such as form submission or purchasing.
  5. If the theme update has broken the site, check the support forums for the theme to see if there are any known issues.
  6. If you have a problem and no one else has reported it, report it to the theme developer. This will help them fix it.

How to customize a WordPress theme to safely update in future

If you haven’t yet customized a theme, but are planning to do so, you can make things simpler for yourself by adding your customizations to a child theme from the start.

But if you changed your themes file already, then you have to deal with them in the previous sections.

How to update a WordPress theme on a WooCommerce site

If you’ve done this, you’ll need to create a child theme and then copy those template files to your child theme. Make sure you use the same file structure as in the original theme. Then activate the child theme as in the instructions above, test, and update the parent theme.

How to manually update the WordPress theme

You can update the theme through Dashboard and manually via the host file manager or via FTP. In this section, we are going to update the WordPress theme manually via CPanel file manager and FTP.

1. how to update WordPress theme via file manager

You can update your WordPress theme using the CPanel file manager provided in your host’s control panel. You’ll log in to your hosting account’s cPanel and open File Manager.

  • On the left side of the screen, click the public_html folder.
  • Open your wp-content folder.
  • Open your themes folder.
  • Find the folder labeled with your active theme’s name.
  • Rename it, adding “_old” to the end of the file name.
  • Download that folder to your computer as a backup.
  • Upload your new theme directory.
  • Log in to your WordPress dashboard.
  • Click Appearance > Themes.
  • You should see two themes with slight variations of the same name: one with your theme’s name and one with your theme’s name plus “_old.” Make sure to activate the new theme.
  • You may be prompted to overwrite the theme. In that case, click the Replace current with uploaded button.

Via File Manager, you have to upload your file as a zip file. In CPanel you can’t upload a folder, then you have to update your theme from the zip file.

2. how to update the WordPress theme via FTP

FTP (File Transfer Protocol) allows you to transfer your files from your computer to your WordPress hosting account over a secured connection. Below is the process of updating your WordPress theme via the FTP client FileZilla, which is officially recommended by WordPress.

  • On the left side of the screen, click the public_html folder.
  • Open your wp-content folder.
  • Open your themes folder.
  • Find the folder labeled with your active theme’s name.
  • Rename it, adding “_old” to the end of the file name.
  • Download that folder to your computer as a backup.
  • Upload your new theme directory.
  • Log in to your WordPress dashboard.
  • Click Appearance > Themes.
  • You should see two themes with slight variations of the same name: one with your theme’s name and one with your theme’s name plus “_old.” Make sure to activate the new theme.
  • You may be prompted to overwrite the theme. In that case, click the Replace current with uploaded button.

Turn on and off automated update WordPress theme

To avoid the security, performance, and compatibility issues related to an outdated theme, you can set up auto-updates.

Note: you’ll need WordPress 5.5 or later to opt-in for automatic updates.

  • Log in to your WordPress Dashboard.
  • Click Appearances > Themes. Click on the theme thumbnail that’s active on your site.
  • In the theme modal, click Enable auto-updates right below the author of the theme.

Auto-updates will now run twice per day by default. Using the same toggle link, you can disable auto-updates at any time.

Automatic background updates for themes and plugins are disabled by default. To turn this feature on for themes, add the following snippet to your theme’s functions.php file:

add_filter( 'auto_update_theme', '__return_true' );

This feature will only work for themes downloaded from the WordPress Theme Repository. If you are using a premium theme, it will not automatically update. Premium theme providers usually offer their own instructions for upgrading themes.

How to update a ThemeForest WordPress theme

You may have opted to select your WordPress theme from  ThemeForest rather than the repository. The process for keeping your theme updated via  ThemeForest is slightly different.

Log in to the developer’s site or marketplace: from there, you’ll be able to follow the steps and download a copy of the files.

Remove or rename the previous version:

Delete the relevant files from the wp-content/themes/ folder via FTP or the File Manager; Rename the files from the themes folder for insurance;

Upload your updated theme file:

  • Inside WordPress, head to Appearance > Themes > Add New 
  • Or, you may already be logged into the control panel. From there, you can simply click upload.


how to update the WordPress theme without losing customization, settings, or content?

If you follow this tutorial’s instructions to update the WordPress theme, you won’t lose any customization or setting or even any data when updating the theme. Then you can update the WordPress theme without losing any customization or settings.

If you want to move the customization of your theme to the child theme, you have to export customization from the parent theme and activate the child theme, and import the customization into the child theme.

The first thing you need to do is install and activate the Customizer Export/Import plugin.

Undo update the WordPress theme

If your updated theme doesn’t work as your expected or it rises a problem, simply you can delete the uploaded file and rename the renamed your theme with “_old” to undo the updating.

Can’t update WordPress theme

One of the reasons why you can’t update your WordPress theme is because of the cache plugins. These plugins cache your website temporarily to increase the website speed. Your theme is updated but the cache plugin shows its files. Simply clear your cache plugin or your website and browser cache files.