f

Questions? We're happy to help

How do I use Redis with WordPress?

To use Redis Cache with WordPress, you need a single plugin. This article explains how to install that plugin.

Important

The PHP module redis must be activated before using Redis Caching with PHP. Read how to activate this module. Also, a Redis database must be created through My Account on our website. The databases are distinguished by the port number. Therefore, database '0' must always be used.

Customize WordPress configuration

Before you install the necessary plugin, some changes must be made to the WordPress configuration. The steps below help you.

Step 1. Log in to cPanel.

Step 2. Under 'File', click 'File Manager'.

Step 3. Navigate to the folder where you have WordPress installed. Right click on 'wp-config.php' and then click 'Edit'.

Step 4. Scroll down until you see:

/* That's all, stop editing! Happy blogging. */

Above that line you have to paste the following:

define('WP_REDIS_HOST', 'redis.totaalholding.nl'); define('WP_REDIS_PORT', 'YOUR REDIS PORT'); define('WP_REDIS_PASSWORD', 'YOUR REDIS PASSWORD');

You replace 'YOUR REDIS PORT' and 'YOUR REDIS PASSWORD' with the data in My Account.

Step 5. Click 'Save Changes' in the upper right.

Install Plugin

Step 1. Log in to WordPress.

Step 2. In the left menu, click 'Plugins', and then click 'New Plugin'.

Step 3. In the top right, type 'Redis Object Cache' and press enter.

Step 4. Under 'Edit Object Cache', click Install', then click 'Activate'.

Step 5. In the left menu, go to 'Settings > Edit'. Click 'Enable Object Cache' to enable Redis Caching.

 

This knowledge base article was last updated on: 25 April 2018

Did this article help you?

Status

Visit our status page for an overview of recent malfunctions and maintenance.

Opening hours

Monday — Thursday 9:00 — 21:00
Friday 9:00 — 17:00
Saturday — Sunday 10:30 — 17:00