Your cart is currently empty!
How to install Redis on Debian or Ubuntu
In this quick guide, you will install a free Redis server in what takes just about a minute.
After you have followed the steps, you will have your Redis server instance running as a service on your host. You can use it to power the cache of your WordPress site with appropriate plugins that support Redis.
You can use the Redis server to power the cache and get lightning fast search and filter results with the latest release of the WooCommerce Product Search extension, the Search Engine which is essential for every WooCommerce store.
As the first step, we update the package repository:
$ sudo apt update
Now we will install the Redis server package:
$ sudo apt install redis-server
As we want to use this with WordPress, we also install the Redis PHP extension, so plugins can use it easily:
$ sudo apt install php-redis
Let’s check which version of the Redis server is installed:
$ redis-server –-version
We also want to make sure that the server is running as a service, so it is there in case the host needs to restart:
$ sudo service redis-server status
The server comes with a command-line client redis-cli
which you can use to connect to your Redis server and interact with it. You can also use it to get information on the server status directly:
$ redis-cli info
While the Redis server is running, it is useful to check its Keyspace stats, one of several sections of information that the tool provides. It’s an easy way to verify that things are moving, i.e. data is actually being cached. The following command will show the current Keyspace stats:
$ redis-cli info Keyspace
We assume that the Redis server is running on the same host as your web server. The default connection settings allow to connect to it to port 6379
on localhost
.
Great! Your Redis server is eager to work!
Go to the Redis section of the documentation for the WooCommerce Product Search search engine to see how to enable it for the system.
Related resources:
- The Redis site for the free open source solution.
- The Redis.com site for the commercial Redis Cloud and Redis Enterprise solutions.
- The documentation for Redis can guide you with different setups in the Install section.
- The redis-server Debian package.
- The Redis and the Cache section of the documentation for the WooCommerce Product Search search engine.
Let us know if you have questions, comment below!
Leave a Reply