Category: WordPress

17 Point Checklist to Successfully Switch Your WordPress Theme

One of the great things about WordPress is the ability to customize your Website by using Themes. WordPress themes provide much more control over the look and presentation of the content on your Website. A WordPress Theme is a collection of files to produce a graphical interface with an underlying unifying design for a Website. A Theme modifies the way the Website is displayed, without modifying the underlying software.

With WordPress, you can effortlessly and completely change the look and feel of your Website by changing themes. You can try out new themes right from the start, playing with different layouts and styles. A few weeks ago I added 2 more themes to my visitors to choose from (see Change Theme widget in the right sidebar) and I am working on a third theme for my users. I am sure many of you have also gone through the process of changing themes, and it can be frustrating because always the “devil is in the details”.

Therefore I decided to document the steps I took before switching themes. Below is my 17-point checklist that You MUST do before switching WordPress themes. These steps are critical to make sure the process goes smoothly. If you are thinking of changing your theme, remember the Checklist below — it can save you a lot of time and trouble.

When To Change Your WordPress Theme | Advantages of a New Theme

  • When you don´t like it anymore and when you think that your current theme is getting old and has its limitations.
  • New themes tend to have cleaner code and (hopefully) adhere to current coding standards.
  • New themes with better, leaner code can mean faster loading time.
  • New themes can integrate new WordPress functionality.
  • New themes can integrate more SEO functionality.

With all that said, I don´t think it is a good idea to change themes often. You could also give your visitors a choice from few set themes, like I did for this blog.

Check 1. Choose an Appropriate Theme

First things first. Selecting an appropriate theme is very important. The new theme should match the niche of your blog. Choose a theme that is user-friendly, optimized for SEO and usability, lightweight, loads fast, highly customizable and with many options.

Look for themes that are recently developed and continually maintained. Before you decide on a theme, test several ones first.

A new theme usually means new options and settings, so get familiar with the different options and settings available.

There is an (almost) endless choice of themes. For free themes I will start with WordPress Theme Directory and for paid ones I will start with the references below and you should also do a google search for WordPress themes.

Check 2. Complete Backup of Your WordPress Website

Rarely something will go wrong by just switching themes, but better safe than sorry. It is always a good idea to do a Complete backup of your WordPress Website (database and files), if you haven´t done so already and regularly. I wrote a great and detailed tutorial on how to do a Complete back up your WordPress Website listed in the reference below.

Always keep a backup copy of your old theme files. Just in case a unexpected problem arise with your new theme and you want to revert back.

Check 3. Take Notes (and Screenshots) of Your Current Theme

Before you switch to your new WordPress theme, go through your current theme files and take notes of all additional coding that you added. It is always a good idea to keep documentation of the changes you made on your current theme. Also take screenshots of your current theme and all the changes you made.

Check 4. Test Page Load Speed

Page loading time is critical for best user browsing experience to and keeping your visitors longer on your Website. What´s the point of having a new attractive theme only to find out that your traffic is down because of slow loading pages.

Use the references below to test the loading speed of different pages (and not just the homepage)for your new theme. You also want to check your current theme’s load time so that you have a basis to compare the two.

Check 5. Inspect Your Sidebar(s)

Make sure that your new theme is widget-ready. People make a lot of changes to their sidebars such as adding custom texts, images, links, advertisements, etc. If you are using widget-enabled WordPress theme this will not be an issue, because widgets are not affected when the theme is changed. But if you made changes manually you will have to redo them. Make sure all of your widgets are properly displayed and are working.

Check 6. Add your Analytics Code | Don’t Lose Tracking

Most bloggers use some sort of analytics (a tracking script) whether it is Google Analytics or other tracking services. This is usually done with a snippet of code found in the header or the footer of your theme. When you change your WordPress theme, the header and footer files will be overwritten, so you need to re-apply these code snippets. Make sure that you copy and paste your tracking code to your new theme. Otherwise your Website will no longer be tracked.

If you use an Analytics plugin for WordPress, then this step is not necessary.

Check 7. Watch your Footer and Header

Check your header (header.php) and footer (footer.php) files for other customizations that you might have done. And if so carry-over the changes to your new theme.

Check 8. Assess Which Plugins You Need | Test all Other Plugins

It is always best to keep your plugins at the absolute minimum. Every plugin may not be necessary or required for your new theme. So reassess your plugins and delete (and not just deactivate) the unwanted ones. You may also want to get rid of unnecessary plugins that the new theme includes by default. There are many things that you can do by custom coding your theme without the need of plugins as I discussed in my Plugin Killer tutorials.

After you have decided on the plugins that you want to keep, make sure that the remaining plugins are compatible with the new theme. Test your plugins to make sure that they are properly working.

Check 9. Watch For Your Ads | Check Third Party Services

Make sure that your Ads match with your new WordPress theme. If you have google AdSense or any other form of advertising. Make them look professional by making sure that the style and colors match your new theme.

Same applies for your Twitter, Facebook, Linkedin, Google+ and other Social buttons that you may have on your Website. Adjust those to fit the style of your new theme.

Check 10. Verify your RSS Feeds and Email Subscriptions

Because RSS feeds and Email subscriptions are important, verify that they are still working and functional. Make sure they are receiving your Website´s updates in a timely manner.

Check 11. Test for Broken Links

Changing your theme should NOT affect your links. However; since links are very crucial in any Website, and dead links show unprofessionalism. It doesn’t hurt to rectify for dead links. Use the W3C Link Checker below to check your links.

Check 12. Verify Your Images

If your images are located in your current theme´s folder, then you will need to transfer them to the new theme. Otherwise they will NOT be visible with the new theme switch.

Also check that the Favicon (if you have one) is visible.

For easier Website maintenance, all images that did not originally come with the theme should be stored in a folder outside of the theme´s folder. For instance you could create an uploads folder in wp-content folder and store your images by year and month.

Check 13. Test All Secondary Features, Functionality and Design

With the new theme, you need to make sure that you retain all your Website´s functionality. Check your Notes (and Screenshots) that you created in Check 3. If you haven’t done so already, add any and all functionality that you want to bring from the old theme into the new one. Test all features including but not limited to: commenting, single posts, menu items, custom page templates, search box, archives (by category, by month, etc), 404 page, contact forms, and any other custom coding that you added to the functions.php file like for example, if applicable: Breadcrumbs, related posts, pagination, tag clouds, etc.

Also migrate to the new theme any changes that you made to the old theme´s style.css file. Also tweak the design of the new theme (colors, fonts, etc.) by modifying the CSS file (style.css).

Also make sure that your Logo is visible in your new theme.

Check 14. Test Your Theme in Multiple Browsers

Don´t forget to test your new theme for cross-browser compatibility. At least check how your Website renders in major browsers: Internet Explorer, Mozilla Firefox, Google Chrome, safari and Opera. Make sure that your Website design, layout and functionality is not compromised in major browsers.

Check 15. Validate for HTML, CSS and Accessibility

Validation is the process of checking the code against formal guidelines published by the W3C. If valid code is important to you (and I hope it is), use the tools below to validate. There are many reasons to write valid code as I discussed in my previous post below. I understand that some validation errors and warnings are beyond your control like when you use third-party services or some attributes used in the core WordPress code, but at least fix what you have control of.

Check 16. Timing to Go Live

For the least disruption, it is best to switch to the new theme when there are the least visitors on your Website. Check your analytics, and make the switch at a time when your Website has typically low visitor´s traffic.

Check 17. Inform your Visitors and Improve

Make sure you tell your visitors that you have changed the design. Ask them for feedback. Visitors are viewing your Website from different devices and with different screen resolutions, browsers and setups. By letting your users know, you can expect to get few suggestions. See what improvements they like, and get them done.

How Best to Test Your New WordPress Theme

If you already have daily traffic to your blog, you don’t want your visitors to experience difficulties while theme change is being made. The best way to test your new theme is by either Creating a Theme Viewer as I discussed in details in my tutorial below, or follow the Test Driving WordPress tutorial below. In either case you can test the new theme without any fear or harm.

Your Turn to Talk

The advantage of my checklist is that it keeps you on track and not having to remember everything. By following this 17-step Checklist you can ensure a smooth transition to your new WordPress theme, with less interruption and frustration from your readers. Hopefully this checklist will be useful when you are executing a theme change.

This checklist may not provide a solution to every detail for your specific case, but it should be a good starting point.

How To Disable Self Pingbacks in WordPress Without a Plugin

How To Disable Self Pingbacks in WordPress Without a Plugin

By default, WordPress blog automatically send a pingback to itself any time you link to one of your own internal old post. It would be nice if this self-pingback feature can be turned off in the dashboard.

Self-pings, or pings within your own blog, are found useful by some, annoying by others. Those who find them useful feel that self-pingbacks is a good approach to increase inter-linking between posts.

You can stop self-pings if you wish. You can simply manually delete them once you get them in the WordPress dashboard, or you can use one of the 2 methods below to automatically disable self-pings to your own blog.

What are Pingbacks?

Pingbacks are automated cross referencing system between blogs. Pingbacks are designed that you receive a notification when another blog links to one of your posts. For more details, read my previous tutorial: Trackbacks and Pingbacks in WordPress.

What About a Plugin?

There are plugins that disable self pingbacks but you really don´t need a plugin for such a simple task. Also I encourage you to read my previous post about unnecessarily adding plugins to your theme. Personally, I am not a fan of plugins, I prefer to use a snippet of code instead.

How Self Pingbacks are Created

The best way to learn about self pingbacks is to create an internal link from one post to another on your blog. You will then find a pingback in your comment section.

If Comments are closed for an older post, and you linked to it from a newer post on the same blog, then self-pingbacks will not be sent by WordPress. This is the only case, that WordPress will not send self-pingbacks if you decide not to take action by choosing either of the methods below.

2 Methods to Disable Self Pingbacks

If you don´t want to get self-pingbacks on your blog, you have 2 choices to stop self pingbacks from showing up as comments on your posts. Either method is just fine.

METHOD1 | No Self-Pingbacks | functions.php

One way to disable self-pings is to add CODE-1 to your theme´s functions.php file. Open the functions.php file located in your theme´s folder, and add (copy and paste) the following CODE-1. Save the file and upload it to the server.

CODE-1 :: Method1 to disable Self Pingbacks

Note: To scroll within the code: You can also click on the code window and use your keyboard´s arrow keys.

<?php
/* No Self Pings */
//Pass the variable by reference to the function, so the function can modify the variable.
function no_self_ping (&$links) {
$home = get_option( 'home' );
foreach ( $links as $l => $link )
    //Find the position of the first occurrence of a substring in a string.
    //($a === $b) Identical operator. TRUE if $a is equal to $b, and they are of the same type.
    if ( 0 === strpos( $link, $home ) )
        //Unset the variable
        unset($links[$l]);
}
//Hooks the function to the specific action (pre_ping)
add_action( 'pre_ping', 'no_self_ping' );
?>

CODE-1 Notes:

Self pingbacks are now disabled. Source WordPress forum.

Some themes, or theme frameworks, have more variations of the functions.php file, so look at their documentation and see where best to add the code.

CODE-1 is tested to work on WordPress version 3.3.1

CODE-1 References:

  • get_option()
  • add_action()
  • strpos()
  • unset()
  • Passing by Reference

METHOD2 | No Self-Pingbacks | Use Relative Path for Links

Another option to avoid self pinging, is to use relative path for the links in your post instead of absolute path. In other words, Replace the absolute links of your internal posts with relative links.

//Replace the Absolute link of the internal post
<a href="https://bacsoftwareconsulting.com/wordpress-cat/tips-for-maximum-wordpress-performance-and-speed/">Absolute path</a> 
//With the following Relative link:
<a href="/index.php/wordpress-cat/tips-for-maximum-wordpress-performance-and-speed/" title="14 Tips ...">Relative Path</a>

Of course, relative Links in your case are most likely different than in my case. It all depends on the structure of your blog’s directory.

For more information on Absolute versus Relative Paths see tutorial1 and tutorial2.

General Warning

When you add several PHP code blocks in your theme´s funtions.php file, make sure that you do NOT leave any white space (spaces, newline) before the opening PHP tag (<?php) or after the closing PHP tag (?>). The correct way is as follows:

<?php 
//Some Code here beetween the opening PHP tag (above) 
//and the closing PHP tag (below)...
?>
<?php 
//Some other Code here ...
?>

In the above code, if you leave any white space or a newline between lines 4 and 5, you will get the following error: “Warning: Cannot modify header information – headers already sent by…”

Your Turn to Talk

You now have the choice to disable self-pingabcks, without a plugin, and keep WordPress blog from pinging itself.

Some bloggers like to use the self-pinging feature as they find it beneficial for better inter-linking between posts, which I understand their point. The majority of the time I tend to delete self-pingbacks.