Welcome to Centmin Mod Community
Register Now

Wordpress WordPress not using memcache and memcached warnings

Discussion in 'Blogs & CMS usage' started by EckyBrazzz, Aug 19, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    589
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    9:36 AM
    1.17.x
    10.3.x
    Hi there,

    For testing, I install a plugin to see how my WordPress sites are preforming. The plugin is Query Monitor by John Blackbourn and it gives some nice information.

    It also told me that WordPress is not using memcache and memcached
    Code (Text):
    Object Cache
    
    98.9% hit rate (24,553 hits, 282 misses)
    
    External object cache not in use
    
    [LIST]
    [*]The Memcache extension for PHP is installed but is not in use by WordPress
    [*]The Memcached extension for PHP is installed but is not in use by WordPress
    [*]The Redis extension for PHP is installed but is not in use by WordPress
    [/LIST]
    Opcode cache in use: Zend OPcache
    



    But after installing this plugin MemcacheD Is Your Friend, an ancient one, it seems to be resolved. There is also a forked one here with some commits here on wpbullet/memcached-is-your-friend

    Code (Text):
    [SIZE=4]Object Cache[/SIZE]
    
    100.0% hit rate (23,189 hits, 4 misses)
    
    External object cache in use
    
    Opcode cache in use: Zend OPcache
    
    


    Now the question: Can we use it or not. Seems to be interesting.
    Now I can see the results of my Memcached
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,350
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    10:36 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Object caching is separate from full page caching and yes you can use redis or memcached object cache addons, but in past some folks report that with object caching enable, sometimes making wp-admin setting changes don't register until they clear the object cache. Reason why centmin.sh menu option 22 no longer installs a wordpress object cache plugin by default. So really depends on your needs and if you find it acceptable and are aware to always clear your caches after making wp-admin settings changes everytime when using object cache plugins.

    FYI, redis object cache Redis Object Cache is usually what I'd use instead of memcached if you have already installed redis server Redis - Insight Guide - How to install Redis server on Centmin Mod LEMP stack
     
    Last edited: Aug 19, 2019
    • Informative Informative x 1
  3. EckyBrazzz

    EckyBrazzz Active Member

    589
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    9:36 AM
    1.17.x
    10.3.x
    Currently, I use on most of my sites Fastcgi_cache (PHP-FPM) on with the nginx cache and with the wp-rocket, but it sometime gives strange effects backend. Admin panel completely mixed up until I get it done to clear the cache.

    Will do some testing on my test domain and with duplicator to see what gives the best result

    As I see now, the Redis Object Cache is more actual than what I mentioned the wpbullet/memcached-is-your-friend

    I stopped using Redis after my issues with a theme, but that was resolved with a little edit in the wp_updater script.
    Code (Text):
    #/usr/bin/wp cli update --allow-root --skip-themes
    echo "update wp-cli"
    rm -rf /usr/bin/wp
    wget -4cnv --no-check-certificate https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/bin/wp --tries=3
    chmod 0700 /usr/bin/wp
    /usr/bin/wp --info --allow-root --skip-themes
    /usr/bin/wp plugin status --allow-root --skip-themes
    /usr/bin/wp plugin update --all --allow-root --skip-themes | tee .wpcli-status
    /usr/bin/wp core check-update --allow-root --skip-themes
    
    # for major core updates uncomment 3 lines directly below
    /usr/bin/wp core update --allow-root --skip-themes
    /usr/bin/wp core update-db --allow-root --skip-themes
    /usr/bin/wp core update --allow-root --skip-themes
    
    # for minor core updates uncomment 3 lines directly below
    /usr/bin/wp core update --minor --allow-root --skip-themes
    /usr/bin/wp core update-db --allow-root --skip-themes
    /usr/bin/wp core update --minor --allow-root --skip-themes