...

How to Update a WordPress Theme without Losing Customization

167

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.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

First thing you need to do is connect to your website using an FTP client. Go to /wp-content/themes/ and download your theme folder to your computer.

Download your existing WordPress theme

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, Meld for Linux). 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.

Making Theme Updates Easier by Using Child Themes

Now that you have successfully updated your theme, it is time for you to learn how to properly customize your theme. It is always a best practice to use a child theme for all your customization. Here is a step by step guide on how to create a WordPress child theme.

Using a child theme makes it easier for you to update the parent theme. Your changes will remain untouched during the update, and you will not have to go through this lengthy process again. See all the pros and cons of using a WordPress child theme.

We hope this article helped you update your WordPress theme without losing customization. If you come across any issues, then check out our guide on most common WordPress errors and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.