Support » Plugin: W3 Total Cache » Database Cache accessing incorrect database

  • Ran into an issue where information saved on one site was showing up on another. It was extremely weird, but if I disabled the W3 Total Cache plugin everything worked fine.

    After further investigation, here were the issues/environment:

    – Cloud Dedicated Server (Linux, Apache, PHP-FPM)
    – Using Memcache
    – Database Cache enabled (using Memcache)
    – Sites affected were installed in different directories on the same domain & cPanel account
    – Even if we migrated the sites to their own domains and cPanel accounts, we still experienced the issue
    – Single WP installs, not multisite
    – The onset of these issues was intermittent, and didn’t occur on all sites at any specific interval, but once it started the only way to fix was to disable W3 Total Cache.
    – .htaccess was getting modified with incorrect site redirect info
    – Logging into one site would redirect you to a different site, logged in, even if your credentials weren’t for that site.

    I assume it has something to do with memcache, and somehow the plugin is looking to the wrong database for information. It just seems like this shouldn’t happen under any circumstances, but it did.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Marko Vasiljevic



    For the time being, the domain must be used with the separate key. At this moment it is not possible to use the same memcached server for multiple websites belonging to the same domain.

    Swap out Memcache with Redis, redis lets you define how many Redis DB’s you want and W3TC lets you choose which Redis database to connect it to.

    It works similarly to memcache and can be installed via YUM if you have root access. Redis docs are pretty good and its fairly easy to manage once you have a quick read.

    Ypu can also set a max amount of RAM for Redis and configure key evictions to free up space when the memory runs out

    Hi Marco. That’s interesting. There was no way for us to know that we would run into that issue until it happened. It might be an idea to note this on the settings page.
    Even after the sites were migrated from subdirectories to their own domains they still had the same issue.

    Is this only an issue with database caching using memcache, or are you saying that we shouldn’t use memcache at all for sites on the same domain?



    You can use Memcache for everything else without any issues. Once again, I am sorry and if there is anything else, please feel free to ask.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Database Cache accessing incorrect database’ is closed to new replies.