2.14.1.2.3. Configure Memcached in WordPress

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

  1. Install and activate the W3 Total Cache plugin.
  2. Go to the "Performance → General Settings" section.
  3. In the "Page Cache" block:
    1. In the "Page Cache" field, enable "Enabled".
    2. In the "Page Cache Method" field, select "Memcached".
    3. Save the changes.
  4. Go to the "Performance → Page Cache" section.
  5. In the "Advanced" block:
    1. In the "Memcached hostname:port / IP:port" field, specify /home/example/.system/memcache/socket:0 (instead of example, use hosting account name, where the site is hosted).
    2. Click "Test". If successful, "Test passed" should appear.
    3. Save the changes.
  6. Configure "Database Cache" and "Object Cache" in the same way.
  7. Check the site operation.

Attention!

The plugin has not been developed for a long time and may be incompatible with new versions of WordPress and PHP.
  1. Install and activate the WP-FFPC plugin.
  2. Edit the site configuration file wp-config.php and add the following line at the beginning (right after <?php):
    define ( 'WP_CACHE', true );
  3. Specify the plugin settings in the "Settings → WP-FFPC" section:
    1. On the "Cache type" tab:
      • In the "Select backend" field, select "PHP Memcached".
    2. On the "Backend settings" tab:
      • In the "Hosts" field, specify /home/example/.system/memcache/socket:0 (instead of example, use hosting account name, where the site is hosted).
      • The "Authentication: username" and "Authentication: password" fields must be empty.
    3. Save the changes. If successful, "up and running" should appear at the top of the section near "Backend status".
  4. Check the site operation.
Content

    (1)