Skip to main content

Setting Up Redis with LiteSpeed Cache for WordPress

Setup Redis for WordPress Step-by-Step Video Guide

Redis is a powerful caching system that works seamlessly with LiteSpeed Cache. Watch this video tutorial to see how to set up Redis caching for WordPress with ease.


Enhancing your WordPress site’s performance is crucial, and Redis is a powerful caching system that works seamlessly with the LiteSpeed Cache plugin to achieve this. Redis helps reduce database queries, speeding up your website and improving response times by storing frequently requested data in memory.

WebHostMost’s servers are configured to use UNIX Sockets for Redis, ensuring both security and performance enhancements over traditional network-based connections.

Setting Up Redis for WordPress

Follow this simple guide to set up Redis on your WordPress site using the LiteSpeed Cache plugin.

Prerequisites

Before configuring Redis in WordPress, make sure Redis is activated on your server.

important

To activate Redis:

  1. Go to Web Control Panel > Website Management > Redis.
  2. Enable the toggle to activate Redis for your website.

Once Redis is enabled on the server, you can proceed with the setup in WordPress.

Configure Redis in WordPress

After enabling Redis in the Web Control Panel, follow these steps to set it up in WordPress using the LiteSpeed Cache plugin:

  1. Access WordPress Admin Panel
    Log in to your WordPress Admin Panel.

  2. Ensure LiteSpeed Cache Plugin is Installed
    If you haven’t already installed the LiteSpeed Cache plugin, install it by navigating to Plugins > Add New, search for "LiteSpeed Cache," and activate it.

  3. Enable Object Cache in LiteSpeed Cache Plugin

    • Go to LiteSpeed Cache > Cache tab.
    • Navigate to the Object section.
    • Set Object Cache to ON.
  4. Set Redis as the Caching Method

    • In the Method section, choose Redis.
    • In the Host field, enter the connection details provided in the Web Control Panel’s Redis section.
  5. Configure Connection Port

    • Set the Port to 0. Since WebHostMost uses UNIX Sockets, the connection does not require a network port. Setting it to 0 ensures that the system socket is used for the Redis connection.
  6. Save Changes
    Scroll down and click Save Changes.

note

The connection to Redis will use UNIX Sockets instead of network-based Web Sockets. This configuration improves performance and security by utilizing system-level connections.

Connection Requirements for Redis

Here’s a summary of the Redis connection settings for WebHostMost servers:

  • Socket Type: UNIX Sockets
  • Connection Port: 0

Additional Notes on Using Redis

  • Performance Improvement: Redis significantly improves performance by caching database queries and reducing the load on your server.
  • Security Considerations: Using UNIX Sockets instead of Web Sockets ensures that your Redis connection is more secure, as it avoids exposure to network-based vulnerabilities.
warning

Make sure Redis is enabled on the server through the Web Control Panel before configuring it in WordPress. Failing to do so may result in connection errors or degraded website performance.

Conclusion

By following the steps outlined above, you can configure Redis caching on your WordPress site using the LiteSpeed Cache plugin, providing enhanced speed and performance. This setup, combined with WebHostMost's optimized hosting environment, ensures that your website runs at its best.

For further assistance, feel free to reach out to our support team.