How to Update a WordPress Theme without Losing Customization

  |   New Stuff, Wordpress

By Editorial Staff

Download your existing WordPress theme

As a beginner, when you want to customize your WordPress theme, you simply paste code snippets directly into your theme files. This becomes a problem when a new update is released for your theme because updating a theme wipes out all customization. Recently one of our readers asked if it was possible to update a theme without losing the customization he made. In this article, we will show you how to update a WordPress theme without losing customization.

First thing you need to do is BACKUP.

Once you have the complete backup stored, connect to your website using an FTP client. Go to /wp-content/themes/ and download your theme folder to your computer.

Now visit your theme’s website and download the latest version of your theme. Locate theme’s zip file on your computer and extract it.

You should now have both, new version of the theme and your old customized theme on your computer. If you remember the changes you made to your theme, then simply copy and paste the code snippets from old theme to the new version.

On the other hand, if you do not remember the changes you made, then you will have to find them first.

The easiest way to do this is by comparing your theme files. You will need to use a file comparison software like WinMerge (kaleidoscope for Mac). Open both theme directories in WinMerge to compare them.

Opening theme directories

WinMerge will show you a list of files in both directories. It will indicate which files are not identical and which files are new.

Comparing theme files for changes

You can right click and select Compare to see the changes. Locate the customization you have added and carefully copy and paste them into your new theme.

Comparing changes in WinMerge

After copying your changes to the new theme, you need to upload the new theme directory to WordPress using FTP.

Your FTP client will warn you that the files with the same name already exist. You need to choose Overwrite to make sure that your old theme files are replaced by new files.

That’s all. You have successfully updated your WordPress theme. Visit your website to make sure that everything is working as expected.

Source: WP Beginner