20 ways to speed up WordPress

Everyone is in a rush and everything needs to be delivered yesterday, including your website content!

So if you want your WordPress site to be the fastest gun in the west.

or you just have nothing better to do this weekend.Richard Russell
why not speed up your slugish wordpress site of yours:

  • so you can show off to your nerdy mates (we all have one somewhere);-)
  • or better still give your site visitors a more pleasing user experience (UX):-)

There’s my list of 20 fixes you can do today to speed up your existing WordPress site.

I’ve listed them in order of ease. The simplest being first.

Cut the number post revisions stored in the database. 

You may or may not have noticed that:

If you write posts and pages directly into WordPress as drafts proir to publication WordPress saves a copy whenever you hit that update button.

Left unchecked WordPress will store every single one of these drafts, forever!

So what!

Well, over a period of time you would end up with a huge unwieldly database for WordPress (and more importantly visitors) to deal with.

You might need a couple of revisions just in case you make a mistake.

Not 30 or so that is just plain crazy!

Revisons plugin
Simply to configure

SO: get yourself a revisons plugin

Click Plugins > Add New > Search “Revisions”

and take your pick.

PHP

Disable revisions completely.

This is for those that are comfortable with getting your hands dirty and happy to change php code.

To disable Post Revisions, (access to your hosting is required for this).

Add: define(‘WP_POST_REVISIONS’, false); into wp-config.php

If the above means nothing to you – not to worry – just use the plugin version.

 

 

Turn off Pingbacks and Trackbacks

Here’s another quick and easy one.

Click on > Settings > Discussion – Locate: Default Article Settings

pingback

Pingbacks and Trackbacks attract a lot of spammers……

It’s a shame to have to do this as this is a well intentioned idea, unfortunately not everyone using the internet is well intentioned so this will simply attract hordes of spammers.

3
Compressing Images

Apart from the fact that large image files contributes greatly to the sluggishness of a WordPress site, they also consume bandwidth too. Images are a good candidate for optimization.Using the free WPMU DEV WordPress Smush API, the WP SmushIt plugin will help you reduce the size of these images without compromising their quality. I use this plugin and find it amazing how much it reduces image sizes.

Optimise Images

This is done off-site using a programme such as Photoshop or GIMP. Ideally you just want your image to be the exact size that they need to be, so that there is no need for the server to resize a large image to fit into a small space. As it has to render (display) the image in it’s original size first. Usually this can be done Under the IMAGES section of the programme.

Optimise Images
Optimise Images

Select the smallest file size
Beware that different file types can vary greatly in size!
Beware that different file types can vary greatly in size!
Only load viewable images

Advanced lazy load.

Only loads images when coming into view.

Really effective if you have many many images.

A photographers portfolio

WARNING I FOUND IT DIDN@T WORK WITH PHP 5.2
See my PHP version post

Demo page Demo Page

Technical Bit.

Monitors images that are entering into the screen view and then adds the “src” attribute. Can be coded without use of plugin.

Caching
Allows your visitor to keep a copy of your site, close to hand, so that they can quickly grab it next time they visit. This cuts down on loading time consideribly.

There is a huge choice of caching plugins

I’ve gone for the one with the most reviews (always a good sign) and with a high rating of 4.5 stars (out of 5)

W3 Total Cache

 

Minify Scripts
(here are Minify options availlable with in W3 Total Cache, stand only plugin such as Wp Minify are available)

When us humans write the code and scripts for websites, spaces are required to make them readilble to the human eye.

Computers are not so fussy and can read code as one long string without spaces.

However the spaces that we need make the these files bigger as the complier has to move through the spaces looking for the next character.

So removing the spaces isa good idea.

So lets MINIFY with WP Minify

7
Minify Style Sheets

WP Mnify will shrink down the Javascript, CSS and HTML used in your WordPress site.

That’s 3 ways to speed up your site with one plugin. Meet me half way and allow to claim that as two!

8
Minify HTML
Minify Settings
Minify Settings

 

 

 

 

 

Compressing the site

so a zipped up version of your site downloads and is unziped. Sounds like a lot of work but iseffective.

In simple terms, site compression is like turning your entire site into a ZIP archive. And when any of the pages of the site is requested for, a client’s browser acts like WinRAR and unzips the archive and then show the contents. Even though this sounds like an extra work and would slow things down, trust me, it doesn’t.

Even though W3 Total Cache is well known for caching, it can also be used in site compression. You can enable this feature by going to: admin page -> Performance -> Browser Cache -> Enable HTTP (gzip) Compression.

Optimising your Home page

Home page is a great place to start.

9

Remove sign up forms

10

Remove Contact forms

11

use widgets sparingly

12

Emulate with html?

13

Relative Calls

Optimising Database

12
13

Remove Comments

14
15
JetPack Photon
16

Replace PHP with static HTML, when necessary

This one is a little bit advanced, but can drastically cut down your load time if you are desperate to include page load speeds, so I included it.

I’d be doing this great post injustice if I didn’t link to it for this topic, as it taught me how to easily do this myself, in a few minutes.

So go there and check it out, it wrote it out in plainer terms than I ever could!

WordPress often auto-saves almost everything. This includes: unwanted revisions, trackbacks, pingbacks, trashed items, unapproved comments, or comments marked as spam.

Just as your hard drive can become fragmented, your WordPress database can also suffer from a similar problem. However, you can use the WP-Optimize plugin to optimize your database, or WP-DB Manager which enables you to optimize your database and as well as schedule dates for regular database optimization.

17
18
19

Add an expires header to static resources

An Expires header is a way to specify a time far enough in the future so that the clients (browsers) don’t have to re-fetch any static content (such as css file, javascript, images etc).

This way can cut your load time significantly for your regular users.

You need to copy and paste the following code in your root .htaccess file:

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000

The above numbers are set for a month (in seconds), you can change them as you wish.

20

Optimize your homepage to load quickly

This isn’t one thing but really a few easy things that you can do to ensure that your homepage loads quickly, which probably is the most important part of your site because people will be landing there the most often.

Things that you can do include:

Show excerpts instead of full posts
Reduce the number of posts on the page (I like showing between 5-7)
Remove unnecessary sharing widgets from the home page (include them only in posts)
Remove inactive plugins and widgets that you don’t need
Keep in minimal! Readers are here for content, not 8,000 widgets on the homepage

Overall, a clean and focused homepage design will help your page not only look good, but load quicker as well.

Disabling

of Scripts

Positioning

15

Http Calls

15

Outsourcing Server

16

Good use of Plugins

Updating

 

Use a Content Delivery Network (CDN)

CloudFlare  or Nginx for example
CDN automatically caches your static files closer to your visitors while delivering your dynamic content directly from your web server.
This method reduces the number of hops (servers passing data) used to deliver your content to Sydney, Australia by haveing already availble on locally.
Only required if you wish to have a global reach.