W3TC plugin has many settings for the caching of information. It is an instrument for speeding up WordPress sites.
You can install the plugin in the website admin section – Extensions » Add more. Firstly you need to type W3 Total Cache in the search box and press Enter. After the plugin is installed and activated, the main menu in the admin section will display a Performance button.
We will explain in more details what exactly is cached by this plugin so that you know which settings should be activated and used. After changing settings, we recommend that you clear the cached data and reload the page so that you see the new results.
In a nutshell – what is caching data?
Caching is actually saving the information or data, generated dynamically when a user loads a page in the site. In this way next time the user will receive this saved information instead of waiting for data generation when loading the site again. Cached data saves time and resources necessary for the constant web data generation.
What data is cached?
W3 Total Cache caches data on multiple levels. The highest level is Page Cache. The final HTML code is saved there. Its generation uses results from SQL queries and execution of the website scripts. The next level is Object Cache. It caches objects such as the necessary for a webpage loading temporary data. The lowest level is Database Cache. Here SQL server database queries are cached.
In the section Performance » General Settings first you should activate the data caching modules – Page Cache, Minify, Database Cache, Object Cache and Browser Cache. Select the Enable box for Page, Minify, Database, Object and Browser Cache. Except for Minify, select for everything else the Cache Method: Memcached and save your changes. For Minify select Disk. There is a separate settings page for every object and it is accessible from Performance menu.
Note: If you enable the Database Cache and Object Cache caching methods, check the loading time of website pages and if you notice a slowdown deactivate that caching.
In this first part of the article we will describe Page Cache and we will give you more information on the rest of the cache types in the next part.
When accessing a website page, WordPress will start and perform a few actions in order to provide information for this page. This process is called a dynamic content generation. The webpage scripts will start and send a few SQL queries to the database. Then the results from the queries will be processed and PHP will generate the final HTML webpage code which is sent from the server to the browser. This process of dynamic data generation not only takes time, but also demands the usage of certain resources from the hosting account.
When Page Cache is activated, the generated final HTML code will be saved for future usage. Next time when the webpage is accessed, the system will directly send the saved HTML code to the server and the server will forward it to the browser. In this way you save a big part of the dynamic data generation which also influences the speeding of website loading, as well as reduced server resources usage.
Recommended Caching Technology: Memcached
Page Cache settings
Pay Attention to the Following Page Cache settings.
Don’t cache pages for following user roles
When you go to General section, pay attention to the option Don’t cache pages for following user roles. Activating this option and selecting the enlisted users guarantees that none of the logged in admins, editors or content creators will receive cached data. When there is content often published on the website, this feature is useful, because it prevents outdated information from being posted.
Purge Policy: Page Cache
The cached data will automatically refresh for certain pages from the website when new content is published. In order to reload the cached data on the Front page, the articles and the feed, select Front page, Post page and Blog feed.
In the “Additional pages” field you can put pages which specifically have to refresh when content is published. For example you can add the website categories if you notice that they do not refresh after a new post.
In this section you need to enter the respective Memcache port (for example 127.0.0.1:11236) in the “Memcached hostname:port / IP:port:” field. You can find the port number in cPanel » Memcached Manager by SuperHosting.
Tips from the support: We do not recommend using this plugin along with other installed and activated caching plugins. Using two or more plugins of that type simultaneously can lead to errors in the website loading or slowing down its speed.
See next part: 🔗 General Settings in W3 Total Cache (Part 2) | Blog