Title: Memcached activation error
Last modified: November 11, 2022

---

# Memcached activation error

 *  [etr316](https://wordpress.org/support/users/etr316/)
 * (@etr316)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/memcached-activation-error/)
 * I down loaded the plugin memcached.4.0.0.zip, after a successful install it won’t
   activate, I receive an error.
 * Does anyone know what causes the following error? Fatal error: Cannot redeclare
   wp_cache_add() (previously declared in /home/hnshwagpa6rs/public_html/nsfwbuttons.
   com/wp-includes/cache.php:41) in /home/hnshwagpa6rs/public_html/nsfwbuttons.com/
   wp-content/plugins/memcached/object-cache.php on line 19
 * I am using the latest word press. 6.1

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16188957)
 * Hey! Did you take a look at [https://wordpress.org/plugins/memcached/#installation](https://wordpress.org/plugins/memcached/#installation)?
 *  [tigmewp](https://wordpress.org/support/users/tigmewp/)
 * (@tigmewp)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16194873)
 * Hallo Memcached Object Cache Team
 * I experience the exact same error upon activation of your plugin:
 * > Plugin could not be activated because it triggered a fatal error.
   >  Fatal error:
   > Cannot redeclare wp_cache_add() (previously declared in /usr/www/users/whalesdrdb/
   > wp-includes/cache.php:41) in /usr/www/users/whalesdrdb/wp-content/plugins/memcached/
   > object-cache.php on line 19
 * I followed your installation guide, but the moment the **object-cache.php** file
   is copied into the **wp-content** folder as directed the whole site (back- and
   frontend) crashes.
 * The page caching plugin used is WP-Optimize 3.2.9 with the Vantage theme by SiteOrigin
   on WordPress 6.1 and the Memcached module has been enabled on my server.
 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16195873)
 * > I followed your installation guide, but the moment the object-cache.php file
   > is copied into the wp-content folder as directed the whole site (back- and 
   > frontend) crashes.
 * What errors do you see? What does “the whole site crashes” mean?
 *  [tigmewp](https://wordpress.org/support/users/tigmewp/)
 * (@tigmewp)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16196032)
 * [@aidvu](https://wordpress.org/support/users/aidvu/), thank you for your reply.
 * > What does “the whole site crashes” mean?
 * The one where you get the white screen and the following error messages:
 * **BACKEND:**
 * > “The site is experiencing technical difficulties. Please check your site admin
   > email inbox for instructions.”
 * **FRONTEND:**
 * > “The site is experiencing technical difficulties.”
 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16196046)
 * [@tigmewp](https://wordpress.org/support/users/tigmewp/) What’s in the PHP and
   web server logs? It’s fairly hard to figure anything without the logs.
 * In general, this plugin shouldn’t be installed. Just the object cache copied 
   over the one in `wp-content/`.
 *  [tigmewp](https://wordpress.org/support/users/tigmewp/)
 * (@tigmewp)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16196261)
 * There isn’t a file called object-cache.php in the wp-content folder and when 
   I copy the **object-cache.php** file from your plugin folder into the **wp-content
   folder**, then the following error is displayed:
 * > `Fatal error: Uncaught Error: Class "Memcache" not found in /usr/www/users/
   > website/wp-content/object-cache.php:849 Stack trace: #0 /usr/www/users/website/
   > wp-content/object-cache.php(82): WP_Object_Cache->__construct() #1 /usr/www/
   > users/website/wp-includes/load.php(730): wp_cache_init() #2 /usr/www/users/
   > website/wp-settings.php(131): wp_start_object_cache() #3 /usr/www/users/website/
   > wp-config.php(35): require_once('/usr/www/users/...') #4 /usr/www/users/website/
   > wp-load.php(50): require_once('/usr/www/users/...') #5 /usr/www/users/website/
   > wp-blog-header.php(13): require_once('/usr/www/users/...') #6 /usr/www/users/
   > website/index.php(17): require('/usr/www/users/...') #7 {main} thrown in /usr/
   > www/users/website/wp-content/object-cache.php on line 849`
 * Below is the full PHP error log on the server:
 * > `[14-Nov-2022 12:28:11 UTC] PHP Fatal error: Cannot redeclare wp_cache_add()(
   > previously declared in /usr/www/users/site/wp-includes/cache.php:41) in /usr/
   > www/users/site/wp-content/plugins/memcached/object-cache.php on line 19
   >  [14-
   > Nov-2022 12:28:14 UTC] PHP Fatal error: Cannot redeclare wp_cache_add() (previously
   > declared in /usr/www/users/site/wp-includes/cache.php:41) in /usr/www/users/
   > site/wp-content/plugins/memcached/object-cache.php on line 19 [14-Nov-2022 
   > 12:28:14 UTC] PHP Fatal error: Cannot redeclare wp_cache_add() (previously 
   > declared in /usr/www/users/site/wp-includes/cache.php:41) in /usr/www/users/
   > site/wp-content/plugins/memcached/object-cache.php on line 19 [14-Nov-2022 
   > 12:28:25 UTC] PHP Warning: Undefined variable $a_regionUrl in /usr/www/users/
   > site/wp-content/themes/whalesandmore/includes/pods-custom-tourism-04-advertiser-
   > widget-template.php on line 161 [14-Nov-2022 12:28:25 UTC] PHP Warning: foreach()
   > argument must be of type array|object, null given in /usr/www/users/site/wp-
   > content/themes/whalesandmore/includes/pods-custom-tourism-04-advertiser-widget-
   > template.php on line 161 [14-Nov-2022 12:29:03 UTC] PHP Fatal error: Uncaught
   > Error: Class “Memcache” not found in /usr/www/users/site/wp-content/object-
   > cache.php:849 Stack trace: #0 /usr/www/users/site/wp-content/object-cache.php(
   > 82): WP_Object_Cache->__construct() #1 /usr/www/users/site/wp-includes/load.
   > php(730): wp_cache_init() #2 /usr/www/users/site/wp-settings.php(131): wp_start_object_cache()#
   > 3 /usr/www/users/site/wp-config.php(35): require_once(‘/usr/www/users/…’) #
   > 4 /usr/www/users/site/wp-load.php(50): require_once(‘/usr/www/users/…’) #5 /
   > usr/www/users/site/wp-blog-header.php(13): require_once(‘/usr/www/users/…’)#
   > 6 /usr/www/users/site/index.php(17): require(‘/usr/www/users/…’) #7 {main} 
   > thrown in /usr/www/users/site/wp-content/object-cache.php on line 849 [14-Nov-
   > 2022 12:29:14 UTC] PHP Fatal error: Uncaught Error: Class “Memcache” not found
   > in /usr/www/users/site/wp-content/object-cache.php:849 Stack trace: #0 /usr/
   > www/users/site/wp-content/object-cache.php(82): WP_Object_Cache->__construct()#
   > 1 /usr/www/users/site/wp-includes/load.php(730): wp_cache_init() #2 /usr/www/
   > users/site/wp-settings.php(131): wp_start_object_cache() #3 /usr/www/users/
   > site/wp-config.php(35): require_once(‘/usr/www/users/…’) #4 /usr/www/users/
   > site/wp-load.php(50): require_once(‘/usr/www/users/…’) #5 /usr/www/users/site/
   > wp-admin/admin-ajax.php(22): require_once(‘/usr/www/users/…’) #6 {main} thrown
   > in /usr/www/users/site/wp-content/object-cache.php on line 849`
 * I hope this helps?
 *  Plugin Contributor [Andrija Vučinić](https://wordpress.org/support/users/aidvu/)
 * (@aidvu)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16196954)
 * > Fatal error: Uncaught Error: Class “Memcache” not found
 * Ok, this makes more sense. There are 2 PHP extensions for the `memcached` backend.
 * – [https://pecl.php.net/package/memcache](https://pecl.php.net/package/memcache)(
   supported)
    – [https://pecl.php.net/package/memcached](https://pecl.php.net/package/memcached)(
   not supported)
 * That is what the message is about.
 *  [tigmewp](https://wordpress.org/support/users/tigmewp/)
 * (@tigmewp)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16198849)
 * Hallo [@aidvu](https://wordpress.org/support/users/aidvu/)
 * Thank you for your time and efforts, but I am now abandoning this project. It
   requires more knowledge than I currently possess.
 * After following your installation instructions as well as the steps in [@ufukart](https://wordpress.org/support/users/ufukart/)’
   s 5 star review it still is not working.
 * Kind regards,
    Mariska
 *  [Vincèn](https://wordpress.org/support/users/vincen/)
 * (@vincen)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16211492)
 * Same issue here, gave up on this plugin as installation explanations are sorry
   to say very confusing and not clear at all
 *  [paul](https://wordpress.org/support/users/paul/)
 * (@paul)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16215585)
 * `Fatal error: Cannot redeclare wp_cache_add() (previously declared in /usr/local/
   www/wordpress/wp-content/object-cache.php:60) in /usr/local/www/wordpress/wp-
   content/plugins/memcached/object-cache.php on line 19`
 * Same error here. Can’t say I like the Site Health screen telling me I need an
   object cache when none of the ones I have tried are detected or install cleanly.
   Can that test be disabled?
 *  [tigmewp](https://wordpress.org/support/users/tigmewp/)
 * (@tigmewp)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16218016)
 * [@paul](https://wordpress.org/support/users/paul/)
 * If you have Memcached enabled on your hosting server, then you can try Powered
   Cache ([https://wordpress.org/plugins/powered-cache/](https://wordpress.org/plugins/powered-cache/)).
   The free version of this caching plugin automatically detects and connects to
   your server’s Memcached module.
 * If you cannot enable the Memcached module on your hosting server, then you can
   try Docket Cache ([https://wordpress.org/plugins/docket-cache/](https://wordpress.org/plugins/docket-cache/)).
   The plugin stores persistent Object Cache as PHP code.
 * Hope this helps.
    -  This reply was modified 3 years, 6 months ago by [tigmewp](https://wordpress.org/support/users/tigmewp/).

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Memcached activation error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memcached.svg)
 * [Memcached Object Cache](https://wordpress.org/plugins/memcached/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memcached/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memcached/)
 * [Active Topics](https://wordpress.org/support/plugin/memcached/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memcached/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memcached/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 11 replies
 * 5 participants
 * Last reply from: [tigmewp](https://wordpress.org/support/users/tigmewp/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/memcached-activation-error/#post-16218016)
 * Status: not resolved