How to Successfully Switch Your WordPress Theme Without Throwing Your Computer Through the Window
Published September 5th, 2007 in WordPress
A few weeks ago I re-designed this website, which meant also re-designing the WordPress theme. I’m sure many of you have also gone through the process of changing themes, and it can be quite frustrating. Fortunately, I had some experience with this process on a smaller blog before, so I was prepared for the potential headaches and had some ideas about avoiding them this time around.
I decided to document the steps I took so that they can (hopefully) help some of you when you are in the same situation. If you are thinking about changing your theme in the future, remember the items below – they can save you a lot of time and trouble.
1. Set Up a Test Blog
If you have any amount of daily traffic to your blog, you don’t want your visitors to experience difficulties while the changes are being made. A test blog is crucial because it will let you test the new them in a real world environment without any fear or harm. Many of the other steps discussed below will be based on the fact that you have a test blog set up.
To set up the test blog, I created a separate folder and installed a new WordPress blog. If your web hosting company provides a simple WordPress installation, this process only takes a few minutes.
In order to prevent search engines from indexing anything in the test blog I added it to my robots.txt file. Additionally, I deactivated the pinging feature in WordPress so that no search engines would be notified when I added a test post. If you wanted to, you could also use a password-protected folder on your site to prevent unwanted visitors.
2. Change the Theme of the Test Blog
At this point you’ll want to change the theme of your test blog to whichever theme you plan to use on your main blog. In my case, I designed the new theme in the test blog. If you are creating a custom theme you will probably want to do the same.
3. Enter Test Posts
Once you have the test blog set up, enter some test posts. Use ordered lists, unordered lists, images, blockquotes, links (without trackbacks if you’re using external links), and whatever else you plan to use in your real posts. Check everything to make sure it looks the way you want visitors to see it. Be sure to test it in multiple browsers.
4. Test the Page Load Speed
The page load time is very important if you want to keep visitors on your blog. We’ve all been to very slow loading websites that have caused us to leave and go somewhere else. It would be a shame to set up a great new, attractive theme only to find out that your traffic is down because of slow loading pages. Use the page load speed tester from Self SEO to compare pages on your test blog to pages on your real blog (which is still using your current/old theme). If you’re having problems with the load time, see our article Designing Pages to Load Quickly.
5. Add Your Analytics Code
If you want your new theme to track visitors when it goes live make sure you remember to add the analytics code (most likely in the footer). I did this early in the testing process just to be certain that I wouldn’t forget it by waiting till the last minute.
6. Change Your Feed URL
Most WordPress users are also using FeedBurner to publish their RSS feeds. If this is the case, make sure you change the links on the new theme to point towards the URL of your FeedBurner feed (by default they won’t be).
7. Make Changes to single.php
Many WordPress users, including me, use some type of edited single.php (the file that determines how your individual blog posts look). Personally, I use a small message at the top of the post to encourage readers to subscribe to the RSS feed, and at the bottom of the post I have some links for StumbleUpon and del.icio.us. If your current theme has had similar changes made to single.php you will need to edit the single.php file of the new theme.
8. Set Your Templates for Excerpts (if you want to use excerpts)
Another thing to remember is that your new theme will not reflect the changes you have made to your current theme regarding excerpts and full posts. Almost all blogs use excerpts on category pages (partly for SEO purposes), and many use them on the front page of the blog.
9. Make Changes to Your Sidebar
Your new theme will probably have a generic sidebar that you’ll want to make changes to. If you want the sidebar of your new theme to be the same or very similar to the sidebar on your existing theme, you can just copy and paste the sidebar.php file into the new theme and test it from there.
10. Transfer Your Images
If your images are contained in a file inside your current theme you will need to transfer them to the new theme, or they won’t be visible after you make the change. I keep almost all of my images in a folder outside of the theme so this doesn’t cause a problem for future changes.
11. Consider the Timing of Going Live
I switched over to my new theme at a time when I new the least visitors would be on my blog, late on a Friday night. That way any potential problems would cause less harm. If possible, make these changes at a time when your blog typically has lower amounts of traffic, or at a time when you would be able to fix any bugs without being in a rush.
11. Go Live
Once you have tested everything and you’re satisfied with the look and functionality of the test blog, it’s time to switch your main blog over to the new theme.
12. Keep the Old Theme
Just in case any unexpected major problems arise in the first few days, it’s good to still have the old theme as a backup option. Depending on the problem, you may be better off to switch back to the old theme temporarily while you make the necessary changes.
13. Test for Dead Links
Changing your theme shouldn’t affect your links, but it doesn’t hurt to check to make sure that they are still working. Use a tool like Dead-Links.com.
14. Validate the HTML and CSS (if you care)
Some people validate and some don’t. If valid code is important to you, use the W3C tools for validating HTML and CSS.
15. Check Your Plugins
Sometimes changes to your theme can cause problems for your plugins. Most likely this won’t be an issue, but it’s still a good idea to check them.
Following these steps I was able to change my theme with no problems at all. Hopefully these steps will be useful for you when you are planning and executing a change in themes.



53 Responses
This is a great post. I will probably mention it on my blog in the near future!
After my post yesterday on changing themes, and the headache what should have been a simple job brought – I downloaded Xampp and started to make changes locally. My computer didn’t quite reach the window, but it wasn’t far off.
You’ve made some very valuable points here. I’m sure this article will help many others – I for one will take note. Thank you so much.
I get around the theme changing problem by using ExpressionEngine : )
Though, I do understand that WordPress is a much better platform for those who aren’t developers and aren’t code-happy.
Also, a lot of these tips are common to any platform. For example, dead links are bad no matter what.
Thanks for the article,
– Mason Hipp
Pat,
Thanks for your comment. That would be great if you mention this post in your blog!
Sus,
I’m glad that your computer never reached the window. Thanks for reading.
Mason,
I don’t have any experience with Expression Engine, but recently I was reading something that made me want to look into it. True, a lot of the points aren’t specific to WordPress.
As usual, another great post. Switching themes definitely isn’t fun, and I even think that and all I’ve ever done is used a theme that was already made. If I had to make my own, I don’t know what I would do. Thanks to your post though, the process wouldn’t turn out to give such a major migraine.
Thanks for sharing.
I changed my theme a month ago. Now, I’m thinking of changing it again. Probably re-design it.
I’m trying to change my blogspot theme, plus my picture is like 20 years out of date, can you help?
Tay,
Thanks for your comment. If you’re switch only involves themes that haven’t been customized the change is not as bad. The process of changing custom themes wasn’t too bad for me, but I put in the time to plan everything and cover all the necessities.
Felix,
Is there any particular reason you want to change your theme again so quickly? Just curious.
playing the role of Madame,
I really don’t know much about blogspot. Sorry I can’t be of much help. If you’re ever looking to switch to WordPress I’ve got plenty of resources for you.
I never changed a theme of my wordpress, don’t know how frustrating it can be. Though I will remember your tips when I will have to do it.
i have always faced problems with my blog while changing themes .Thanks for a wonderful post , now i will be able to change the theme of my blog in a proper manner .
Thanks for the tips on testing your page load time, I’ll refer to your post when I change my theme.
I am curious about one thing…is there a reason that you set up a separate dir off of your live site to test your new design as opposed to running it on your localhost? Does it have to do with testing your page load time?
Madhur,
Thanks for your comment, I hope this information helps you.
JoLynn,
No, it doesn’t necessarily have to do with load time (although it’s nice to know how it really is loading live). I just found that method to be easier. I do a good bit of work on themes for myself and for clients, so the test folder comes in handy.
Thanks for this great guide. This kind of thing has really been a nuiscance to me many times.
Very exhaustive and well written, as always!
Gets my vote for the contest at bluejar
Might I add in regards to point 6 that Feedsmith is a very helpful plugin to convert any RSS link to point to Feedburner’s?
Thanks, I was just curious about that.
Karthik,
Thanks for the support in the contest!
I think that method is a waste of time when you can just install the theme test drive wordpress plugin to test your theme as administrator. You can test all you want and nobody but you will see the new theme you are testing.
This is a perfect example of why I use (and will continue to use) b2evolution. When you switch skins, even the little code edits you made stay because they have their own widget containers which migrate nicely. Only now am I starting to realize how nice the newer versions of b2evo are
Hi there, thank you for this – very valuable for me, as I’m about to try switching themes. I’m curious about one thing, though – how exactly did you go about switching your theme from your test blog (which is presumably under a different URL) to the main blog? Thanks in advance.
I like a lot your article, thanks!
Great guide man!
Thanks for this great guide. This kind of thing has really been a nuiscance to me many times.
This is a highly useful post for me, am planning to change the theme of my blog in the near future. thanks!
WordPress is a stable platform for publishing any thing. switching of themes also makes it more catchy and the product published.
Thank you. I did all the things that you said and switched my theme without problems. Your blog is the best!
Good god, i thought this would be a simple “hey this other theme looks cooler” thing that would take a mere few minutes. Thanks for the how to, though it sounds like i might still throw my computer through the window!
Very thoughtful article for all web siters’. Switching themes is like changing old clothes. It becomes a necessity when one gets bored with the older designs. Very helpful informations indeed.
Brilliant post, the idea of having a test blog makes so much sense rather messing about with the real thing