update wordpress theme without losing customization

How To Update WordPress Theme Without Losing Customization [Guide]

When it comes to WordPress, the fact of how flexible and extensible it is when it comes to customization is mind-bending.

The possibilities truly are limited only by your imagination.

Along with working with your theme’s features, you can also take things a step further by customizing the source code.

However, what happens when an update for your WordPress theme becomes available? Will the new update contain all your customizations or simply erase them when you hit the “update” button?

Fortunately, this is the article that will cover it all in great detail for you. This way, you will never (again) run into any inconvenience. After all, no one wants to ruin their existing website, especially not when it has been operating flawlessly for a long time.

WordPress theme updates

wordpress theme updates

Thankfully, WordPress does a lot of work for you, automating things to save you time. That said, even when it comes to theme and plugin updates, you will see it appear in your dashboard when a new version of the tool is available.

After that, you just need to press one button, and that’s it.

Updates appear in your admin panel, under the Updates section. But this is for the plugins primarily.

Moreover, when it comes to new WordPress theme versions, you need to select Appearance from the left menu and then click Themes. This is where you will see if the update is already available.

But do you immediately go and hit the Update Now button? Not necessarily.

Of course, you should not just skip these updates, as it may damage the performance of your website. After all, new updates mean improvements across the entire theme, from performance to design.

How does WordPress theme update work?

how does wordpress theme update work

After you hit the Upload Now button, WordPress then installs the theme package for you, unzips it and replaces the old version with the new.

Yes, it is that simple.

However, if you have any customizations that you did manually, the update will override them – meaning, you lose them.

And that’s when this guide comes into play.

First, let’s talk about what updates stay safe and secure.

What’s safe

If you are working with what’s available directly from WordPress, then you are good to go.

wordpress customizations that you will not lose during theme update

This means live customizer tweaks, widgets, and navigation menus, different plugins that work in harmony with the theme itself and even page builder modifications – if this is the approach you took, you have nothing to worry about.

Not just that, but even if you used different plugins to add even more functions to your website and admin panel, that’s on the safe side.

What you will lose

While you can pretty much do what’s necessary with the mentioned above, you can always take things a step further with customizing the code.

However, any functions.php and style.css edits and adjustments you do, these will be lost with a WordPress theme update.

Luckily, instead of doing the work all over again, you can keep the changes and restore them upon the update.

Here’s how you do it.

Create a backup of your WordPress theme

Before you even think of doing anything, even when it comes to heavy tweaks, not just updates, you need to create a backup.

To do this flawlessly, connect to your hosting via an FTP client (you can use FileZilla for this).

Then, locate /wp-content/themes/ and download your theme to your computer.

That’s pretty much it regarding creating a backup.

Download the new theme and add customizations

This is considered the “hard work,” even though it will not take you much effort.

To make the WordPress theme update process go as smoothly as possible, you need to add all your customizations from the old theme to the new version.

Get the theme first by downloading the latest package from the official website. It will be in a zip file – extract it.

At this moment, you have both the old and the new version of the theme you are using.

You can be done doing the work really quickly if you remember the changes. In this case, just copy and paste them.

However, not always do you remember all the customization tweaks that you did. That’s when you will need to compare the two codes and find what’s different.

You can do it with a file comparison software (WinMerge – Windows, kaleidoscope – Mac or Meld – Linux).

With the software, you will quickly see the changes you made. Again, just copy and paste the code from the old to the new file and save it.

How easy was that?

Upload your new theme folder via FTP

With the new WordPress theme file all set and ready to go, connect to your website via the FTP like previously.

Find /wp-content/themes/ folder where you upload your new and updated theme version.

At this point, you will find a warning that the file with the same name already exists. Just overwrite it, as this will replace the old version with the new.

The update is now complete, and you have not lost any of your customizations. Head over to your website to see if all runs as smoothly as before the update.

Best practices on how to avoid losing customization during theme update

First, you can use a code snippets plugin, which allows you to store all your custom code changes safely. With that, you do not need to worry about losing them either you update your current theme or even using a new one.

Second, you can save CSS code under the live customizer’s “Additional CSS” tab.

best practices on how to avoid losing customization during theme update

Third, if you are tech-savvy and know how to create a child theme, that would be another approach that will help you keep all your customizations safe and secure.

There you have it, now you know how to update your WordPress theme without losing any customization.

We really appreciate you for visiting PremiumCoding and reading this article! Now you might also want to check out our Themes here.