United States United States

How does Redis or Memcache(d) works with wordpress?

Socket Path

At first you have to create a cache pool with a socket path. With this path you have the possibility to configure your Wordpress. Please use this link for help.

Redis:

Log into your wordpress backed and navigate to [Menu] --> [Plugins] --> [Install] and search for the following term: "Redis Object Cache". The first result is the right plugin. Please install this plugin. After the installation you need to open the file "wp-config.php" in the root folder of the application. Add the following lines to this file right above the line "* That's all, stop editing! Happy blogging. */":

define('WP_REDIS_PATH', '{{YOUR_SOCKET_PATH}}');
define('WP_REDIS_PORT', '0');
define('WP_REDIS_DATABASE', '0');
define('WP_REDIS_SCHEME', 'unix');

{{YOUR_SOCKET_PATH}} should be replaced with the socket path that show up at [My Hosting] --> [Cache Pools] in your Controlpanel.

After saving the file the caching should be active.

Memcache(d):

Log into your wordpress backed and navigate to [Menu] --> [Plugins] --> [Install] and search for the following term: "MemcacheD is your friend". The first result is the right plugin. Please install this plugin. After the installation you need to open the file "wp-config.php" in the root folder of the application. Add the following lines to this file right above the line "* That's all, stop editing! Happy blogging. */":

$memcached_servers = array(
'default' => array(
'{{YOUR_SOCKET_PATH}}:11211'
)
);

{{YOUR_SOCKET_PATH}} should be replaced with the socket path that show up at [My Hosting] --> [Cache Pools] in your Controlpanel.

After saving the file the caching should be active.