rhubarbgroup / .github

Community Health Files
https://github.com/rhubarbgroup/
0 stars 0 forks source link

Uncaught Error: Class "Relay\Relay" not found #13

Closed jordantrizz closed 1 year ago

jordantrizz commented 1 year ago

Description

Installed Relay, added the following to wp-config.php

define('WP_REDIS_CLIENT','relay')

Everything seemed to be working until running wp-cli

Fatal error: Uncaught Error: Class "Relay\Relay" not found in /home/user/sites/website.com/htdocs/wp-content/object-cache.php:775
Stack trace:
#0 /home/user/sites/website.com/htdocs/wp-content/object-cache.php(543): WP_Object_Cache->connect_using_relay()
rhubarbgroup/redis-cache#1 /home/user/sites/website.com/htdocs/wp-content/object-cache.php(256): WP_Object_Cache->__construct()
rhubarbgroup/redis-cache#2 /home/user/sites/website.com/htdocs/wp-includes/load.php(750): wp_cache_init()
rhubarbgroup/redis-cache#3 /home/user/sites/website.com/htdocs/wp-settings.php(131): wp_start_object_cache()
rhubarbgroup/redis-cache#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1336): require('...')
rhubarbgroup/redis-cache#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1254): WP_CLI\Runner->load_wordpress()
rhubarbgroup/redis-cache#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
rhubarbgroup/redis-cache#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()
rhubarbgroup/redis-cache#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
rhubarbgroup/redis-cache#9 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('...')
rhubarbgroup/redis-cache#10 /usr/local/bin/wp(4): include('...')
rhubarbgroup/redis-cache#11 {main}
  thrown in /home/user/sites/website.com/htdocs/wp-content/object-cache.php on line 775
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

Expected Behavior

There shouldn't be an error.

Actual Behavior

There's an error.

Possible Fix

Steps to Reproduce

  1. Install relay
  2. Added define('WP_REDIS_CLIENT','relay') to wp-config.php
  3. run wp-cli ex (wp user)

Additional context

Environment