how to update a wordpress theme

How to Update a WordPress Theme

Do you want to update your theme but aren’t sure what the best way is? We’ve got something for you. In this guide, we’ll show you different ways to update your WordPress theme.

If you want to keep your website secure and enjoy all the latest features, you have to update your theme regularly. There are different methods to do so with their advantages and disadvantages. Before we go through all of them, let’s better understand some of the benefits of keeping your WordPress theme updated.

Why should you keep your WordPress Theme updated?

Themes are the framework that controls every aspect of the appearance of your website. They also affect other aspects such as speed, security, and compatibility, and usually include additional features to provide you with customization options.

That’s why keeping your WordPress theme updated will help you manage all these aspects of your website. Theme developers are constantly working on improving their themes and releasing new versions. These updates come with better security, more features and functionalities, more integrations, and so on. On top of that, these theme updates can also be useful if your website is going through problems such as image size issues in WooCommerce.

All in all, keeping your WordPress theme updated is one of the best practices to make sure that your website is working smoothly.

Why do you Lose Customizations when you Update your theme?

If you make changes or add custom code to the theme files of your website and then update the theme, you lose those customizations. Why does that happen? When you update a WordPress theme, the current files are replaced by the new version of the theme. The new files overwrite the previous ones and remove all the custom changes that you have applied to your website in the older version of the theme.

This usually happens when you have changed core theme files such as the functions.php, style.css, and templates.php using custom code. One of the solutions is to use a child theme. But that’s not the only solution. In the next section, we’ll show you different ways to update your WordPress theme the right way so you don’t lose your customization.

How to Update a WordPress Theme

There are several ways to update your WordPress theme on your website:

  1. From the WordPress dashboard
  2. Manually
  3. With an FTP client

Let’s have a look at each method so you can choose the most appropriate one for you.

1. Update WordPress Theme from Dashboard

One of the easiest ways to update a theme is from the WordPress dashboard. All you have to do is go to Appearance > Themes and you will see all the themes installed on your website. If any of the themes has a new update available, you will see it there.

For example, we are using the Divi theme and we can see that there’s a new update available. To update the theme, we can simply click on the Update Now link.

update wordpress theme wp dashboard

Then, it will start the update automatically and let you know once it’s completed. That’s it, you have updated your WordPress theme.

update complete wp dashboard update wordpress theme

Apart from updating your theme manually, you can enable auto-updates so the theme updates automatically.

Enable Auto-updates for the Theme

To enable the auto-updates, you have to go to the Theme Details of the theme that you want to update automatically and press the Enable auto-updates link as shown below.

enable auto updates update wordpress theme

This way, theme updates will be automatically scheduled accordingly. If you prefer to have more control and decide when to update your theme, you can disable the auto-updates using the same link.

Update Multiple WordPress Themes at Once

If you have several themes that you want to regularly update, there’s an interesting alternative for you. You can update multiple WordPress themes at once. This is useful when you face compatibility issues or have similar problems on your website and have more than one theme installed.

To update several themes at once, on your dashboard, go to the Updates section and scroll to the Themes section. You will see all the themes that have an update available. Select the themes you want to update or check the Select All option if you want to update all the themes and then press Update Themes.

update multiple themes update wordpress theme

That’s it! All your themes on your website will be updated to the latest version.

2.  Update WordPress Theme Manually

While you can easily update your WordPress theme from your dashboard, there are situations in which you may have to update it manually. For example, if you use a third-party theme on your site, you might need to update it manually. Similarly, if there’s any type of error while you are updating your theme from the dashboard, you may have to do it manually.

To update your theme manually, first, you need to go to the official website of the theme and download the latest version in .zip format. Since we are using the Divi theme, we will download the Divi .zip file.

After that, go to Appearance > Themes and click Add New.

Then, you need to upload the theme file here by pressing Upload Theme. You have to choose the file that you’ve recently downloaded from the theme website and upload it. After that, click Install Now and the theme will be installed on your website.

Since you are updating the theme, you’ll be asked whether you want to replace the new theme files with the existing theme file. To complete the update you will need to replace them.

NOTE: Keep in mind that this won’t replace the customization on your site as long as you’ve applied them to the child theme. However, if you’ve modified the theme files directly, the new version will overwrite all your changes.

After the installation is complete, Activate the theme and you’re done!

3. Update WordPress Theme with an FTP Client

Another option to update your theme is to use an FTP client. For this, you’ll need to connect your WordPress hosting with an FTP Client. You can get access to it by contacting your website owner or the hosting service provider.

Before you start, make sure you download the .zip file of the theme you want to upload from the official theme website. Then, extract it into a folder on your computer and you’re ready to start.

3.1. Connect your Hosting Account with an FTP Client

First, you need to open an FTP client like FileZilla, Cyberduck, or WinSCP to connect with your hosting account. For this demonstration, we’ll use FileZilla, but you can use any FTP client you like.

Then, open the FTP client and go to File > Site Manager. You can also use the shortcut Ctrl+S.

Click on the New Site button and enter the name of your website here.

In the General tab, you’ll need to enter the credentials provided by your hosting provider to connect with the FTP Client. Once you do that, press Connect.

You can now access and edit the files of your website using the FTP Client.

3.2. Upload and Activate the Theme to your Website

To add the theme file to your website, locate the theme file that you extracted earlier on your computer from the file explorer and locate the wp-content/themes/ folder in the FTP client. Then, drag the unzipped theme folder from the file explorer to the themes folder in the FTP client.

upload theme ftp update wordpress theme

The files will be uploaded to your website. Be patient as this can take a few minutes depending on the file size and your internet connection. Since you are updating the theme, you will need to replace the existing theme files with the new ones.

Finally, after the upload is complete, go to Appearance > Themes on your WordPress dashboard. You will be able to see the theme you just uploaded. Click Activate to start using the updated theme on your site.

These methods are quite easy but they overwrite the original files and make you lose your customization. Let’s see what you have to do to be able to update your theme without losing your changes.

Update WordPress Theme Without Losing Customization

As mentioned before, if you applied changes directly to your theme files, when you update your theme, the new files will overwrite the older ones and you’ll lose your changes. The good news is that there are ways to update a WordPress theme without losing any of your custom changes.

We will be changing the location of some theme files in this tutorial, so before we start, we recommend you backup your website. This way, you can go back to that version if anything goes wrong.

1. Create a Child Theme

Creating a child theme is one of the best ways to keep your theme customizations safe and avoid losing them when updating your theme.

There are two ways to do this. You can either use some of the best child theme plugins or create a child theme without using a plugin following this step-by-step guide.

The theme that you are going to update should be the parent theme. Make sure that you don’t activate the child theme yet. We will activate it at the end of the tutorial.

2. Download the Parent-Theme and its Updated Version

Now, you need to connect your website with an FTP client to download the parent theme files. Simply follow step 3.1. and locate your parent theme in the directory wp-content/themes/ using the FTP client. Then, download the parent theme file that you want to update on your computer.

This will also be the backup of your current version of the theme.

Similarly, you need to download the latest version of your theme from the official theme website and extract the .zip theme file on your computer.

Now you should have 3 theme files on your computer: the older version of the theme file, the latest version, and the child theme file.

3. Copy the Customizations to the Child Theme

Now, you can start adding the previous customizations of the parent theme to the child theme. For this, you need to make sure that you can identify all the changes that you have made on your parent theme.

If you’re not sure, you can use file comparison software like WinMerge. This tool allows you to compare the older version and the latest version of the theme files and easily identify the changes.

Just open the software and you will see all the changed files highlighted as shown below.

compare theme files update wordpress theme

Copy all the highlighted files and folders from the older version file to the newer version file except the functions.php and style.css files. Your theme child already has these two files, so you need to edit them differently.

Open and compare the functions.php file of both the older customized version and the newer version of the theme files. Then, copy the highlighted parts of the older version and paste them into the functions.php file of the child theme.

updated child theme update wordpress theme

Then, do the same with the style.css file.

4. Upload and Activate the Updated Files

Finally, after you have changed them, you can upload the updated theme files on your WordPress website. Locate the updated theme and the child theme files that you’ve just updated in the previous step.

Then, connect your website with the FTP client and locate the wp-content/themes folder. Here, you can upload the updated theme and the child theme files by simply dragging and dropping them.

updated theme files update wordpress theme

It will ask you whether to overwrite the existing theme file or not. Since you need to update the WordPress theme, you will need to replace the existing files. However, as you’ve previously moved your changes into the new theme, you’ll keep all the customization.

After the upload is complete, go to Appearance > Themes on your WordPress dashboard and Activate the child theme.

activate child theme update wordpress theme

That’s it! Your current WordPress theme is now updated and you didn’t lose any customization!

Conclusion

All in all, keeping your theme up-to-date is important to keep your site safe and enjoy the latest features. However, when you update your theme, the new files overwrite the older ones, so you lose all the custom changes you’ve made to your theme.

In this guide, we’ve seen different ways to update your WordPress theme:

  • From the WordPress dashboard
  • Manually
  • With an FTP Client

One thing to keep in mind is that if you have used custom codes on your core theme files, you might lose customizations if you update the theme. To prevent that, you can use a child theme to update your theme safely without losing any changes on the website.

We hope that this tutorial was useful and that you’ve learned to update the theme on your website. If you found this tutorial helpful, here are some more articles that might interest you:

Have you ever lost changes while updating your WordPress theme? What did you do? Let us know in the comments below.