1. Documentation /
  2. WooCommerce Product Search /
  3. Settings /
  4. Cache /
  5. Redis



↑ Back to top

The settings in this section apply to the Redis integration of the WooCommerce Product Search extension. When enabled, the system can use a Redis in-memory data structure store for high-performance caching.

You will find these settings on your WordPress dashboard, go to WooCommerce > Settings > Search > Cache > Redis

  • Enabled – Check this box to enable the Redis integration.
  • Host – Indicate the host or socket where your Redis instance accepts connections.
  • Port – Indicate the port where your Redis instance listens for connections.
  • Username – An optional username to authenticate with the Redis instance can be provided here.
  • Password – The corresponding password for the username can be provided here to authenticate with the Redis instance.

You can have the search engine’s cache system connect to a free Redis server, a Redis Cloud instance or a Redis Enterprise server.

How to install Redis

↑ Back to top

You can install a free Redis server very easily and in just a minute.

Simply follow the steps below to install it and have a Redis server running on a Debian or Ubuntu host. The documentation for Redis can guide you with different setups in the Install section.

First, update the package repository:

$ sudo apt update

Now install the Redis server package:

$ sudo apt install redis-server

Once installed, you can check the server version:

$ redis-server –-version

Check that the server is already running as a service:

$ sudo service redis-server status

You can connect to your Redis server and interact with it using the command-line client redis-cli or use it to get information on the server status directly:

$ redis-cli info

Install the Redis PHP extension:

$ sudo apt install php-redis

With the Redis server running and the Redis integration enabled in the search engine’s settings, it’s interesting to verify and watch how the Keyspace stats evolve while the system is in use. The following command will show the current Keyspace stats:

$ redis-cli info Keyspace

Here we assume that the Redis server will run on the same host as the web server, so the default connection settings allow the search engine to connect to it to port 6379 on localhost. Remember to adjust the Redis settings of the search engine accordingly if your Redis server configuration is different.