We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.13.1.2.5. Setting up Redis in WordPress

So that WordPress can use Redis, install and configure one of the specialized plugins:

To enable support Redis in WordPress using the Redis Object Cache plugin, do the following:
  1. Openup Adminpanel site.
  2. Install and activate the plugin Redis Object Cache.
  3. Edit config file site wp-config.php and add to its beginning (right after <?php) such lines (in the second line instead of example substitute hosting account name, in which the site is located, in the third line instead of example substitute a unique prefix for storing data in Redis, which is important when using Redis for multiple sites):
    define('WP_REDIS_SCHEME', 'unix');
    define('WP_REDIS_PATH', '/home/example/.system/redis.sock');
    define('WP_CACHE_KEY_SALT', 'example');
  4. In the admin panel of the site, go to the section "Settings → Redis" and press "Enable Object Cache»:If everything is in order, at the top of the section opposite “Condition"Should display"Connected»:
  5. Check the site is working.
To enable support Redis in WordPress using the W3 Total Cache plugin, do the following:
  1. Openup Adminpanel site.
  2. Install and activate the plugin W3 Total Cache.
  3. Go to the section "Performance → General Settings»:
  4. In the block "Object Cache»:
    1. Opposite "Object Cache"Check the box next to"Enabled».
    2. Opposite "Object Cache Method»Select«Redis».
    3. Save your changes.
  5. Go to the section "Performance → Object Cache»:
  6. In the block "Advanced»:
    1. Opposite "Redis hostname:port / IP:port»Specify /home/example/.system/redis.sock (instead example substitute hosting account namewhere the site is located) and click "Test»:If everything is in order, the green inscription “Test passed»:
    2. Save your changes.
  7. Follow the same steps for "Page Cache"And"Database Cache».
  8. Check the site is working.