8 Things to Keep in Mind Before Changing Your WordPress Theme
Changing a website’s WordPress theme is a process that is quite common among all WordPress users. However, even though this process, on the surface, is as simple as uploading a new theme and pressing the Activate button, it can have serious repercussions. Therefore, after choosing a new theme, there are a series of precautions you should take to avoid losing data or having parts of the website go missing. To help you with changing your WordPress theme, we created this article covering the things you should keep in mind before proceeding with the switch.
Before we start
Taking precautionary measures before changing your WordPress theme is crucial to avoiding compatibility issues, missing customizations, or similar problems. In the sections below, we will cover the eight most important things you should keep in mind to ensure your theme switch goes seamlessly. Carefully choose a new theme and follow the advice we shared below to make the process of changing your WordPress theme trouble-free.
Making a backup of your website
To avoid any compatibility issues during the process of changing your theme, you should make a full backup of your website before changing themes. You can do this by creating a backup manually or using a backup plugin. Whichever method you choose, having a backup will allow you to quickly restore your website to its previous state. This is particularly useful if you experience compatibility issues that you can’t solve with your newer theme or if you end up having second thoughts about the theme you picked and want to explore additional options.
If you’ve been using your current WordPress theme for a while, it’s likely you customized certain parts of it with custom code snippets. These snippets could be made by you, your developer, or were a solution that you found online and decided to add to your website. Once added to a website, these snippets blend in and over time, they can be forgotten or overlooked.
This is one of the reasons why it’s important to keep track of your custom code and add it to your website using proper methods. That way, it can still function properly once you decide to change or update your WordPress theme. To properly keep track of and preserve your custom code, you should avoid adding it directly to the template files of your current theme. Instead, if the code snippets you’re adding are in PHP or JS, you should put them either in the functions.php file of the corresponding child theme or add them to a site-specific plugin.
If you chose to add your custom code snippets to the functions.php file, you will need to transfer them into the functions.php file of your new theme. Essentially, you will need to copy the snippets from the functions.php of your current child theme and paste them into the functions.php file belonging to the child version of your new WordPress theme.
And, if you added snippets that were in CSS to your old theme, you can put them either in Appearance > Customize > Additional CSS or a site-specific plugin.
Properly storing all your custom code snippets will help you reduce the risk of losing any custom functionalities and features that you want to keep using with the new theme. But, as with most of the advice in this article, you will need to revisit this one after changing the theme. In this case, you will need to check the code compatibility with the new theme and make the necessary adjustments if the snippets cause any issues.
Investigating your plugins
One of the most important things to keep in mind is that a theme change requires a thorough investigation of any plugins you’re using, as well. Like some of our other steps in this article, this one needs to be performed both before and after changing your WordPress theme. The best way of doing that is to set up a staging site or a localhost environment, change your WordPress theme there, and observe the results.
This involves inspecting the compatibility of your newer theme with the plugins you’re using. If you find some of your plugins are incompatible with the new theme, you should disable them and try to solve the issue, if possible. Alternatively, you can search for a suitable replacement plugin.
One of the most important plugin types to keep in mind during the theme change is the page builder plugins. If you created your pages using a specific page builder plugin, you need to check the compatibility of that page builder with your new theme beforehand. That way, you’ll avoid any problems with your page display.
Apart from testing this compatibility in a staging environment, you could also consult the authors of your new theme regarding this matter.
You should also investigate the list of your current plugins to see if any of them are enabling a feature that is supported by your new theme, so you can remove those plugins and lighten up your server load. Furthermore, you’ll now be free to remove the plugins that were part of your previous theme. By that, we are referring to the companion plugins that are often included in premium WordPress themes. These plugins extend the original functionality of the theme, offering custom post types, shortcodes, widgets, and more. As these are directly tied to a given premium theme, they’ll have no purpose after you decide that you no longer want to use that theme on your website.
And if you notice that your new theme lacks some of the functionalities that you found useful in your previous one, you search for and install a suitable WordPress plugin that will provide you with that functionality.
Checking your widgets
Widgets are used to display the most important pieces of information on a website, such as subscription forms, social links, contact information, a carefully chosen list of your posts, etc. They are displayed in the most prominent places across your website—header, footer, or sidebar—and edited with relative ease. Because of this, you‘ll need to take special care of them when changing your theme.
First of all, if you were previously using a widget-ready theme, you should look for a widget-ready theme to switch to, so that you wouldn’t lose any of the widget data you added to your site. But, even if you preserve the data, this doesn’t mean the structure of your widget areas will stay intact after changing the theme.
You should be aware that different themes use different widget areas. This is both true for the registration of those widget areas, as well as for their display in different locations across your website. As such, before changing your theme, you should note down all the active widget areas and widgets that you have, both in the frontend and backend. The simplest way of doing this is by taking screenshots.
There are several reasons why you should note down which widgets and widget areas you’ve been using. Firstly, after changing your WordPress theme, any widget areas that are not registered using the same name will be hidden. The widgets that were placed within those areas will be moved into the Inactive Sidebar section, in the bottom left corner of the Appearance > Widgets screen.
If you have an overview of how your widgets were arranged before the theme change, you could drag them from the Inactive Sidebar section into the appropriate widget areas of your new theme. Additionally, you’ll be able to compare the visuals of the widget areas before and after the change and adjust for any display issues that may occur.
Please note that any theme-specific widgets you might have used won’t be available once you change your WordPress theme. To replace them, you can investigate your new theme’s widget selection or consider a third-party plugin that will offer the same functionality.
Finally, having screenshots of your widgets will help you keep track of any custom widgets that you created and used on your website. The same applies to any custom shortcodes that you might have used in your widget areas. To keep those working, you will need to make sure your custom code was inserted properly, as we described in the section on keeping track of your custom code.
Copying the tracking code
Another piece of custom code you should pay special attention to is your tracking code, whether it’s for analytics or AdSense. In case you aren’t familiar with it already, the analytics code helps you understand the demographics of your visitors, the popularity of your pages, bounce rates, etc. The AdSense code allows you to serve targeted ads to your audience that generate revenue on a per-click or per-impression basis. Both types of code are crucial for a WordPress website and should be taken care of properly.
Some users opt to include this code directly inside the header.php file, or an equivalent template file of their current theme. We don’t advise using this approach, as it can make the code easy to overlook, and keeping it there isn’t safe against theme updates, let alone theme changes. If you are among those who have used the manual approach in the past, you should make sure to copy the tracking code from where you kept it and paste it inside an appropriate plugin for adding such code. This approach is more frequently recommended as it will ensure that your tracking code isn’t lost after you change your WordPress theme. For more details on how to do this, you can take a look at the plugin solution mentioned in our article on adding AdSense to your WordPress website.
Testing website load time
Website load time plays a large role in user experience and impacts your SEO results, as well. As such, when looking for a new theme, you should strive to find one that provides as low a page load time as possible. Therefore, another thing you should do before changing your theme is to test your website speed using an online tool like GTmetrix or Pingdom. Then, you’ll need to repeat the process after changing your WordPress theme to properly compare load speed results.
The goal is to have a newer theme with a lower load time than the old one. For more accurate results, we advise cross-referencing the load time of your homepage and several inner pages while having the respective themes enabled.
Cross-browser and device compatibility
Different parts of your WordPress theme can display differently across various browsers. To avoid any unpleasant surprises later on, you should inspect the display of your new theme using a variety of different browsers before proceeding with the change. Your new theme’s design should display correctly and smoothly on all of them, without breaking in any of the browsers you check. Also, make sure to use various devices when testing the display of your new theme, starting from mobile.
Enabling maintenance mode
After changing your WordPress theme, your website’s design might alter significantly, which could lead to issues arising with certain components. Of course, you will need to solve these issues as soon as you see them. To help you with that, we suggest enabling maintenance mode on your website before changing themes and keeping it that way until the issues are solved. The reason for it is simple—to prevent your visitors from thinking your website is broken.
Putting your website into maintenance mode before solving any issues or doing major changes to it is a good habit to form. The easiest way of doing so is by using WordPress plugins that provide a maintenance or under-construction screen.
On the same note, you shouldn’t leave your visitors without an explanation as to why your website is suddenly down. Try to include a custom message on the maintenance screen that explains the process you are undertaking and reassure them that the website will be live shortly.
Final Thoughts
If you have had a WordPress website for quite a while, switching its theme can seem daunting as there are a lot of unexpected issues that could arise. It’s important to take the necessary precautions to avoid such problems or reduce them to a minimum if they can’t be avoided. Carefully follow the advice we covered in this article, and you should be able to do just that.
When you’re ready to change your WordPress theme, don’t forget to revisit the steps we outlined here, as most of them are applicable after changing your theme, as well. And, when the switch is done, you can ask your audience for feedback on your website’s new look and things they’d like to see you improve to gather ideas for future changes.