Where everyone can learn Design!

How to Successfully Switch Your WordPress Theme

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.

Leave A Reply

Your email address will not be published.