How to configure Batcache for WordPress in Plesk?

Created:

2017-07-14 17:12:30 UTC

Modified:

2017-08-16 15:50:59 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to configure Batcache for WordPress in Plesk?

Applicable to:

  • Plesk for Linux

Question

How to configure Batcache for WordPress in Plesk?

Answer

1. Install Memcached server:

# apt-get install memcached

or

# yum install memcached

1. Install Memcached PHP modules according to steps from the article #115000065409

2. Install WordPress intance in Plesk > Domains > example.com > WordPress ,  install and enable Batcache plugin when it is offered to install plugins

3. Install Memcachy script:


4. add define('WP_CACHE', true); to /var/www/vhosts/example.com/httpdocs/wp-config.php

5. modify /var/www/vhosts/example.com/httpdocs/wp-content/plugins/batcache/advanced-cache.php for memcache usage monitoring
----- var $headers = array();
+++ var $headers = array('memcached' => 'activated');

6. Open a new page in incognito mode and press F12 to open the Developer Tools in Chrome browser, select the Network tab and reload the website several times (just to be sure the page is loaded from the cache) and check the response headers. Batcache works if "memcached" header is shown. Alternatively, view the page source code to find the following:

<!--
generated 207 seconds ago
generated in 0.450 seconds
served from batcache in 0.007 seconds
expires in 93 seconds
-->
batcache.png


Have more questions? Submit a request
Please sign in to leave a comment.