Updating WordPress themes without losing customizations
One of the best things about making your website on WordPress is its customization options for themes and plugins. It allows you to add your code snippets, CSS styles, and plugins to align your page with your business and marketing needs. While it is easy to create your website and apply themes and customizations, it might become complicated when an update becomes available. Updating your articles from time to time helps in better organization and functioning, adds to the security levels, and corrects bugs. Apart from these, you could also avail the new features provided with the update. Hence, not updating your theme to the latest version is not a wise choice. Accordingly, this blog shall update your WordPress themes without losing any modifications and customizations applied to the same. Below are a few steps to preserve and restore your WordPress theme customizations while preparing yourself for the update.
1) Early preparation for the update:
While there are things you could do after the update, there are precautions and things you can take before the update and be prepared for it. Keep checking for the update on your dashboard in the updates section. You might also be able to see it in the form of a notification on the appearance and themes page. An update overwrites the older files with the newer ones. You might lose the custom codes added to your site manually. Hence, saving the change and taking precautions becomes necessary to keep yourself from unwanted trouble. You will likely lose the customizations, including the codes added to the function.php file or any direct changes to the theme’s stylesheet. To save these, connect to your WordPress hosting through an FTP client. Then, download your theme folder to your computer, and let this be a backup of your theme to add the customizations later.
2) Move the customizations to the updated theme:
Visit the main website of your theme and download the latest version available. After downloading the theme package, unzip, and extract it. Copy-paste your code snippets from your older theme to the newly downloaded theme. You might compare both the theme files to understand the changes and edit them better. Use comparison software for the same. Ideally, WordPress looks for all the files in the child theme first, and if not found, loads the same from the parent theme. The child theme is where all the customizations are stored, and when the theme provider updates the theme, it is the parent theme that gets updated. Child theme customizations, usually created by the customization developers or site owners, could also be wrapped up in a quality plugin.
3) Uploading the new theme folder:
After adding the changes to the new theme, it is ready to be launched. Connect to your website using the FTP client and go to wp/content/themes/folder. Chose the folder with the new theme and update your website. You might be warned about a few existing files, but choose strong overwrite to replace all your old files with the new ones. This way, you have now updated your website with the more recent theme version. You might as well reload the website to see how the changes look.
You could also avoid losing your customizations while the update is as follows:
- Creating a child theme is one of the best solutions to safeguard your customizations, code snippets, CSS styling, and plugins. Add all of the custom code in the child theme. You could safely add or edit custom code snippets and update your theme without worrying.
- There is also a CSS tab available- “Additional CSS” for you to save your theme customizer’s CSS code.
- Besides that, you could use powerful plugins available to customize the styles without using or doing any coding.
If you are looking for HTML to WordPress professionals, Helpbot is your ideal place. We are a team of efficient WordPress developers who offer the best WordPress services to our clients.