{"id":114,"date":"2026-08-04T06:39:00","date_gmt":"2026-08-04T03:39:00","guid":{"rendered":"https:\/\/john-nessime.com\/blog\/?p=114"},"modified":"2026-08-03T16:04:24","modified_gmt":"2026-08-03T13:04:24","slug":"redis-object-cache-wordpress","status":"publish","type":"post","link":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/","title":{"rendered":"The OOM Killer Took MySQL: Redis Object Caching for WordPress"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The site went down overnight. MySQL was not running. The logs showed the kernel&#8217;s OOM killer had chosen it, which is what the kernel does when it needs memory and something has to go.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The thing that needed the memory was Redis, installed three weeks earlier to speed up the admin, running with the configuration it shipped with. Redis defaults to no memory limit and a policy of never evicting anything. Left alone it will happily grow until the machine runs out, and then the kernel picks a victim, and it will not necessarily pick Redis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is the framing for everything below. <strong>Redis object caching for WordPress<\/strong> is genuinely one of the highest-value changes you can make to a busy site, and Redis out of the box is configured as a durable datastore, not a cache. You are storing data you can regenerate at any time. The defaults assume the opposite.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Setup takes ten minutes. The gotchas are the post.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What it does, and what it doesn&#8217;t<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress has an object cache built in, and by default it lasts exactly one request. Every page load fetches the same options, terms, post meta and user meta from MySQL, uses them, and throws them away. A persistent object cache keeps that data between requests, so the second visitor does not repeat the first visitor&#8217;s queries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two expectations worth setting before you install anything.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>It is not a page cache.<\/strong> Page caching serves a finished HTML file and never runs PHP. Object caching runs the whole application and makes the database part faster. They live in different drop-ins, do different jobs, and coexist happily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Its biggest effect is where page caching does not reach.<\/strong> Logged-in requests, wp-admin, WooCommerce carts and checkouts, REST API calls. If your front end is already cached and fast while the dashboard crawls, an object cache is aimed exactly at your problem.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Install Redis<\/strong> from your distribution&#8217;s packages, and bind it to localhost unless something remote genuinely needs it.<\/li>\n<li><strong>Install a PHP Redis client.<\/strong> PhpRedis (the PECL extension) is faster than the pure-PHP Predis and is what you want on a real server. Relay is a newer option worth knowing about if you are pushing volume.<\/li>\n<li><strong>Install the Redis Object Cache plugin<\/strong>, then add the constants below to <code>wp-config.php<\/code> <em>before<\/em> enabling the drop-in.<\/li>\n<li><strong>Enable it<\/strong>, which copies <code>object-cache.php<\/code> into <code>wp-content\/<\/code>. That file, not the plugin, is what WordPress actually loads.<\/li>\n<li><strong>Verify it end to end<\/strong>, which is step five for a reason.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ wp-config.php, above the \"That's all, stop editing\" line.\n\ndefine( 'WP_REDIS_HOST',     '127.0.0.1' );\ndefine( 'WP_REDIS_PORT',     6379 );\n\n\/\/ Two different protections, and you want both. The database\n\/\/ number scopes flushes; the prefix prevents key collisions.\ndefine( 'WP_REDIS_DATABASE', 1 );\ndefine( 'WP_REDIS_PREFIX',   'acme-prod:' );\n\n\/\/ Ceiling for keys written with no expiry, so nothing lives forever.\ndefine( 'WP_REDIS_MAXTTL',   86400 );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">One note if you are following an older tutorial: the prefix constant used to be <code>WP_CACHE_KEY_SALT<\/code> and was renamed to <code>WP_REDIS_PREFIX<\/code> in version 2.0 of the plugin, to stop it being confused with a core constant of the same name. The old name is still read for compatibility, but if a guide is still using it, that guide predates a major version and its other advice may too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then prove it works rather than trusting a green indicator on a settings page:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># The plugin's own view.\nwp redis status\n\n# Write through WordPress, read it back through WordPress.\nwp eval 'wp_cache_set(\"probe\",\"ok\",\"test\",60); echo wp_cache_get(\"probe\",\"test\");'\n\n# Then confirm the key landed in the database and prefix you expect.\nredis-cli -n 1 --scan --pattern 'acme-prod:*' | head<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Site Health under Tools will also tell you whether WordPress considers a persistent object cache to be in use. That is the check to trust, because it reflects what core sees rather than what the plugin believes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Gotcha 1: the defaults are a datastore&#8217;s defaults<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The one from the opening paragraph, and the only one on this list that can take a server down.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \/etc\/redis\/redis.conf\n\n# Without a limit, Redis grows until the machine runs out and the\n# kernel kills something. It will not necessarily kill Redis.\nmaxmemory 512mb\n\n# The default policy is to refuse writes rather than evict. Correct\n# for a datastore, wrong for a cache: you want the least recently\n# used keys dropped, silently, forever.\nmaxmemory-policy allkeys-lru\n\n# Cache contents are regenerable by definition. Persisting them buys\n# nothing and costs you fork latency on save and slower restarts.\nsave \"\"\nappendonly no<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Size <code>maxmemory<\/code> against what the machine can spare after MySQL and PHP-FPM have what they need, not against what is currently free. Free memory on a healthy Linux box is mostly page cache, and it is doing useful work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The honest trade-off with <code>allkeys-lru<\/code>: under memory pressure Redis will evict things you would rather it kept, and cache misses go up. That is the correct failure mode. The alternative is write errors surfacing inside WordPress, or an outage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are on managed hosting, do not change any of this. Ask them what they have set, because they may have tuned it and may not appreciate you undoing it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gotcha 2: one Redis, several sites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Redis is a single key-value store. Two WordPress installs pointed at it with default settings both write <code>post_123<\/code> to the same key and read each other&#8217;s data. On a server hosting several sites that is a correctness bug. Where it gets genuinely nasty is staging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Staging is usually a clone of production, which means it inherits production&#8217;s <code>wp-config.php<\/code>, which means it inherits production&#8217;s Redis settings. Now both environments share a namespace, and a developer clearing the cache on staging clears production&#8217;s, or worse, staging serves production&#8217;s cached objects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The two constants guard against different things and you want both:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>WP_REDIS_DATABASE<\/code><\/strong> selects a logical database, of which Redis provides sixteen by default. This scopes flushes, so one site clearing its cache does not clear another&#8217;s.<\/li>\n<li><strong><code>WP_REDIS_PREFIX<\/code><\/strong> namespaces every key. This prevents collisions if two installs ever land in the same database, which is what happens the day somebody copies a config file.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Make the prefix readable and environment-specific: <code>acme-prod:<\/code> and <code>acme-staging:<\/code>, not a random string. It is a namespace, not a secret, and you will want to read it in <code>redis-cli<\/code> at some point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you use Relay as the client, a dedicated database <em>and<\/em> a unique prefix per install is a requirement rather than a suggestion.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gotcha 3: some things are never cached, and one thing is enormous<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Not every cache group is persistent. WordPress marks some as non-persistent, and plugins can mark their own, so those groups keep behaving exactly as they did before you installed anything. If you expected a specific thing to get faster and it did not, this is a likely reason and it is not a misconfiguration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The more interesting one is <code>alloptions<\/code>. WordPress stores all autoloaded options as a <em>single<\/em> cache entry. On a site with a bloated options table, that is one very large key, fetched on every request, and invalidated whenever any autoloaded option is written. Under concurrency that produces a lot of simultaneous re-priming of the same large value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Which means an object cache does not excuse a bloated options table; it changes where the cost lands. Check what your keys actually look like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Reports the largest key per type. If one key dwarfs everything\n# else, it is probably alloptions and your options table needs work.\nredis-cli -n 1 --bigkeys<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Gotcha 4: flushing is not free<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Clearing the object cache on a busy site means every subsequent request rebuilds what it needs from MySQL simultaneously. On a quiet site nobody notices. On a busy one you get a load spike at exactly the moment you were trying to fix something.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Know what your flush actually does. Some implementations issue a Redis-wide flush; others delete only keys matching your prefix. Those are very different operations when the instance is shared, and finding out during an incident is a bad time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also worth deciding deliberately: whether deploys flush the cache. Stale cached objects after a plugin update cause genuinely confusing bugs, so a flush in the deploy script is often right. Just do it knowing it costs a load spike, and put it at the start of a quiet window rather than at five o&#8217;clock on a Friday.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&#8220;Drop-in: invalid&#8221; or &#8220;not connected&#8221;.<\/strong> Usually the PHP extension is missing, or PHP cannot reach Redis on the host and port you gave it. Check with <code>php -m | grep redis<\/code> and <code>redis-cli ping<\/code> from the same machine PHP runs on, which is not always the machine you are logged into.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Everything looks connected but nothing is cached.<\/strong> Something replaced <code>object-cache.php<\/code>. Optimisation plugins install their own drop-in, and only one can win. Check the file&#8217;s contents, not just that it exists.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The site got slower.<\/strong> Latency to Redis. A remote instance across a network adds a round trip to every cache operation, and there are a lot of them per request. Localhost or a Unix socket beats a fast network every time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Stale data after an update.<\/strong> Flush once, then work out which plugin is caching something it should be invalidating. Do not put a flush on every request to make the symptom go away.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Memory keeps climbing.<\/strong> Either no <code>maxmemory<\/code>, or keys written with no expiry and no <code>WP_REDIS_MAXTTL<\/code> ceiling. Check <code>INFO memory<\/code> and the eviction counters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Staging and production interfering.<\/strong> They are sharing a database number, a prefix, or both. Fix the config on staging as part of your restore script so it cannot recur.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common mistakes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Running Redis with default memory settings on a shared box.<\/li>\n<li>Leaving persistence enabled for a pure cache workload.<\/li>\n<li>No prefix and no database number, so sites read each other&#8217;s objects.<\/li>\n<li>Cloning production to staging without changing the Redis settings.<\/li>\n<li>Trusting the plugin&#8217;s status page instead of Site Health and an actual read-back.<\/li>\n<li>Expecting it to speed up an already page-cached front end.<\/li>\n<li>Installing it and ignoring an options table full of autoloaded junk.<\/li>\n<li>Predis on a production site when PhpRedis is available.<\/li>\n<li>Putting Redis on a different host and adding a network hop to every cache call.<\/li>\n<li>Flushing the cache during peak traffic to fix a display bug.<\/li>\n<li>Two plugins competing for the <code>object-cache.php<\/code> drop-in.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best practices<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set <code>maxmemory<\/code> and <code>allkeys-lru<\/code> before you point any site at it.<\/li>\n<li>Disable persistence unless Redis is also doing a job that needs it.<\/li>\n<li>Unique database number and readable prefix per install and per environment.<\/li>\n<li>Bind to localhost, or require a password and TLS if it must be remote.<\/li>\n<li>PhpRedis over Predis, and Redis on the same host as PHP where you can.<\/li>\n<li>A <code>WP_REDIS_MAXTTL<\/code> ceiling so nothing lives forever by accident.<\/li>\n<li>Verify with Site Health plus a write-and-read test, not a status indicator.<\/li>\n<li>Clean up autoloaded options rather than caching the mess.<\/li>\n<li>Monitor memory used, evicted keys and hit rate; a collapsing hit rate is an early warning.<\/li>\n<li>Make staging&#8217;s Redis config part of the restore script, not something to remember.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need Redis if I already have a caching plugin?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Probably, because they solve different problems. Page caching handles anonymous visitors; object caching handles everything that cannot be page cached, which is the admin, logged-in users and anything transactional. Run both.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Redis or Memcached?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For WordPress, Redis, mostly because the tooling and plugin ecosystem around it is better and you get richer diagnostics. Memcached is perfectly capable and slightly simpler. This is not a decision worth agonising over.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How much memory should I give it?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start modestly, watch memory used and evicted keys for a week, and raise it if evictions are constant while free memory remains. Sizing from an article is guessing; sizing from your own eviction counter is not.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is it safe to lose everything in Redis?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, for an object cache. Everything in it is regenerable from MySQL, which is exactly why persistence is unnecessary. Losing it costs a burst of database load, not data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why did my dashboard not get faster?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check the cache is genuinely active first, then look at what else is slow: outbound HTTP calls during admin requests, a large autoloaded options blob, or the heartbeat. An object cache removes repeated database work and nothing else.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should staging share the production Redis?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It can, with a different database number and a different prefix. It is cleaner not to. Either way, set it as part of the restore process so a clone never inherits production&#8217;s cache namespace.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The one thing to remember<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Redis ships configured to protect data it assumes you cannot afford to lose. You are storing data you could regenerate in a second. Every default that follows from that assumption, unlimited memory, no eviction, persistence to disk, is wrong for your use case and one of them can take the server down.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So set <code>maxmemory<\/code> and an eviction policy before you enable the drop-in, give every install its own database and prefix, and verify with Site Health rather than a green dot. Then it is genuinely one of the best changes you can make to a WordPress site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Want it set up properly?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Object caching is quick to install and easy to get subtly wrong in ways that show up weeks later. Work I take on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installing and tuning Redis object caching on a VPS or dedicated server, including memory limits, eviction and persistence settings.<\/li>\n<li>Auditing an existing setup for shared namespaces, competing drop-ins and caches that are not actually active.<\/li>\n<li>Multi-site and multi-environment configuration so staging can never touch production&#8217;s cache.<\/li>\n<li>Cleaning up autoloaded options so the object cache is caching something sensible.<\/li>\n<li>Monitoring for Redis memory, evictions and hit rate, wired into Prometheus and Grafana.<\/li>\n<li>Diagnosing sites where caching was installed and nothing got faster.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Send me your Site Health info and <code>redis-cli INFO memory<\/code>, and I will tell you what is worth changing.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.upwork.com\/freelancers\/~01f15a912ad84a6620\" target=\"_blank\" rel=\"noreferrer noopener\">Work with me on Upwork<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>MySQL was gone in the morning because the kernel picked it to reclaim memory from Redis. Redis ships configured as a durable datastore, and you are using it as a cache. Setup takes ten minutes; the gotchas are memory limits, shared namespaces and the one enormous key nobody mentions.<\/p>\n","protected":false},"author":1,"featured_media":115,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52,107,28],"tags":[109,6,48,131,47,193,22,72,4,110,34,42,39,54,126],"class_list":["post-114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-guides","category-web-performance","category-wordpress","tag-caching","tag-linux","tag-mysql","tag-object-cache","tag-php","tag-redis","tag-self-hosting","tag-sysadmin","tag-troubleshooting","tag-web-performance","tag-website-performance","tag-website-speed","tag-wordpress","tag-wordpress-hosting","tag-wp-cli","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Redis Object Cache for WordPress: Setup and Gotchas<\/title>\n<meta name=\"description\" content=\"Redis object caching for WordPress: the setup, plus the defaults that take your site down, shared-instance collisions and what never gets cached.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redis Object Cache for WordPress: Setup and Gotchas\" \/>\n<meta property=\"og:description\" content=\"Redis object caching for WordPress: the setup, plus the defaults that take your site down, shared-instance collisions and what never gets cached.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"John Nessime\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-04T03:39:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/08\/redis-object-cache-wordpress.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Nessime\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Nessime\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/\"},\"author\":{\"name\":\"John Nessime\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/#\\\/schema\\\/person\\\/ede0b56d0c808f123f57d5d796902105\"},\"headline\":\"The OOM Killer Took MySQL: Redis Object Caching for WordPress\",\"datePublished\":\"2026-08-04T03:39:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/\"},\"wordCount\":2092,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/#\\\/schema\\\/person\\\/ede0b56d0c808f123f57d5d796902105\"},\"image\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/redis-object-cache-wordpress.png\",\"keywords\":[\"Caching\",\"Linux\",\"MySQL\",\"Object Cache\",\"PHP\",\"Redis\",\"Self Hosting\",\"Sysadmin\",\"Troubleshooting\",\"Web Performance\",\"Website Performance\",\"Website Speed\",\"WordPress\",\"WordPress Hosting\",\"WP-CLI\"],\"articleSection\":[\"Technical Guides\",\"Web Performance\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/\",\"url\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/\",\"name\":\"Redis Object Cache for WordPress: Setup and Gotchas\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/redis-object-cache-wordpress.png\",\"datePublished\":\"2026-08-04T03:39:00+00:00\",\"description\":\"Redis object caching for WordPress: the setup, plus the defaults that take your site down, shared-instance collisions and what never gets cached.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#primaryimage\",\"url\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/redis-object-cache-wordpress.png\",\"contentUrl\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/redis-object-cache-wordpress.png\",\"width\":1200,\"height\":627,\"caption\":\"Chart comparing Redis memory growth under two configurations: the default noeviction policy climbing past host RAM until the system runs out, versus allkeys-lru with a maxmemory cap plateauing safely below it.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/technical-guides\\\/redis-object-cache-wordpress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The OOM Killer Took MySQL: Redis Object Caching for WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/\",\"name\":\"John Nessime\",\"description\":\"Cloud, DevOps, Data &amp; AI \u2014 Built, Tested, Explained\",\"publisher\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/#\\\/schema\\\/person\\\/ede0b56d0c808f123f57d5d796902105\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/#\\\/schema\\\/person\\\/ede0b56d0c808f123f57d5d796902105\",\"name\":\"John Nessime\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/cropped-jn.png\",\"url\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/cropped-jn.png\",\"contentUrl\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/cropped-jn.png\",\"width\":512,\"height\":512,\"caption\":\"John Nessime\"},\"logo\":{\"@id\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/cropped-jn.png\"},\"description\":\"AWS Certified Solutions Architect helping businesses build reliable cloud, data, reporting, and automation solutions. I help startups, agencies, and growing businesses replace manual processes and disconnected data with practical AWS architectures, clean data pipelines, useful dashboards, and maintainable automation.\",\"sameAs\":[\"https:\\\/\\\/john-nessime.com\\\/blog\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/john-m-nessime\"],\"url\":\"https:\\\/\\\/john-nessime.com\\\/blog\\\/author\\\/johnnessime\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Redis Object Cache for WordPress: Setup and Gotchas","description":"Redis object caching for WordPress: the setup, plus the defaults that take your site down, shared-instance collisions and what never gets cached.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"Redis Object Cache for WordPress: Setup and Gotchas","og_description":"Redis object caching for WordPress: the setup, plus the defaults that take your site down, shared-instance collisions and what never gets cached.","og_url":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/","og_site_name":"John Nessime","article_published_time":"2026-08-04T03:39:00+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/08\/redis-object-cache-wordpress.png","type":"image\/png"}],"author":"John Nessime","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Nessime","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#article","isPartOf":{"@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/"},"author":{"name":"John Nessime","@id":"https:\/\/john-nessime.com\/blog\/#\/schema\/person\/ede0b56d0c808f123f57d5d796902105"},"headline":"The OOM Killer Took MySQL: Redis Object Caching for WordPress","datePublished":"2026-08-04T03:39:00+00:00","mainEntityOfPage":{"@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/"},"wordCount":2092,"commentCount":0,"publisher":{"@id":"https:\/\/john-nessime.com\/blog\/#\/schema\/person\/ede0b56d0c808f123f57d5d796902105"},"image":{"@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/08\/redis-object-cache-wordpress.png","keywords":["Caching","Linux","MySQL","Object Cache","PHP","Redis","Self Hosting","Sysadmin","Troubleshooting","Web Performance","Website Performance","Website Speed","WordPress","WordPress Hosting","WP-CLI"],"articleSection":["Technical Guides","Web Performance","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/","url":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/","name":"Redis Object Cache for WordPress: Setup and Gotchas","isPartOf":{"@id":"https:\/\/john-nessime.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/08\/redis-object-cache-wordpress.png","datePublished":"2026-08-04T03:39:00+00:00","description":"Redis object caching for WordPress: the setup, plus the defaults that take your site down, shared-instance collisions and what never gets cached.","breadcrumb":{"@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#primaryimage","url":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/08\/redis-object-cache-wordpress.png","contentUrl":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/08\/redis-object-cache-wordpress.png","width":1200,"height":627,"caption":"Chart comparing Redis memory growth under two configurations: the default noeviction policy climbing past host RAM until the system runs out, versus allkeys-lru with a maxmemory cap plateauing safely below it."},{"@type":"BreadcrumbList","@id":"https:\/\/john-nessime.com\/blog\/technical-guides\/redis-object-cache-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/john-nessime.com\/blog\/"},{"@type":"ListItem","position":2,"name":"The OOM Killer Took MySQL: Redis Object Caching for WordPress"}]},{"@type":"WebSite","@id":"https:\/\/john-nessime.com\/blog\/#website","url":"https:\/\/john-nessime.com\/blog\/","name":"John Nessime","description":"Cloud, DevOps, Data &amp; AI \u2014 Built, Tested, Explained","publisher":{"@id":"https:\/\/john-nessime.com\/blog\/#\/schema\/person\/ede0b56d0c808f123f57d5d796902105"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/john-nessime.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/john-nessime.com\/blog\/#\/schema\/person\/ede0b56d0c808f123f57d5d796902105","name":"John Nessime","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/07\/cropped-jn.png","url":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/07\/cropped-jn.png","contentUrl":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/07\/cropped-jn.png","width":512,"height":512,"caption":"John Nessime"},"logo":{"@id":"https:\/\/john-nessime.com\/blog\/wp-content\/uploads\/2026\/07\/cropped-jn.png"},"description":"AWS Certified Solutions Architect helping businesses build reliable cloud, data, reporting, and automation solutions. I help startups, agencies, and growing businesses replace manual processes and disconnected data with practical AWS architectures, clean data pipelines, useful dashboards, and maintainable automation.","sameAs":["https:\/\/john-nessime.com\/blog","https:\/\/www.linkedin.com\/in\/john-m-nessime"],"url":"https:\/\/john-nessime.com\/blog\/author\/johnnessime\/"}]}},"_links":{"self":[{"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":1,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":119,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions\/119"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/media\/115"}],"wp:attachment":[{"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/john-nessime.com\/blog\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}