In this article:
Page Caching is a very powerful performance configuration that reduces the response time of your site by storing the web pages that are generated for future visits. Future visitors will be served the cached copy of the page as opposed to having each page re-generated for them for every visit. W3 Total Cache comes with a number of Page Caching Methods to best suit your situation. There are methods available for a number of platforms and configurations so that you may choose the fastest available option.
If you are unsure of which method to use for Page Caching, in most scenarios and configurations you should use Disk: Enhanced. Other methods that provide in-memory caching should be used depending on the capabilities of your hosting platform.
For suggestions tailored to your hosting plan and recommendations on which Page Caching method to use, consider upgrading to W3 Total Cache Pro for access to the Statistics page.
Choosing a Page Caching Method for Shared Hosting
In shared hosting plans, you may only be able to cache files to a disk. In such cases, there are two variants available depending on what your hosting platform supports.
Disk: Enhanced (Generally Recommended)
This caching method serves cached pages by using the server’s URL rewriting capabilities, such as .htaccess files in the case of Apache, to resolve the path of cached assets. This method is recommended due to it being faster and more efficient than Disk: Basic, which executes a PHP script to provide similar functionality. In terms of performance, usually only NGINX + Memcached can provide faster results on a single-server environment.
This caching method relies on executing a PHP script to handle rewriting URLs and serving cached files. This may be ideal if you have limited access to the files on your hosting plan, or if using an htaccess file is not possible.
While disk-based caching will decrease the response time of your site, it is possible that if you have a high-traffic site you may exhaust your disk read/write throughput. If you have a high-traffic site it is recommended that you upgrade to a VPS or Dedicated Server, as this will allow you to use in-memory caching solutions which provide exponentially faster read/write performance. For assistance with monitoring disk performance, consider upgrading to W3 Total Cache Pro for access to the Statistics Page
If the cache folder is consuming a large amount of storage, consider using an in-memory cache that has a fixed maximum possible size. You may check this by:
- Reviewing the total size of the wp-content/cache folder for the WordPress website in question
- For quick access to the total storage consumed by page caching, consider upgrading to W3 Total Cache Pro for access to the Statistics page
If you intend to have blocks of dynamic content on cached pages via mfunc tags, this isn’t supported by disk-based “Enhanced” caching. Disk-based “Basic” will work, though you should consider using a caching method mentioned in the VPS / Dedicated Server or Multiple Server documentation because they will have much better performance for dynamic content.
- For analyzing the amount of static vs dynamic content that is causing database queries or calls to objects, consider upgrading to W3 Total Cache Pro for access to the Statistics page.
If you have a cluster of web servers, disk-based caching will not sync between multiple environments, leading to potential irregularities in page content. Consider using a method listed in the Multiple Server documentation.
Read more about configuring W3 Total Cache with Shared Hosting.
W3 Total Cache
You haven't seen fast until you've tried PRO
Full Site CDN + Additional Caching Options
Advanced Caching Statistics, Purge Logs and More
Everything you need to scale your WordPress Website and improve your PageSpeed.