redis is not working

aryanraj

Verified User
Joined
Feb 1, 2024
Messages
17
Custom Build is done and Redis is enabled in custom build (GUI) and domain. However, it is not working.
Code:
root@server:~# redis-cli status
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Also, Redis plugin for WordPress failed to connect.

Code:
Redis is unreachable: Connection refused [tcp://127.0.0.1:6379]

Redis is not showing in services.

Build log at the end:
Code:
make[1]: Leaving directory '/usr/local/directadmin/custombuild/tmp/tmp.09efchX41a.redis-7.2.4.tar.gz/src'
Enabling redis in systemd...
Done redis.
 

Attachments

  • SCR-20240201-ohcr.png
    SCR-20240201-ohcr.png
    80.2 KB · Views: 335
  • SCR-20240201-unpu.png
    SCR-20240201-unpu.png
    95.8 KB · Views: 101
  • SCR-20240201-unkx.png
    SCR-20240201-unkx.png
    88.9 KB · Views: 104
Adjust connection parameters to use a unixsocket connection. This can be done by adding the following content:
define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/home/<user>/.redis/redis.sock' );
to /home/<user>/domains/<domain>/public_html/wp-config.php BEFORE the last line which includes wp-settings.php.

**Make sure to replace <user> ** with the DirectAdmin user you're trying to configure. Note that the path defined by WP_REDIS_PATH should be the path mentioned in step 2.

After refreshing the wordpress admin page, you'll notice that the connection status changed to "Connected".
 
.. and if its in a wp plugin (caching plugins as example)
host => /home/<user>/.redis/redis.sock
port => 0
dbindex => 0
 
appreciate all the help. i fixed it by installing nginx again and then redis.
 
Back
Top