WordPress with Memcached?

So Cloudways advertises that it’s memcache ready. I’ve just sort of assumed that my WP app has been using memcache by default this entire time, but I’ve just learned that memcache isn’t actully used unless it’s been hooked in through a plugin.

So I’m looking for plugin recommendations to get this up and running.

Cloudways actually recommend W3 Total Cache as per https://www.cloudways.com/blog/wordpress-memcached-server-tutorial/

Though I’m looking for other opinions please :slight_smile:

Hey there, you can use this script: https://github.com/bonny/memcachy it’s an object cache, not a plugin.

Here the explanation on how to set it up: https://www.plesk.com/blog/product-technology/reduce-server-load-with-memcached/

I found this plugin otherwise: https://wordpress.org/plugins/memcached-redux/ been suggested by the guys at WP Rocket.

Memcached redux has a problem with php 7.3. unfortunately. But this one seems fine to me.

Many thanks for your suggestions. I am a little worried about the aforementioned plugins due to the long periods since they’ve received updates.

I will look into this further.

As a side note - does anyone have any opinions on Redis vs Memcache (and which is better suited to WP/WooCommerce)?

Hello suanliantp - do you currently use this, and if so, what version of PHP are you using? Thanks for your help!

Yes I just install yesterday. It is working fine. My php version 7.3

I’ve never noticed much of a difference between using a Redis/Memcache plugin vs not using one. What is helpful, however, is using a caching plugin such as Breeze or WP Rocket that works with the Varnish cache.

One potential problem with Memcache/Redis Cache is that it will be shared among all of the applications on the server. If you own all of the websites on the server, it’s not a problem, but if the sites belong to customers of yours, then there are security and privacy implications to doing this. A malicious website could look at what the other websites are storing in the Redis/Memcache.

Thanks for your reply!

For anyone else interested in this, I ended up doing some more reading/YouTubing and decided to move forward with using this solution https://github.com/bonny/memcachy

It’s very easy to set up - simply download the ZIP package from the link above, and place the contained files straight into wp-content/ via FTP.

There is no further configuration required, and I was immediately able to confirm this was working by viewing “Memcached Hit Rate” inside the server monitoring tab. Furthermore, database calls perform faster, which I have confirmed using the plugin Query Monitor (comparing results before vs after).

Thanks to all contributions, and to the Cloudways team - I love this platform!

1 Like

Can you develop? I have it installed with php 7.3 and have no problems.


Sorry It might not be because of the php version.

This is the error I got…I can’t activate the plugin.

Kind Regards,

If page caching takes care of caching static resources (images, HTML, CSS and JS files) and browser caching manages the same resources within the browser, object caching is devoted to your database .

The aim of object caching is to cache query results from your database.

An efficient database is one of the crucial factors for a fast website: WordPress is a content management system that is naturally dependent on its MySQL database.

Every time users (or crawlers) make a request on your website, they generate database queries. If your site experiences a large number of requests to the database, queries can quickly pile up, overwhelming your server and slowing down your website.

Hope this information helps!