So that WordPress can use Memcached, install and configure one of the specialized plugins.
To enable support
Memcached in WordPress using the WP-FFPC plugin:
-
Install and activate the plugin
WP-FFPC.
Edit
config file site
wp-config.php
and add to its beginning (right after
<?php
) a line like this:
define ( 'WP_CACHE', true );
In the admin panel of the site, go to the section "Settings → WP-FFPC»:
Check the "Cache type"And make sure that opposite"Select backend"Selected"PHP Memcached».
Switch to the "Backend settings».
In field "
Hosts»Specify
/home/example/.system/memcache/socket:0
substituting instead
example
hosting account namein which the site is hosted.
Save your changes. If everything is in order, at the top of the section opposite “Backend status"Should display"up and running».
Check the site is working.
To enable support
Memcached in WordPress using the W3 Total Cache plugin:
-
-
Go to the section "Performance → General Settings».
In the block "Page Cache»:
Opposite "Page Cache"Check the box next to"Enabled».
Opposite "Page Cache Method»Select«Memcached».
Save your changes.
Go to the section "Performance → Page Cache».
In the block "Advanced»:
Opposite "
Memcached hostname:port / IP:port»Specify
/home/example/.system/memcache/socket:0
substituting instead
example
hosting account namein which the site is hosted.
Click "Test". If everything is in order, the green inscription “Test passed».
Save your changes.
Follow the same steps for "Database Cache"And"Object Cache».
Check the site is working.