Hosting Tutorial & Guide

How to Update a WordPress Theme Without Losing Customization

updated on Jun 18, 2015
How to Update a WordPress Theme Without Losing Customization There are multiple ways for updating a WordPress theme to a newer version. If you haven't made a customization to the theme or have been using a child theme for customization, you can simply perform automatic updates in the WordPress dashboard. However, if you once modified the original files, things can be more complicated.

That's exactly what we would like to discuss now – to update a customized WordPress theme while keeping the customization unchanged. Follow the manual guide below to get the task completed safely.

Step 1: Back up the Theme Files & Database

The first and the most important thing is to make a copy of the theme files and back up your database. Even if there will be something wrong during the theme updating, you can have a chance to revert back without suffering data loss.

For the theme files, you can just download the theme folder from the server by using an FTP client or cPanel File Manager. The location of the folder should be /wp-content/themes/theme-name. If you want to download the files with File Manager, you need the follow the steps below as File Manager does not allow downloading folders directly.
  1. Compress the theme folder.
  2. Download the zipped file to your local computer, and then extract it locally.
  3. Delete the zipped file from the server.
Back up Theme Files

Step 2: Bring Your Customization to the Theme Files of the New Version

For this step, you have a lot of things to do. Accomplish the following tasks one by one.

Download the new theme files
Go to or your theme provider to download the zipped file of the new version of your theme. Then extract the file on your local computer.

Download New Theme Files

If you can remember all changes you have made in your old theme, you can edit the new theme files now to make the theme function like the old version. But if you have made too many customization or you just cannot remember what you changed, then you will need a file comparison program to help you locate the changes.

Download File Comparison Software
For Windows users, the best choice for comparing local files is WinMerge, a free but easy-to-use tool, and for Mac OS, it is Kaleidoscope. As this tutorial makes use of WinMerge, we downloaded and installed it.

Download File Comparison Software

Compare Theme Files and Make Customization
Run WinMerge, and then click on File > Open. In the new dialog box, select both the old theme folder and the new theme folder, and then start comparing.

Select Theme Folders

WinMerge will show a long list of files and the comparison results. From the list you can see which files in the two folders are the same and which ones are different.

File Comparison Results

For those files that are identified to be different, you can right-click to compare them. Now you can locate the differences between the files, and copy your custom code from the old file to the new one. This is somewhat time-consuming, but you should be careful enough and check all the different files to make sure that your customization have been added to the new theme completely.

Add Customization to the New Theme

After modifying the new theme files, remember to save them, and then compress the folder because you will need to upload it to your server.

Step 3: Upload New Theme Folder to the Server

Now you should upload the modified theme files to your server to complete the update. Before uploading, you need to check the folder name of the old version and the new version. If the names are the same, you have to rename the old folder or delete it. Also, do not forget to extract the file after it is uploaded.

Congratulations. You have gone through all tasks. Just visit your site to see whether everything is right.

Suggestions about Updating WordPress Themes

You should always keep the theme of your WordPress site up-to-date for enhanced features and increased security. The tips below can help you make the next update easier.
  • Use a child theme for customization. A child theme can save you much trouble in theme update because your custom code is not affected during the update.
  • Remember to make a new backup whenever you have made changes to the theme files.