rhubarbgroup / .github

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

Cannot declare class WP_Object_Cache, because the name is already in use #40

Closed laotoutou closed 9 months ago

laotoutou commented 9 months ago

Description

When I click the 'enable' button to activate the plugin, my website crashes. In the logs, I found the following error:

Cannot declare class WP_Object_Cache, because the name is already in use in /data/wp-content/object-cache.php on line 357

Additional context

My website's root directory is located at /var/www/html, and the wp-content directory within the root is a symbolic link, situated at /data/wp-content.

Environment

Status: Not enabled Client: Drop-in: Not installed Disabled: No PhpRedis: 6.0.2 Relay: Not loaded Predis: 2.1.2 Credis: Not loaded PHP Version: 8.3.1 Plugin Version: 2.5.0 Redis Version: Unknown Multisite: No Metrics: Disabled Metrics recorded: 0 Filesystem: Writable

tillkruss commented 9 months ago

Try deleting the wp-content/object-cache.php by hand and then clicking "Enable Object Cache" again.

If that still crashes, then you're using a plugin that conflicts with Redis Object Cache. Try disabling every plugin one-by-one.