Wordpress, like any other website software, often sees sudden surges in traffic due to search engine bots or by a simple increase in website traffic. The effect of the increased traffic is that resources used on the hosting service may increase or decrease dramatically depending on the traffic coming to the server. Many of the resource requests occur when Wordpress is trying to keep up with the repeated quests from the increased traffic on the server.
Wordpress is a CMS (Content Management System) that requires access to the database for every visitor getting into the Wordpress front end. As traffic increases, the processes handling Wordpress visitors take longer to process as the database becomes inundated with requests. This causes a surge in CPU usage which can often cause the server to slow down.
To counter the CPU issue, a caching plugin for Wordpress would greatly help to alleviate the problem by minimizing multiple page requests of the same page. A page that is repeatedly requested would be cached and all visitors hitting the page after the first request would be getting a cached version of the website page that would not require database access.
As a result the customer sees the Wordpress page much faster and the overall CPU performance on the server would be improved. The following article shows how to setup and configure W3 Total Cache.
Installing W3 Total Cache
- Login to your Wordpress Administrator backend.
- Hover over Plugins in the left-hand menu and then click on ADD NEW at the top of the page to search for the plugin.
- In the SEARCH field, type in W3 Total Cache and then click on SEARCH PLUGINS.
- When the search completes you will see something similar to the following:
Click on INSTALL NOW, then confirm the install by clicking on OK in the confirmation dialog window.
- Click on ACTIVATE PLUGIN on the confirmation screen indicating that W3 Total Cache was installed successfully. You will then see that the plugin has been added to the list plugins already loaded on your website.
- The installation and activation of the plugin will place a new menu item in your Wordpress Admin dashboard called PERFORMANCE. Click on PERFORMANCE, then click on GENERAL SETTINGS.
- Scroll down the GENERAL SETTINGS page and make sure to click on the checkbox to enable each section listed below:
Note that there are a large number of other settings, but we are only focusing on the both items to enable caching on the Web Hosting Hub server. After you make sure that each setting has been enabled, click on the SAVE ALL SETTINGS button.
- After you have enabled all of these settings, hover over the PERFORMANCE menu again then click on PAGE CACHE. Scroll down and make sure that each of the following settings are enabled by clicking a checkmark in the check box beside each setting:
Cache front page
Cache feeds: site, categories, tags, comments
Cache 404 (not found) pages
Cache requests only for yourdomain.com site address
Don't cache pages for logged in users
- After you have finished enabling each of the above sections, click on SAVE ALL SETTINGS.
- In order to confirm that W3 Total cache is setup, view your Wordpress website, then click on CONTROL-U (control key + the U key on your keyboard), or go to VIEW > PAGE SOURCE. This will open up the source view of the page. Scroll to the bottom of the page and will see a confirmation that looks similar to the one below if the W3 total cache is properly configured:
This completes the installation of the W3 Total Cache. There many, options available for Total Cache. Make sure to go through the documentation for the caching applicaton before trying to make manual changes to the settings. With the cache enabled you'll see better page lods and improved resource usage from the server.