How to flush Redis

    October 17, 2019

    How to use flush Redis from the command line interface (CLI).

    You must have SSH access to your server in order to use this method. If you do not have SSH access, see How to enable SSH access for details.

    ATTENTION: Use caution when performing this operation. If you are a Nexcess client, we recommend discussing other options with our support team before flushing your Redis database. You may contact them by email or through your Client Portal.

    1. Log in to your server with SSH.

    2. Identify the Redis connection details in the configuration file for your CMS. If you need help locating this file, contact our support team.

    3. Flush your cache using one the below commands, but replace the angled brackets (<>) and everything between them with the indicated information. If the first path is invalid, try the second. The correct path depends on your server type and various other factors.
      1. redis-cli -s /var/tmp/redis-multi_<customer_specific_name>_cache.sock FLUSHALL
      2. redis-cli -s /var/run/redis-multi/<customer_specific_name>_cache.sock FLUSHALL

    For more information, see the official Redis documentation about the Redis CLI or the FLUSHALL command.

    For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.

    Was this article helpful?

    Send feedback

    Can’t find what you’re looking for?

    Our award-winning customer care team is here for you.

    Contact Support