Error establishing a Redis connection? Fix by removing object-cache.php

Fix 'Error establishing a Redis connection' after migration: delete or rename object-cache.php in public_html or wp-content, then reload your WordPress site.

Spread the love

So you just migrated your WordPress site from one host to another, everything looks like it went smooth, your DNS is pointing where it should, your SSL certificate is installed correctly, and then you load up your site and get hit with this:

“Error establishing a Redis connection.”

Yeah. I’ve been there. Twice, actually.

Exhausted gif via giphy.
“exhausted” via giphy.

I ran into this exact problem when I was transferring my site from Cloudways to Hostinger, and it’s one of those things where you’re sitting there going “but I did everything right?” because you did do everything right. Your DNS is configured, your SSL is good, the migration went through cleanly.

And yet your site is just throwing this error at you like you broke something.

The good news is the fix is stupid simple. The problem isn’t your configuration, it’s a leftover caching file from your old host.

Warning callout icon.

Warning

Only do this after the migration is complete. Don’t edit or delete files while your site is still being transferred.

Don’t let a Redis connection error stop your site transfer

What’s Actually Causing This

When you move from one hosting platform to another, the server configurations between the two aren’t always identical (they’re usually not, honestly). Your old host was running Redis for object caching, and that’s great, but when you pull your site files over to the new host the object caching drop-in file comes along for the ride.

The new server doesn’t match the old Redis setup, so it tries to connect using the old configuration and just… fails.

Quick fix for redis connection error after site transfer
Don't let a redis connection error stop your site transfer

The file causing all the drama is typically called object-cache.php. It’s a WordPress drop-in file that lives in your site’s directory and it’s looking for a Redis server that doesn’t exist on your new host anymore, or at least isn’t configured the same way.

How to Fix It (Takes About 30 Seconds)

Now you can only do this after the website is fully transferred over and pulled over to your new host. Don’t go messing with files mid-migration.

Step 1: Log into your Hostinger dashboard (or whatever hosting platform you migrated to) and go to Files then File Manager. You’ll get your whole file directory which is pretty cool if you haven’t poked around in there before.

Step 2: Head over to public_html. Check the site root first. You might see the object caching file right there at the root level.

But if you don’t see it there, go into the wp-content folder because that’s the standard location for WordPress drop-in cache files and that’s where I found it the second time around.

Step 3: Once you find object-cache.php, you’ve got two options.

  • You can just straight up delete it. That’s what I did and it fixed the problem immediately.
  • Or if you’re nervous about deleting files from your server (which, fair enough) just rename the file to something different, like object-cache-old.php (or literally anything else). When the platform tries to look for that file it can’t find it anymore and it just assumes it’s not there. Same result, less anxiety.

Step 4: Load up your website again. That should fix your problem, because that certainly fixed mine. Both times.

Info icon.

Did You Know?

object-cache.php is a special drop-in must-use file. WordPress will automatically use it if it exists, even after you’ve moved to a totally different server.

Why This Works

The object-cache.php file is basically telling WordPress “hey, use this Redis configuration for caching” but the Redis setup on your new server either doesn’t exist or is completely different from what that file expects.

By removing the file (or renaming it so WordPress can’t find it) you’re just telling WordPress to stop trying to connect to a Redis instance that isn’t there. WordPress falls back to its default behavior and your site loads fine.

Season 9 nbc gif by the office gif via giphy.
“season 9 nbc gif” via giphy.

If you want object caching on your new host later, you can always set that up fresh with whatever caching solution your new host supports. But that’s a separate thing entirely—the goal is getting back online after the migration.

Quick Recap

  • Migrate your site to a new host
  • Get the Redis connection error even though DNS and SSL are fine
  • Go to File Manager in your hosting dashboard
  • Find object-cache.php in either public_html or wp-content
  • Delete or rename it
  • Reload your site
  • Done

It’s really that simple. The fix takes 30 seconds once you know where to look. 🤙

Do you ever get frustrated when transferring a website; check every setting only to find a hidden caching file messing everything up; wishing for easier solutions? 🤔
Do you ever get frustrated when transferring a website; check every setting only to find a hidden caching file messing everything up; wishing for easier solutions? 🤔

Leave a Comment

Frequently asked questions (FAQ)

LiaisonLabs is your local partner for SEO & digital marketing services in Mount Vernon, Washington. Here are some answers to the most frequently asked questions about our SEO services.

SEO (Search Engine Optimization) is the process of improving your website's visibility in search engines like Google. When potential customers in Mount Vernon or Skagit County search for your products or services, SEO helps your business appear at the top of search results. This drives more qualified traffic to your website—people who are actively looking for what you offer. For local businesses, effective SEO means more phone calls, more foot traffic, and more revenue without paying for every click like traditional advertising.

A local SEO partner understands the unique market dynamics of Skagit Valley and the Pacific Northwest. We know the seasonal patterns that affect local businesses, from tulip festival tourism to agricultural cycles. Local expertise means we understand which keywords your neighbors are searching, which directories matter for your industry, and how to position your business against local competitors. Plus, we're available for in-person meetings and truly invested in the success of our Mount Vernon business community.

SEO is a long-term investment, and most businesses begin seeing meaningful results within 3 to 6 months. Some quick wins—like optimizing your Google Business Profile or fixing technical issues—can show improvements within weeks. However, building sustainable rankings that drive consistent traffic takes time. The good news? Unlike paid advertising that stops the moment you stop paying, SEO results compound over time. The work we do today continues delivering value for months and years to come.

SEO pricing varies based on your goals, competition, and current website health. Local SEO packages for small businesses typically range from $500 to $2,500 per month, while more comprehensive campaigns for competitive industries may require a larger investment. We offer customized proposals based on a thorough audit of your website and competitive landscape. During your free consultation, we'll discuss your budget and create a strategy that delivers measurable ROI—because effective SEO should pay for itself through increased revenue.

Both aim to improve search visibility, but the focus differs significantly. Local SEO targets customers in a specific geographic area—like Mount Vernon, Burlington, Anacortes, or greater Skagit County. It emphasizes Google Business Profile optimization, local citations, reviews, and location-based keywords. Traditional SEO focuses on broader, often national rankings and prioritizes content marketing, backlink building, and technical optimization. Most Mount Vernon businesses benefit from a local-first strategy, though many of our clients combine both approaches to capture customers at every stage of their search journey.

Absolutely! SEO and paid advertising work best as complementary strategies. Google Ads deliver immediate visibility and are great for testing keywords and driving quick traffic. SEO builds sustainable, long-term visibility that doesn't require ongoing ad spend. Together, they create a powerful combination—ads capture immediate demand while SEO builds your organic presence over time. Many of our Mount Vernon clients find that strong SEO actually improves their ad performance by increasing Quality Scores and reducing cost-per-click, ultimately lowering their total marketing costs while increasing results.