Tutorials

How to update WordPress theme without losing customization

update WordPress theme

Looking for a way to update WordPress theme without losing customization? Here in this article, we will guide you to update a WordPress theme in a way that you won’t lose the customization.

Customization is one of the best things about WordPress. WordPress offers you easy customization features for everything you need. But if you made any customization in your theme file then the changes will not be available when you update the theme. Updating the theme is very necessary to get the latest features. But your customization will be gone after the update.

How does theme update work?

WordPress has the default tools to update the WordPress core as well as themes and plugins so that you can get the latest features easily. WordPress automatically checks all the updates and shows the update log on the Dashboard > Updates page. Here on this page, you can check all the available updates for WordPress core, themes, and plugins.

update WordPress theme

You can also see all plugins updates from the Plugins > Installed Plugins page. Similarly, you can see the theme update from the Appearance > Themes page. Using the update button you can update your themes and plugins with just a click. With every update, the author of the products add new features and fix bugs and errors. It also ensures better security. So updating is very important for your website.

When you click on the update button WordPress automatically downloads the zip file, unzips it, installs the update on your website, and replaces the old file with the new ones. So when you make any changes to your old theme file it will be overridden by the new file. So all of your customizations will be gone after the update.

Which customization you lose after the update

If you made any changes to your theme’s core file all will be gone. For example, you can add custom code to your function.php file to add new features. Similarly, you can add code on your themes’ style.css file to make changes to your website layouts. All these customizations will be gone as the old file will be overridden by the new update file. Similarly changes in the theme’s template file like index.php, footer.php will also not be available after the update.

Which customization you won’t lose after the update

All the changes you won’t lose after the update. WordPress has its own default theme customizer tools. You can access the theme customization tools from the Appearance > Customize page. Using the theme customizer tools you can modify your WordPress website and change the elements. WordPress will keep all these changes on its database, So the changes won’t be lost after updating the theme.update WordPress theme

Some popular themes also come with their own companion plugin to offer different customization features. So if you make any changes using the companion plugin those changes won’t be lost.

Update a WordPress theme without losing customization

Creating a child theme is the easiest solution to make your customization active after updating the theme. You can see this article to learn how to install a child theme in WordPress

Download the theme folder

To download the theme file you need to connect your WordPress website with an FTP client or Cpanel. Here we are connecting our website with Cpanel and going to the file manager option. You will see your theme file on the wp-content/themes folder. From this folder, you need to download your theme file to your computer. In Cpanel, you need to compress the folder and then the download option will be available.

update WordPress theme

Similarly, you need to download your child’s theme file on your computer too. After that, you need to download the updated version of your theme to your computer. After that unzip the file and now you have three theme files on your computer –

  1. Old theme file
  2. Child theme file
  3. Update theme file

Copy customization to the child theme

Your old theme file has all the customization you made on your website. You need to copy that customization on your child’s theme file. So you need to compare your old theme and new theme. For this, you need to use a comparison tool. There are different comparison tools available. Here we are using the kaleidoscope tools to compare our files.

Open the comparison tools and then drag the updated version of your theme on the left panel and the old file on the right panel. Now the tools will highlight the files that are added or changed. You need to copy the highlighted files except for the style.css & function.php file to your child theme file.

The child theme also has the style.css & function.php, so you need to copy the changes of your old theme style.css & function.php files. Paste them at the bottom of the child theme’s style.css & function.php files. Similarly if made any changes to other files then paste that too on your child theme’s file. When you are done don’t forget to save the file.

Upload the child theme and updated theme file

After copying your old theme changes on your child theme file you need to upload the child theme and update the theme file on your website. For this, you need to log in to your website using FTP or Cpanel and upload the updated theme and child theme file on the wp-content/themes folder.

It may show a notice that the file name already exists, you need to override that your updated theme file can replace the old file. Now you need to import your theme customizer settings. For this, we need to use a plugin to export customizer settings from the parent theme and import it on the child theme.

Install and activate the Customizer Export/Import plugin and then go to Appearance > Customize page to export settings. Here you will see a new option as Export/Import Make sure that your parent theme is active.

update WordPress theme

Click on the Export/Import option and then click on the Export button.

update WordPress theme

By clicking on the button the file will be downloaded to your computer. Now you need to activate your child theme from the Appearance > Themes pageAfter that again go to the Appearance > Customize > Export/Import page and click on the choose file button and select the file you just downloaded.

update WordPress theme

When the upload is complete you can see the changes in the preview. When everything is okay click on the Save & Publish button. Now all your customization will be stored on the child theme. So in the future, you don’t need to follow the process to update your parent theme.

Wrapping up

Following the process, you will be able to update a WordPress theme without losing customization. You can see our other articles to learn How to merge and bulk edit categories and tags in WordPress

How to properly rename categories in WordPress

How to remove additional information tab in WooCommerce

We hope this article will help you. If you like this article please like our Facebook Page to stay connected.

You Might Also Like