How to optimize and speed up your wordpress blog

→ Are you a new visitor? Please visit the page guidance for new visitors ←

How to optimize and speed up your wordpress blog Search engine optimization is a hard work, you almost always need to work on your website and renewing your website content. In all this, an important fact is the website speed load. It is known that a user will not wait for a website to load for more then 3-6 seconds, if you’re website loading has a higher time, something is definetely not good and needs to be checked/investigate. So how to optimize and speed up your wordpress blog?

What I decided to write here is about wordpress optimization and how you can speed your blog. There are a lot of tutorials and information on the internet about this, too, so it’s a little known topic. However, what I’m writing about is my own experience, nothing more, nothing less.

Installing a cache plugin on your wordpress installation

Ok so what is the first thing to do to optimeze your website speed ?

  • Install a cache plugin

Yes, this will speed up your website by more then 80%. What is actually doing, is creating static pages of your website pages and directly serve them without generating from the database.

WordPress stores your content in the database, if you have a high trafic website, you will obiosly, have a high number of queries to your database, thus the page load and your CPU usage will be higher, however caching the pages will reduce the number of queries to your database and significally speed up your website.

Since now, I used two major plugins that will do just this.

  1. W3 Total Cache
  2. WP Super Cache
Speed up wordpress

Credit for image: instantshift.com

There are probably a lot more that can be used, however these two plugins have been used by me and provided me with good results.

  • Reduce the number of plugins

Using  too many plugins will only create a website full of holes for hacker as well as slowing down your website. Do not keep any plugins you no longer need and always update your plugins to the latest versions. Try to use the minimum number of plugins that are actually needed. This will speed up your website and also reduce your CPU usage.

  • Using a CDN network

This is someting that’s recommended for busy website with very high traffic. There are a few CDNs that are free and some that need paid. The one I used so far are:

  1. Cloudflare
  2. MaxCDN
  3. Incapsula

I tested all 3 of them, the last 2 never had any issues, although MaxCDN is a paid service, I thought I should add it here since I’m still using it. Both will decrease the number of downloads from your server/website and will increase your website loading speed.

A CDN network is meant for caching / serving your website resources like CSS, TXT, images, JS etc. directly from the CDN server position more closely to the visitor.

CDN network

Credit for image: maxcdn.com

  • WordPress cronjob

This is the last bit that comes in my mind when optimizing wordpress. WordPress has a cron script that will run at a specific time when a visitor will access your website. But what happens if there are at least 20-30 or even more visitors connecting at the same time ?

The  cron script will run at that time for all the visitors that are connecting, so you will have 20-30 or even more php process starting at the same time to execut the cronjob. So let’s disable the cron and create a single “real” cronjob for this matter.

Add this line at the top of the file wp-config.php:

Next create a real cronjob with the following command:

And that is all. If I find anyhting else useful, I’ll be making a new article or add it here.

Speed website even more by using browser cache

Request an article ←