11 Ways to Make Your WordPress Site Faster and Leaner

Is your site slow? Does it it crawl at a glacial pace whenever you get some traffic? We’re living in a time when speed and performance are equated with professionalism. A painfully slow site can be downright embarrassing.

We’ve compiled a list of tips to help your site maintain a high level of performance. There are many things that you can do if your blog is sluggish, even if you’re using shared hosting. Most of these speed-boosting tips don’t even require a developer. Grab a cup of coffee and see how much faster you can make your WordPress site with just a couple of tweaks.

1. Enable gzip or zlib Compression

If you’re looking for a quick way to speed up your WordPress site without having to install any plugins or get your hands dirty, try compressing your site’s code. This can be done in two simple steps and oftentimes can result in your site running 3-4 times faster than before. Follow the instructions here:

Dramatically Speed Up WordPress/WPMU Load Times With This Simple Tip!

2. Install a Caching Plugin

Basic caching for WordPress involves taking the dynamic posts and pages and making them available as static files. When the static files are served to users it reduces the processing load on the server, especially during times of high traffic.

Depending on your hosting situation, there is a perfect caching option for you. If you select W3 Total Cache, you can knock out three or four of the performance tips in this list all in one plugin.
Find out more information about implementing caching here:

Maximize WordPress and BuddyPress Performance With W3 Total Cache

Speed Up WordPress on Shared or Cheap Hosting with Hyper Cache

3. Disable Post Revisions and Delete Post Revisions and their Meta Data

Post revisions can build up in your database and make it bulky.
If you have no reason to save post revisions, you can disable them entirely by adding this line to your wp-config.php file:

1
define('WP_POST_REVISIONS', FALSE);

You will still need to remove the old post revisions and their meta data from the database. You can do this by using phpMyAdmin. Run this simple query:

1
DELETE a,b,c FROM wp_posts a WHERE a.post_type = 'revision' LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id);

4. Automatically Empty the Trash

You can set WordPress to automatically empty the trash.
Simply add this line to your wp-config.php file.
The number refers to how many days between WordPress trash dumps:

1
define('EMPTY_TRASH_DAYS', 10 );

5. Compress Images

The WP Smush.it plugin will automatically optimize your images for you. It removes extra bytes within them that are unnecessary, without compromising the image quality. Smaller images mean a faster loading site. Find out more about using WP Smush.it from our article on the plugin:

How to Optimize WordPress Images Automatically Without Losing Quality

6. Optimize your Permalinks

Permalinks are very easy to change, but there are good permalink structures and there are bad ones. The codex is very clear about the fact that certain permalink structures could be harmful to your site. Poorly configured permalinks can bring your site to a crawl, especially if you have lots of posts and pages. For a full explanation of the do’s and don’ts of permalinks, check out our article:

The Best WordPress Permalink Structure For Scaling, Performance and SEO

7. Offload Images and Assets to CDN

A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. A site can often dramatically improve load performance by offloading static assets, such as images and javascript, to be served by a content delivery network. The W3 Total Cache plugin makes it easy to integrate your chosen CDN with WordPress.

8. Minify Your Scripts

Minify is a PHP 5 app that “combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers.” It sounds complicated, but you can do this quite easily with a plugin. WP Minify integrates Minify into your WordPress / BuddyPress site and in most cases will work right out of the box without any adjustments.

9. Optimize Database Tables

Get rid of overhead in your database by optimizing tables. Things start to build up in your database and a little housekeeping is necessary from time to time. You can accomplish this task by using plugins or by optimizing your tables the old-fashioned way directly through phpMyAdmin. A full overview of the process can be found in our tutorial:

WordPress Maintenance 101: How to Optimize and Repair Database Tables

10. Delete Pingbacks, Spam Comments and Unused Tags

There are a couple of quick queries you can run while cleaning up your database.

If you want to delete all pingbacks, run this one:

1
DELETE FROM wp_comments WHERE comment_type = 'pingback';

Here’s an easy way to delete all spam comments:

1
DELETE from wp_comments WHERE comment_approved = '0'LETE from wp_1_comments WHERE comment_approved = '0'

No need to keep unused tags around. Run this one to free up some more space:

1
SELECT * From wp_terms wt INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id WHERE wtt.taxonomy='post_tag' AND wtt.count=0;

11. Delete Unused Plugins and Remove Orphaned Options

It’s a good practice to go through and delete all of the plugins that you’re not using. Perhaps you tried some and they didn’t work out for you. You’ll want to delete the plugin files as well as clean out your options. Removing orphaned options from your database can easily be done by installing the Clean Options plugin.

If you’re having trouble finding out why your site is slow and don’t know which tips to implement, try using Google Webmaster Tools to diagnose your speed problems. Those results will help you to target your performance strategy towards the most-needed improvements.

Comments (22)

  1. Very impressed with this post. Being tech saavy is certainly required to understand some of it and we are. I will be using some of your great strategies to help optimize our clients’ blogs.

    Thanks again!

    Woody House
    Online Graphics USA and Canada

  2. Nice article, but in (1) it’s better to enable and configure Apache’s mod_deflate, not zlib (it’s a common mistake), and (7) is useless, it’s better to balance requests to your content across your own subdomains.
    To check your site for performance problems you can use http://siteloadtest.com

    BTW For this page siteloadtest works very slowly, there are VERY serious performance problems now.

  3. Hi,

    I recently searching for how to improve my word-press blog loading times. I find this amazing post where i find some great solutions tips. I will try to implement the above mentioned points in my word-press blog to speed-up my blog loading time.

    Thanks,

Participate