2.13.1.2.3. Setting up Memcached in WordPress
For use Memcache(d) in WordPress, install and configure one of the specialized plugins.
W3 Total Cache
- Openup site admin panel.
- Install and activate the plugin W3 Total Cache.
- Go to section "Performance → General Settings".
- In the block "Page Cache":
- Against "Page Cache" check the box next to "Enabled".
- Against "Page Cache Method" choose "Memcached".
- Save your changes.
- Go to section "Performance → Page Cache".
- In the block "Advanced":
- Against "Memcached hostname:port / IP:port" indicate
/home/example/.system/memcache/socket:0
substituting insteadexample
hosting account namein which the site is hosted. - Click "Test"... If everything is in order, a green inscription should be displayed "Test passed".
- Save your changes.
- Follow the same steps for "Database Cache" and "Object Cache".
- Check the site is working.
WP-FFPC
Attention!
The plugin has not been developed for a long time and may not be compatible with new versions of WordPress and PHP.- Openup site admin panel.
- Install and activate the plugin WP-FFPC.
- Edit site config file
wp-config.php
and add to its beginning (right after<?php
) a line like this:define ( 'WP_CACHE', true );
- Specify the plugin settings in the section "Settings → WP-FFPC":
- In the tab "Cache type":
- Pleaseselect "PHP Memcached" in field "Select backend".
- In the tab "Backend settings":
- Pleaseindicate
/home/example/.system/memcache/socket:0
in field "Hosts" (insteadofexample
substitute hosting account namewhere the site is hosted). - Fields "Authentication: username" and "Authentication: password" should be empty.
- 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.