CityHost.UA
Help and support

Configuring Memcached in Wordpress

In order for WordPress to interact with the Memcached extension, you need to additionally install and configure one of the many plugins. In this example, the installation and configuration of the W3 Total Cache plugin will be considered.

To install the W3 Total Cache plugin , go to the admin panel of your Wordpress site

  1. Go to the section Plugins ? Add new
  2. Search for the W3 Total Cache plugin
  3. Install and activate it.

  1. Go to the section Performance ? General Settings
  2. In the Page Cache section, opposite the Page Cache option, check Enabled
  3. In front of the Page Cache Method option, select the Memcached option from the list
  4. Save the changes with the Save all settings button

While in the section Perfomance ? General Settings, activate 2 more options, Database Cache and Object Cache by analogy with Page Cache

Activating the Database Cache option:

  1. In the Database Cache section, opposite the Database Cache option, check Enabled
  2. Next to Database Cache Method, select Memcached from the list
  3. Save the changes with the Save all settings button

Activating the Object Cache option:

  1. In the Object Cache section, next to the Object Cache option, check Enabled
  2. Opposite the Object Cache Method option, select the Memcached option from the list
  3. Save the changes with the Save all settings button

Connecting the Memcached extension to the W3 Total Cache plugin:

  1. Go to the section Performance ? Page Cache
  2. In the Advanced section, opposite the Memcached hostname: port/IP:port parameter, write the path to the Memcached socket

The path to the Memcached socket must be copied from the hosting control panel in the Add Services ? Memcached ? Information section

When the path to the Memcached socket is written, click the Test button to check the correctness of the specified data. If everything is correct, the inscription Test passed will appear on a green background. If the text Test failed is displayed instead, check the correctness of the entered data. Save the changes with the Save all settings button.

The path to the Memcached socket must be additionally specified in two more sections, Database Cache and Object Cache by analogy with Page Cache .

Specify the path to the Memcached socket for the Database Cache :

  1. Go to the section Performance ? Database Cache
  2. In the Advanced section, opposite the Memcached parameter hostname:port/IP:port , write the path to the Memcached socket
  3. Make sure that you received the message Test passed and save the changes with the Save all settings button

Specify the path to the Memcached socket for Object Cache :

  1. Go to the section Performance ? Object Cache
  2. In the Advanced section, opposite the Memcached parameter hostname:port/IP:port , write the path to the Memcached socket
  3. Make sure that you received the message Test passed and save the changes with the Save all settings button

This completes the configuration of the W3 Total Cache plugin. Test your site by opening 3-5 different pages, this action will generate some cache data and information to view statistics, then check if your site interacts with Memcached .


Similar articles