E9654c192d09339ed9e42e7773deda9d43bc4f3a
By:
karlonC

W3 total cache functionality

April 26, 2015 731 views
WordPress Caching

I just installed W3 Total cache on wordpress 4.2 and I checked for compatibility and I saw this in the list:

moddeflate: Not detected (required for disk enhanced Page Cache and Browser Cache)
mod
env: Not detected (required for disk enhanced Page Cache and Browser Cache)
modexpires: Not detected (required for disk enhanced Page Cache and Browser Cache)
mod
headers: Not detected (required for disk enhanced Page Cache and Browser Cache)
modmime: Not detected (required for disk enhanced Page Cache and Browser Cache)
mod
rewrite: Not detected (required for disk enhanced Page Cache and Browser Cache)
mod_setenvif: Not detected (required for disk enhanced Page Cache and Browser Cache)

Is there a way to fix this?

Ps. I am also wondering if this caused MYSQL to crash about 2hrs ago.

1 Answer

You'll need to install and configure these additional components. To do so:

First install a few deb packages and pecl packages:

sudo apt-get install php5-memcache memcached php-pear build-essential php5-tidy php5-curl apache2-dev
sudo pecl install memcache
sudo pecl install apc

Now you'll want to enable memcached in your php.ini

sudo nano /etc/php5/apache2/php.ini

Add these lines to the Dynamic Extensions section

extension=apc.so
extension=memcache.so

Activate the new apache modules

sudo a2enmod rewrite
sudo a2enmod expires
sudo a2enmod headers
sudo service apache2 restart

Now update your wp-config to ensure the following is set:

define('WP_CACHE', true);

You should now be able to reload the compatibility test page and see the items resolved.

On your second question, when MySQL crashes you should always check the log files in /var/log/mysql without details on the crash there is no way to know whether it was related to this change. If you are on a small droplet, it is also possible that you need to enable a swap file or upgrade to a plan with more RAM. If you review the logs and can share the error we can help point you in the right direction.

Have another answer? Share your knowledge.