2.14.1.2.3. Setting up Memcached in WordPress

For use Memcache(d) in WordPress, install and configure one of the specialized plugins.

  1. Install and activate the plugin W3 Total Cache.
  2. Go to section "Performance → General Settings".
  3. In the block "Page Cache":
    1. Against "Page Cache" check the box next to "Enabled".
    2. Against "Page Cache Method" choose "Memcached".
    3. Save your changes.
  4. Go to section "Performance → Page Cache".
  5. In the block "Advanced":
    1. Against "Memcached hostname:port / IP:port" indicate /home/example/.system/memcache/socket:0substituting instead example hosting account namein which the site is hosted.
    2. Click "Test". If everything is in order, a green inscription should be displayed "Test passed".
    3. Save your changes.
  6. Follow the same steps for "Database Cache" and "Object Cache".
  7. Check the site is working.

Attention!

The plugin has not been developed for a long time and may not be compatible with new versions of WordPress and PHP.
  1. Install and activate the plugin WP-FFPC.
  2. Edit site config file wp-config.php and add to its beginning (right after <?php) a line like this:
    define ( 'WP_CACHE', true );
  3. Specify the plugin settings in the section "Settings → WP-FFPC":
    1. In the tab "Cache type":
      • Pleaseselect "PHP Memcached" in field "Select backend".
    2. In the tab "Backend settings":
      • Pleaseindicate /home/example/.system/memcache/socket:0 in field "Hosts" (insteadof example substitute hosting account namewhere the site is hosted).
      • Fields "Authentication: username" and "Authentication: password" should be empty.
    3. Save your changes. If everything is in order, at the top of the section opposite "Backend status" should display "up and running".
  4. Check the site is working.
Content