Today we will learn how to Configure Redis on the WordPress website. Redis is a fast, open-source key-quality data store for use as a database. It reduces the query response time and hence increases website speed. This is a popular choice to reduce page load time. In this guide, we are going to configure Redis in WordPress.
Needs to configure Redis on WordPress:
- Redis configured on the server
- Redis path
- WordPress installed on the domain
- WordPress Full admin access
- FTP/ File Manager access to edit files.
Now Follow these steps:
– Sign in to your WordPress – admin account.
– Go to the Plugins section and click on Add New, search for Redis in the search bar and install Redis Object Cache as shown in the following screenshot.

– Open your website’s wp-config.php file and add the following code.
Note: Change the path of your Redis socket file according to your installation.
// Redis
define ('WP_REDIS_CLIENT ', 'phpredis');
define ('WP_REDIS_SCHEME', 'unix');
define ('WP_REDIS_PATH', '/run/redis/redis.sock');
define ('WP_REDIS_PORT', 0); Save the file after adding the code.– Go back to your website’s wp-admin and activate the Redis plugin.
– After activating the plugin go to Redis settings and enable object cache.

– If the path and installation are successful you will be able to see the following screen.

Now you have successfully enabled Redis on your WordPress website. Read our WordPress security guidelines.



