Wordpress Redis



Cipherlab driver download. Choosing between Memcached or Redis for your WordPress cache is a tough decision. Not because they have vastly different performance profiles (they don’t), but because either choice is a good one depending on your needs. In this post we’re going to explore the differences between Redis and Memcached, how they perform for WordPress, and a lot of different non-performance things you should consider when making your choice.

  1. Wordpress Redis Object Cache Not Connected
  2. Wordpress Redis
  3. Wordpress Redis Cache Plugin
Wordpress Redis

Search WordPress.org for: Submit Toggle Menu. Showcase; Learn; Themes; Plugins; Mobile; Support. Five for the Future. Best redis wordpress solution = redis cache at nginx level + redis object wp plugin (for db cache) however technically if you are talking in terms of functionality, redis cache at nginx level does what wp super cache and cache enabler does = offload the load from php-fpm by generating wp page level caching either at redis/memory level or at nginx static page file level (wp super cache or cache. Unlike cache plugins, that run from inside the WordPress site, Redis is a server-side cache. WordPress cache plugins are made to accelerate the rendering of the website frontend by caching static versions of the pages that don’t run any code (for instance, the regular pages and posts that are served as static cached content). Head back to wp-admin of your website and activate the Redis plugin. After enabling the plugin head to settings of Redis and Enable Object Cache. If the path and installation are successful you should be able to see the following screen. Congratulation you have successfully enabled Redis on your WordPress website. You can Learn basic Redis.

What is Memcached?

Memcached is an open-source, high performance, distributed memory object caching system. What does that mean? It means you can store a bunch of strings in memory and access them really fast. From a WordPress perspective, it means that using a caching plugin like W3 Total Cache we can store the results of the complicated SQL queries that WordPress does in memory and have them available instantly.

Wordpress Redis

What is Redis?

Redis is an open source in-memory store that can be used as a cache or a message broker. It’s a bit different then Memcached because you get a lot more out of the box with it. For example, Redis has built in replication, transactions, disk persistence, and provides high availability and partitioning. All those features means that managing WordPress can be a little harder to do, but not much harder. Especially if you just need to use it as a cache.

Performance

Both Redis and Memcached have excellent performance. They’re both used by some of the largest websites in the world and are fully ingrained in the Fortune 500. Given that all things are not created equal, let’s see how they perform with a read-heavy WordPress site (this blog).

The Setup

The load tests are performed against the DigitalOcean WordPress Marketplace image with either Redis or Memcached installed alongside of it. The machines have 2 vCPUs, 2 GB RAM and live in DigitalOcean’s SFO2 (San Francisco) data center.

The load test configuration:

  • 500 concurrent users
  • 2 users / second ramp up
  • 45 minute test ( ran twice )
  • Traffic comes from Digital Ocean’s NYC3 data center.

The content of the load test is a copy of this blog.

Baseline Performance (No Cache)

The baseline performance for WordPress with no cache isn’t great.

The response time also isn’t great. A little over 2 seconds on average.

Redis Performance

Once we install Redis and configure W3 Total Cache to use it, the number of requests that we can handle increases substantially.

The requests remain steady at around 300 per second and no failures are recorded. The response time also improves quite a bit.

475ms isn’t bad at all. That’s 4 times faster response times then without any caching at all.

Memcached Performance

With Memcached installed and W3 Total Cache configured to use it, we see some excellent performance.

In this situation, Memcached performs even better then Redis with 425 req/s versus Redis’ 300 req/s. Response time improvements are similar.

The Memcached response time is almost 3 times faster than the Redis response time. In general, the results where Memcached is faster than Redis are surprising. In most benchmarks Redis is equal or faster than Memcached, so it’s likely a configuration problem.

Other Considerations

Wordpress Redis Object Cache Not Connected

Wordpress Redis

When deciding what cache to use with your WordPress setup, there are a few other considerations your should be looking at:

  • Ease of setup – As you can see from the performance results above, Memcached has better performance out of the box. Knowing what I know about Redis this is likely a configuration issue, but the fact that I could get that level of performance with no configuration from Memcached is a good data point.
  • 3rd Party Hosting – Do you really want to manage your own Redis or Memcached server? If you don’t, you’ll want to look at the landscape of 3rd party providers. Redis has a robust provider ecosystem. Memcached’s is a little less robust.
  • Persistence – Do you need your cache to survive a reboot? This is important if the cost of re-populating your cache is too high for your system. If you do need persistence, Redis is your best option.
  • High AvailabilityIf you need high availability of your caching cluster, Redis is the clear winner here. Memcached can be made to operate this way, but Redis has it baked in to the core of the application.

Wordpress Redis

If you’d like to see the full results of the load testing runs on Kernl, see the links below.

Wordpress Redis Cache Plugin

  • Baseline (No Cache)
  • Memcached Test #1
  • Memcached Test #2
  • Redis Test #1
  • Redis Test #2