WordPress and Redis don’t work together

How I discovered this problem?
I simply noticed that changes in settings on any affiliate plugin are not being registered properly in Redis cache. So, WordPress and Redis don’t like each other.

What does the problem look like?
The settings being saved for the first or maybe even second time work just fine. After that, once you make more changes in the settings, and if you refresh the page or leave the settings and come back, you will notice that the settings are not saved nor registered as being changed at all.

So, WordPress and Redis story

Serverpilot has nice tutorial on how to configure the redis object cache. Before I installed and connected redis object cache on my WordPress site, everything worked perfectly. Once I connected my site to use redis, the issues described got repeated.

Siteground‘s shared hosting uses Memcached for object cache. I had no problem at all using these plugins. This only confirms that issue lies only with redis.

What is the solution to the problem then?
There are several examples on how to bypass these issues before (or if) they get fixed by I don’t know who, whoever. Let’s check the workarounds below.

  • If you have this possibility, use Memcached.
    …or
  • Try flushing Redis cache every time you change something in the settings… or
  • For EasyEngine users flushing Redis cache might not work within the plugin (it did not for me).
    Seems like Redis and the Nginx helper plugin do not communicate properly. Flushing cache worked on Serverpilot though, but Serverpilot recommends different plugin, which works very nice and flushes the redis cache when you tell it so.
    Your best bet here, for EE, is to ssh to your server and clear the object cache via command line every time you make changes within that particular plugin (AffiliateWP or Yith Affiliate Premium, or other if you have one).
    ee site clean example.com --object

That’s it. WordPress and Redis together suck big.

More from author

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related posts

Latest posts

Preload, DNS Prefetch, Preconnect

Find out what does Preload, DNS Prefetch an Preconnect functions are, how they differ from each other and where to use them.

All in One SEO Pack Pro vs Yoast SEO Pro

The ultimate comparison: All in One SEO pack Pro vs Yoast SEO Pro. Find out which one is the best in the year 2020.

How to open asar files

How to open asar files you ask yourself. All you need is 7-zip and one plugin.