7 Ways to Speed Up Your WordPress Blogby Christopher WensinkWordPress Tutorials & Tips 2 Comments
WordPress, has become the platform of choice for millions of domains across the Internet. From the 12 year old’s blog in a third world country, all the way up to being used by CNN, ESPN and many other main stream companies, WordPress has definitely surged ahead as the people’s choice.
According to the WordPress Wikipedia page, WordPress is being used by more than 14.7% of the top 1 Million Websites, and off all new websites that come online each year, 22% of those sites are being implemented using WordPress in some shape or form.
With 18,000 plugins and growing, hundreds, if not thousands of themes that a free and for profit, running and managing a WordPress site has become complex. With complexity of any site, the speed of the site tends to slow down. It’s not uncommon to see page load times creep past 10 seconds, which may become a death sentence in the world of the Internet. In this article we’re going to take a look at seven ways to speed up your WordPress blog.
Before Changing Things, Back It Up
A good first step before making any changes to your website is to back up your content. If you are familiar with an FTP client like CuteFTP or FileZilla, then download that client, and pull a copy of your WordPress site down to your local PC, so that if you change anything and it breaks the site, then you can revert back to the way things were.
If you don’t have access to an FTP, then the best thing to do is go into your WordPress theme, into the editor and copy the files you are about to edit into a draft of a post, and save it as a draft. What I typically do is name the post “backed up header.php (do not publish).” This applies to the header.php, footer.php or any other single page that you edit manually.
Now that you have a backup, let’s get optimizing!
1. Trim Down Plugins
One of the most simple things that you can do to speed up WordPress is to slim down the code base. Each plugin, widget, and customization that you implement inside of WordPress can cause your site build to run a little slower. To speed things up again, uninstall some of the least useful plugins.
I found a decent speed bump up after I uninstalled the “sexy bookmarks” plugin. There may be some others that are affecting your site performance. Try uninstalling a plugin that you don’t use as often, then measure your site performance for a day. Don’t forget to use a speed bench mark tool to track your progress, like the net section of the Firebug add-on for Firefox.
2. Get Your WordPress Header a Haircut
Joost de Valk is a web developer and SEO consultant that has written an excellent plugin called SEO for WordPress, and is often simply referred to as the “Yoast” plugin inside of the WordPress community. Here are a few tips that I implemented directly from Yoast’s suggestions:
Open up your WordPress theme, then browse out to the header.php file and change the character encoding to be standardized. Notice how in the tag below there’s a <?php reference then another php query for the content-type and for the character set. This bit of code can be changed to hard encode these values, because you wouldn’t ever want to change them. The End Optimized code would look like something like this:
The php references have changed to simply dir=”ltr”, content=”text/html” and charset=”UTF-8.” This process optimizes the theme because the page can be displayed while making 3 less database queries. HTML by itself will optimize and be displayed a lot faster than code that has to be pulled from a database.
Some other suggestions from Yoast to optimize your theme include:
- make your stylesheet URLs static
- make your pingback URL static
- make your feed URLs static
- you can remove the blog’s WordPress version
- make your blog’s name and tagline / description static
I personally have made my feed url static, but I haven’t done any of these other changes. Time will tell if this is a necessary step to keep things moving quickly.
3. Giving Your WordPress Footer a Pedacure
Just like optimizing the header to trim down the number of database queries that can happen, a wordpress footer can be optimized as well. Suggestions to optimize this part of the site include:
- Reduce or Eliminate the Extra Links in your Footer
- Set all site specific references to static html rather than php database entries
- Your Blog’s Name
- Your Blog’s RSS Feed URL
- Your Blog’s Comment’s Feed URL
- Your Blog’s Copyright Page
- Your Blog’s About Us Page Link
- Reduce the amount of Database Queries out of the Footer as much as possible
If you have some full width pages that your looking to eliminate distractions on, then turn off the footer all together for those pages.
4. Give Your Web Graphics Some Liposuction
The next thing to do is to review the pictures that are on your website, and reduce them in size as much as possible. This is where using a tool like Gimp or Photoshop Elements or even the fully blown photoshop can really help speed up your site. Use one of these tools to try to trim down your .jpg and .png file sizes to as small as you can get away with without eliminating the quality of the image. I generally won’t use a header graphic over 50KB in size.
5. Implement a Caching Plugin
If your not already using one, then install and use the W3 Caching plugin, or the super cache plugin for WordPress. A Caching plugin like this will create an HTML version of your site, and serve that out to each new visitor, which will load faster on each newer visitor’s browser because the database doesn’t have to be queried each time a visitor stops by.
You can play around with the details of each caching plugin, but either of the two that I mentioned will work just fine. This step takes about 10 minutes to implement and it can make a dramatic difference in page speed loading time.
6. Move Your Videos to a Third Party Hosting Service.
If you haven’t already done so, move any videos that you have on your server to a third party hosting service such as youtube or vimeo. One thing to NOT due, is compromise the integrity or quality of your videos by using a cheap video camcorder to make them.
I recommend using a good quality professional camcorder to create a good video for your business. For more information on the camcorder I recommend, read this ag-hmc40 review. One thing to be careful about is copyrighted content.
If your using commercial songs for background music on your videos, then it’s possible that your video could be banned from youtube, or the sound could be eliminated from the video. Ensure that you own the rights to every piece of the content that your publishing, and you won’t have any problems. Another thought is to look into using DRM free background music and images, to eliminate this hassle.
7. Test Your Site on Different Platforms
No matter what changes you implement, it’s important to test out different platforms and different operating systems. Your website will load differently on an older Pentium 4 Windows XP machine using Internet explorer 6, than it will load on Safari on Apple’s new quad core i7 mac book pro.
If you throw in the different combinations of using Windows 7, or Ubuntu Linux, or if your using a different browser such as Google Chrome or Mozilla Firefox, there’s hundreds of factors that can affect the compatibility and speed of your site. Be sure to test as many as combinations as you can in order to be as compatible to your audience as you can.
Google Analytics, Webmastertools and Page Speed
The final step that I recommend taking action on, is starting to use monitoring tools that can help with all aspects of optimizing your website. Take the time to set up an a Google Analytics account to track the source of your visitors. With Google Analytics you can also track the browser your visitors are using, the resolution that their using on their computer, the country and state that their visiting from, which helps you determine what language they speak, and many other details that can help you create an accurate visitor profile.
I also recommend setting up Google Webmastertools to check for any site errors that can affect performance factors, such as missing url’s or slow banner ads. One of the Tools that’s included with Webmastertools is the Page Speed. The Page Speed tool is a little utility that runs in a separate browser window that can be run on any single web page of your domain, to look at the kinds of objects that exist on the site, then offer recommendations on how to speed up the delivery of the website. Play with this tool, and implement a few of the changes that it suggests for your site and you will probably see a noticable difference in the speed of your site.
If you follow this process, backing up your site and implementing your speed changes one at a time, you will see a dramatic difference in the performance of your site.