Every WordPress user wants to know how to get their website to load fast. I would like to tell you that it is indeed very easy to achieve this. To speed up your WordPress website you should use cache plugin named W3 Total Cache, which caches every aspect of your website, and reduces its loading time.
Before installing W3 Total Cache make sure to deactivate all other Cache Plugins. This will allow W3 Cache to work properly and gives you the best result. To install it, go to Plugins > Add New section in your dashboard. Search for W3 Total Cache and you should see it in the result. Finally click the Install Now button and then activate it.
W3 Total provides a number of Cache options and settings. We will discuss these settings one by one in our section below.
After activating W3 Cache, go to Performance > General Settings to enable different cache options. These are Page Cache, Minify, Database Cache, Object Cache and Browser Cache.
In WordPress, a page/post/product is made up of Static and Dynamic parts. Static part comes from the WordPress Theme while Dynamic part (which mainly consists of title, description, user comments, sidebar data, etc) is stored in the database.
When you enable Page Cache for a page/post/product then both Static and Dynamic parts are combined to create a Static version. This Static version is stored by the WordPress in the Server. Whenever a user visits that page/post/product, WordPress simply sends this Static version to your browser. This significantly decreases page load time because there is no fetching of Dynamic part now.
You may remember enabling Page Cache option in the General Settings. Now go to Performance > Page Cache section, and here you can enable and set time for –
I recommend you to turn on the following Page Cache settings –
It can be enabled from the General Settings area. Minify (Minification) means removing unnecessary characters from source code of the website. It makes source code smaller and improves performance. Go to Performance > Minify to do minification of HTML, CSS, JS and XML of your website’s source code.
You can even opt in or opt out certain CSS and JS file from minification.
I recommend you to turn on the following Minify settings –
In WordPress all data is stored in the database and this data is fetched with SQL queries. It is not effective to call the same query over and over again, on each page and for each visitor. The solution is Database Cache which saves the result of these queries and presents them when required.
In this way SQL queries are not run and instead a static result is presented. This speeds up the website and also provides scalability, flexibility and availability.
You can set Database Cache options from Performance > Database Cache.
Turn on the following Database Cache settings –
1. Don’t cache queries for logged in users
Object Cache is quite similar to Database Cache, it caches both Database queries as well as non database objects. Go to Performance > Object Cache to set its options. When enabled, Object Cache caches data which is computationally expensive to regenerate. Data stored in the cache resides in memory only for the duration of time specified.
To set Browser Cache options, go to Performance > Browser Cache in your WordPress.
I recommend the following settings to turn on –
W3 Total Cache allows you to integrate your website with a CDN – Content Delivery Network. CDN serves your website static content from a network of Data Centers which reduces server load and speeds up your website.
W3 Total Cache supports many different types of CDN’s like MaxCDN, Akamai, Amazon CloudFront, AT&T and many more. Enable and select CDN Type from Performance > General Settings, then go to Performance > CDN to set up your selected CDN.
I hope you found this article helpful in speeding your website up. If you have any questions, then feel free to ask in the comments below.