How do I enable and use Redis?

How do I enable and use Redis?

What is Redis?

Redis is a super-fast, in-memory database that stores data in a key-value format, making it quick to access. It's often used for caching, real-time applications, and quick data lookups. Redis is versatile, supporting various data types like lists and sets, and offers features like replication and persistence to ensure data durability and reliability.

Enabling and using Redis

Enabling Redis depends on the control panel you are using with Hivium. Below are instructions for enabling Redis on our DirectAdmin servers:


Enabling a Redis Socket In DirectAdmin

1. In the "Advanced Features" menu, click "Redis"

2. Click "Enable" to enable the Redis socket

3. Note the "Path to redis socket file" as this will be used later

 

Enable Redis PHP Extension

1. Make sure the Redis PHP Extension is enabled for your PHP version:

2. Go to "Select PHP Version"

3. In "PHP Extensions", make sure the "Redis" PHP extension checkbox is selected. If it is not, simply click the checkbox to enable.


Enable Redis In Your Application

1. To enable Redis in your application (such as LiteSpeed Cache Object Caching), you will need to use the following information:

Host/Socket: This will be the "Path to redis socket file" as noted earlier
Port: 0

Note: If using Redis for multiple domains in your account, make sure each has a unique "Database ID" in your application.

That's it! Redis is now enabled!

If you need any further help, feel free to open a support ticket with us!

    • Related Articles

    • How do I use caching with NGINX balancer?

      Caching in NGINX is the process of storing data in front of web servers. For example, the files a user automatically requests by looking at a web-page can be stored in your NGINX cache directory. When a user returns to a page he’s recently looked at, ...
    • How do I access phpMyAdmin while using DirectAdmin?

      Since we use SSO with DirectAdmin, phpMyAdmin can be accessed as follows: 1. Login to your DirectAdmin account. 2. Go to Account Manager --> Databases 3. Find the database you want to manage in phpMyAdmin and click Manage 4. Click the PHPMYADMIN ...
    • How to solve a connection refused error when trying to use SMTP in DirectAdmin?

      In our DirectAdmin hosting environments, outgoing SMTP via scripts/apps requires permission per user account. How do I request SMTP access? If your script/app needs to send via SMTP, simply submit a ticket to our support team and request that we ...
    • How can I access my website with DirectAdmin since userdir is no longer available?

      Normally, connecting to your website hosted with DirectAdmin was as easy as accessing the temp URL http://[serveripaddress]/~[username]/ but since DirectAdmin chose to remove userdir_access, that is no longer possible. Workarounds include using a ...
    • How do I use a different PHP version in a subdomain or folder?

      There are times you may find the need to use a specific PHP version for a subdomain application that is different from your main account PHP version. The following will show you how to use a different PHP version in specific folder and/or subdomain ...