How To Safely Change Your WordPress Theme
What’s in a theme? These days there’s a lot at stake. How to safely change your WordPress theme without damaging your SEO, messing up your analytics, and causing chaos for that once every 3 year change can be a challenging and nerve-wracking task. Come on admit it, yeah we have child themes, but in a pinch we all hack here and there when there a tweak or there is a need that seems too difficult to deal with in a child theme. Having just changed out my theme, here’s my guide to safely changing your WordPress theme.
Basic Preparation for a Change to your WordPress Theme
I host my own WordPress blog, which I’ve discussed in the past. Yeah – it can be a hassle, but the freedom (IMHO) is worth it. Keep in mind I’m also not seeking to make money with my blog. When hosting for yourself it is highly recommended to have a dev/test server that mirrors your production system as closely as possible. My local machine (my MBP) is an exact match except for the OS (macOS vs. Linux) and some of the hardware. The WordPress and Plugin configurations should match. PHP version is the next most important thing to match as close as possible. Less important is the web server and database version.
Once you have that working it is a good idea to make sure that you have a good handle on your current plugin configuration and what part of it is required for your current theme. What you want to do is get down to the very minimum of plugins that you need installed and then clearly know which ones can be removed when you switch to a new theme. This will help to reduce plugin collision, improve memory management, and optimize the performance of your blog considerably.
Make sure your dev/test server has a good set of representative post types and content, including galleries and lightboxes, and whatever you normally post so you can make sure that everything is working when you are testing.
Last step: you need to make sure you have all app identifiers (meta tags) that identify your site for Bing, Facebook, Yandex, etc. and then also have your GA script and codes.
Finding a New WordPress Theme
The next part is the hardest part – finding a new theme that you like, but that does not have 100s of hours of development time to get ready (unless that’s what you like to do). Basically the best approach I have found is:
- Troll WordPress.org for interesting themes
- Simply Google “best WordPress themes”
- Look at the most downloaded non-Auttomatic created themes on wordpress.org, figure out who made them, and then go look at their theme portfolio.
The last bullet I have found to be most effective. There are a ton of theme companies, but this will help you find the most prolific companies. Most of the really good theme companies will have “freebie” and “pro” versions of themes so you can try before you buy.
When you find something interesting, install it locally on your dev/test server. Then get hands on and try modifying it, configuring, and create a child theme to see if it is robust. I think also looking at the configuration options is key. Why code when you can configure? There are some basic things that a theme should support for configuration:
- Custom CSS should be configurable so that if you want to move the site title and description around you can do this easily.
- Colors and fonts should be configurable
- Adding JS scripts – everyone needs to add a GA script (yes you could do this in a child theme’s functions.php), but that’s a PITA. There should be an option in Customizer for this.
- Decent sidebar/layouts to switch from 0 to 1-2 sidebars for widgets.
- Ability to configure a footer and attributions block without crediting either WordPress or the theme creator. Hey, its my blog!
- I would also look at the source-code to see if it is well structured and properly commented.
Those are just the basics that a theme should have. You can gets loads more functionality with today’s themes, especially the commercial ones.
The last thing I really recommend is to get a caching plugin (if you won’t already have one) and extensively test the tools effect and compatibility with the
So you Found a WordPress Theme – What now?
You’ve got the theme of your dreams – nice. Spend time and make sure you can really configure/tweak/code it up the way you like on the local box. Double check that your hosted box has the same configuration. A lot of recent themes are much more PHP intensive so be sure that these php.ini parameters are matching and that they meet the theme author’s requirements:
Some themes allow you to export set of stuff and then import it. I’ve never found that to work well. What I’ve done is to make sure I’ve got a complete list of all the things to do and then wait for a slow period to make the changes. The first thing is to disable caching plugins. Then update theme and run thru your checklist of tweaks/updates. Once complete – view the source of your pages to ensure that your meta tags and GA identity are showing up in the code. Re-enable your caching plugins. Make sure that everything is working now. Browse all you cornerstone content to ensure that the most vital content is working.
The next thing to do is to check your page performance using Pingdom’s Page Test (or your company of choice) to see how your performance is looking. Ryte will also do a decent job at this. If all looks good there running tests on Google Webmaster’s Structured Data Analysis tools is a good idea to make sure all your tags are looking good. Facebook also has a good tool for making sure your Facebook configuration is good to go.
What About that “Oh crap” Moment?
The last bit of advice I have is that you should not remove or touch your previous theme. When all goes wrong you can switch back and no harm done. I suggest waiting at least a week before removing the theme and the plugins that you no longer need. You can deactivate the plugins, but do not uninstall them.
After about a week you should have enough traffic data, log files generated, and experience with the site to know if all is well. Then you can get rid of all the old stuff.