Update Theme work is very important to WordPress websites since updates will fix bugs, and errors, and also provide new features. However, you may face the problem of losing some or many customization options when updating the latest WordPress theme version. That is what you may not expect or even want to happen even a single time. In our article, we will introduce you to how to update WordPress themes but still keep the customizations.
Table of Contents
WordPress Theme Update: How It Works
Particularly, WordPress has a powerful system for installing updates for both WordPress themes and plugins. To be more specific, you can always check for new WordPress Theme Update by navigating to “Updates” in the left-side WordPress dashboard.
To check if an update is available, you should see a notification on the page “Themes” in the “Appearance” section.
If there is none of them, they are all up-to-date. In case you see one, you can click the “Update now” button beside the update notification. Then, the process will be automatic.
For all WordPress websites and users, updating WordPress themes is very important. As has been said before, the developers will fix bugs and errors that happened in the old version as well as offer new functionalities. After choosing to update, WordPress will download the theme online, unzip the theme file, delete the old files, and bring in the new ones. Afterward, the old theme’s files will be deleted. However, your old files will get disappeared if you just literally add the custom code to the new WordPress theme files. We will list some safe and not safe customization options when you Update Theme WordPress.
What You Won’t Lose
When setting up your WordPress theme, you will have the WordPress customizer that will help you keep the changes you made through this built-in widget. Hence, you can navigate to the “Appearance” and then the “Customize” page. Specifically, the theme customizer lets you make changes in your theme/plugins and save them in the WordPress database.
Also, your tools and navigating menus are out of change. On the other hand, mostly all themes come up with a companion plugin to add additional features to your themes. The changes you make in those companion themes won’t change or disappear when updating the theme. Besides, you can keep your changes if you customize WordPress with a WordPress page builder. In addition, anything you add to your site through plugins also stays safe such as contact forms, newsletter popups, Google Analytics, and more.
What You Will Lose
Particularly, you will lose all changes made directly to your WordPress themes in WordPress Theme Update. For instance, you add code to the file style.css (stylesheet file) and then these changes will be replaced when you make a theme update. Besides, the same thing will happen when you change the theme’s template.
Those are the changeable and unchangeable data when you update a WordPress theme. Now we will seek the answer to “How to Update WordPress Theme”.
Create a WordPress Child Theme
A child theme is a WordPress theme that will inherit all features of the parent theme. Moreover, you can always customize and change the child theme without changing your parent theme. Since then, you can update your WordPress parent theme without being worried about data and customization loss.
First, you will create a WordPress child theme for your theme. In case you haven’t known about child themes, you can read our tutorial about how to create a WordPress child theme. We won’t activate the child theme yet.
Download Your Theme Folders to Your Computer
You will continue the process by connecting your WordPress hosting account using an FTP client. When connected, you get to the folder /wp-content/themes/ and download the theme file to your PC. Then, you will use this as your theme’s backup data. Afterward, we will copy the customizations from this folder into the child theme folder. If you created a child theme using the plugin method in the previous section, then you should download its folder to your computer in the same way.
Now, download the theme update. Before that, remember to check and download the latest version of your theme to your PC. Next, you will find the theme’s zip file and unzip it.
Currently, you will have 3 theme folders on your PC: the old customized version, the new updated them version, and the child theme.
Copy the Customizations to the Child Theme
After downloading the files, you must clear all the changes you made before copying them to your child theme. Of course, comparing the old and new is the simplest way.
To do it, you should have a file comparing software for use. We recommend WinMerge for Windows, Kaleidoscope for Mac, and Meld for Linux. Then, open the software and drag the updated version on one side and the old version on the other side. After that, it will highlight the differences and additions between the old and new versions.
In the next move, you will paste the text at the bottom of your child theme’s functions.php file and click save changes. In case the file style.css is also customized, you will have to repeat the process with this file.
Upload the Update Files
Till this step, you can upload the updated theme and child theme to your website. First, you connect to your site with an FTP client and look for the folder /wp-content/themes/. Next, you will choose the updated theme folder and child theme folder and upload them to your site. You will receive a warning about the file duplication. Don’t worry since it only warns you about the existence of the file with the same name. Choose “Overwrite” to replace the old files with the new ones.
Importing the Theme Customizer Settings
We mentioned at the beginning of this article that any customizations made with the WordPress theme customizer are not stored in your theme, so they have not yet been added to the child theme. Now, we have to add them. We will take up a plugin to export the theme customizer settings from the parent themes to import into the child theme.
First of all, you must install and activate the customizer import/export plugin on both sides you want to import/export. Then, you have to export the theme customizer settings. If the parent theme is still active, you will navigate to “Themes” ->“Customize” ->“Customizing Export/Import”. Choose export and you will receive your customizer settings in a .dat file. Next, you must activate your child’s theme. After that, you need to return to the “Appearance” ->”Customize” page and click on the Export/Import panel.
You should click on the ‘Choose file’ button to select the file you exported earlier. You also need to check the box next to the “Download and import image files” option to import the header and other image files. To continue, you will choose “import” to start uploading. The plugin will now import the customizer settings from your export file. Once it is finished, you can preview your changes in the customizer and then click on the “Save and Publish” button to make those changes live.
After that, you have just moved all of your theme customizations to the child theme. Besides, you won’t need to repeat these steps anymore when updating.
That’s all about How to Update the WordPress Theme Manually. We hope you may find something useful after reading our article.
Contact us, ThimPress: