How to speed up my WordPress Website

With many of the WordPress.org forums filled up with questions from website owners asking How can I speed up my WordPress website I have decided to share some simple tips and tricks.

Without doubt one of the single most biggest issues come from the images used on your website. A couple of months back I had a client come back to me complaining that her site had come to an almost standstill.

A quick look under the bonnet of her WordPress control panel and I soon discovered the issue. There had been sixty plus high resolution photographs uploaded which were all in excess of 5MB each and of which 20 had been allocated to the home page alone inside a gallery plugin causing the standstill.

There are some great websites available help you resize images with ease. For bulk resizing I always use www.picresize.com – Its quick and simple to use and in a matter of a couple of minutes you can reduce the size of fifty images by 75%.

 

Speed test your WordPress site

Run your Website through a speed test and get a diagnostics report from this site www.gtmetrix.com and go through the recommendations steps one at a time.

I guaranteed that the major issues that GTmetrix will show up will be website caching, optimize images for size and add some rules to your .htaccess file.

 

1. WP Super Cache Plugin

Ok, lets tackle the first issue. In your plugins section in your WordPress admin panel >> Add new >> WP Super Cache (alternatively if you prefer to install through FTP then heres the link to the plugin page Click here for WP Super Cache

Once installed follow the instructions below to create the perfect settings:-

Step 1. Set General Settings

On “Advanced” tab:

When selecting between “Use mod_rewrite to serve cache files” and “304 Not Modified browser caching” please note that 304 Not Modified browser caching will not be selectable as long as you have Use mod_rewrite in use.

You will need to use one or the other as recent updates to the WP Super Cache Plugin have made the use of both un-accessible at this time.

How can I speed up my WordPress Website

  • Check box next to “Cache hits to this website…”
  • Select button next to “Use mod_rewrite to serve cache files”
  • Check box next to “Compress Pages”
  • Check box next to “304 Not Modified browser caching”
  • Check box next to “Don’t cache pages for known users”
  • “Cache rebuild” & “Extra homepage checks” should already be checked, leave them that way.
  • Select “Update Status” button.

 

Step 2. Set Mod_Rewrite Rules

Then, scroll down and select “Update Mod_Rewrite Rules” in the yellow box.

Update Mod_Rewrite Rules

 

Step 3. Set Garbage Collection

Scroll down to “Expiry Time & Garbage Collection” and enter “3600” in the box, then select “Change Expiration”
Expiry time and garbage collection

 

Step 4. Set Rejected User Agents

It is recommended that you do not remove the default user agents from the list, to prevent bots from caching content and pages not normally seen by your visitors.

Set rjected user agents

 

 

2. Leverage Browser Caching

If you have access to your .HTACCESS file then its a pretty simple to leverage browser caching.

Download and open your .HTACCESS file in your editor of choice and add the code below inside the file.

Save it and re-upload to your server via FTP. (Always make a copy of your original HTACCESS code just in case something goes wrong and you can easily upload your original file back up to your server)

 

Add this code to your .HTACCESS file to Leverage Browser Caching

<IfModule mod_expires.c>

# Enable expirations
ExpiresActive On

# Default directive
ExpiresDefault “access plus 1 month”

# My favicon
ExpiresByType image/x-icon “access plus 1 year”

# Images
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”

# CSS
ExpiresByType text/css “access 1 month”

# Javascript
ExpiresByType application/javascript “access plus 1 year”

</IfModule>

 

3. Evaluate and optimize your images

Following all of the steps above will be worthless if you want me to provide the answer to “How can I speed up my WordPress Website” if you dont work on reducing the file size of your images.

Remember to use www.picresize.com for a quick solution but if you are able to use Photoshop, Fireworks etc. then why not optimize your png files with zero transparency or reduce the file size of your JPEG’s by using a lower quality through optimization.

And finally, dont forget to tell the browser what size your images are by adding width and height dimensions, i.e. width=” ” and height=” ”

 

Leave a Reply