As you know, at Cloudways performance is our obsession. We carefully craft every deployed application to make best use of all caching layers (specially varnish) for optimal performance.
If you completely override our deployment with you application files, chances are that you will override all that work.
Here we are listing the steps to rebuild that optimal configuration for WordPress W3 Total Cache plugin.
It basically relates to the following sections of the W3 Total Cache plugin:
1. Page Cache
2. Database cache
3. Object Cache
4. Browser Cache
5. Reverse Proxy (Varnish)
Rest of the available sections will not be modified.
Step 1: Login to WordPress admin area
Login to the WordPress admin area of the site with your credentials.
Step 2: Get into Plugins Section
On the left bar click on “Plugins“.
Step 3: Locate W3 Total Cache
Locate the W3 Total Cache plugin and click “Settings” to start the configuration (if W3 Total Cache isn’t installed, then click “Add New” at the top and search for W3 Total Cache and install it before proceeding).
NOTE: These settings are applicable for the latest W3TC version 0.9.5. If you are not running the latest, you can easily update it from the WordPress admin or with the following WP CLI command “wp plugin update w3-total-cache” executed in your application web root.
Step 4: Configuration of Page Cache
Check “Enable” > Select “Disk:Enhanced” from the drop down menu > Save all settings.
Step 5: Configuration of Database Cache
Check “Enable” > Select “Memcached” from the drop down menu > Save all settings.
Step 6: Configuration of Object Cache & Browser Cache
1) Object Cache: Check “Enable” > Select “Alternative PHP Cache (APC / APCu)” from drop down menu > Save all settings.
2) Browser Cache: Check “Enable” > Save all settings.
Step 7: Configuration of Reverse Proxy (Varnish)
For non SSL protected websites, add your application URL (e.g.:wordpress-1828-XXX-XXXXX.cloudwaysapps.com) under the “Varnish servers” section and click on the “Save all settings” button.
If you are using an SSL certificate on your website, you need to append port number “8080” at the end of your application URL (e.g. wordpress-1828-XXX-XXXXX.cloudwaysapps.com:8080) and then save the settings.
And that will be it! The W3 Total Cache is now correctly configured according to Cloudways recommended settings.