Preguntas técnicas de características y respuestas a preguntas tipo qué es

404 Error on Old Posts in WordPress: Fix It in 2026 Fast

You wake up, check your analytics, and see a nasty drop in traffic. Someone clicks an old link from a forum and lands on a cold «404 Not Found» page. That’s the infamous 404 error on old posts in WordPress, and it’s silently killing your SEO while you sleep.

I’ve been fixing WordPress sites for years, and I can tell you: this isn’t just a random glitch. It’s a symptom. Something broke, and Google is already noticing. Let’s cut the fluff and fix it today, not next week.

Why WordPress Throws 404s on Old Content (And Why It’s Not Always Your Fault)

Most people think a 404 means the post is gone. Wrong. The post is usually still there in your database. The problem is the permalink structure or a rewrite rule that went sideways after an update.

Here’s the thing: WordPress uses a file called .htaccess on Apache servers or Nginx rules to translate pretty URLs into database queries. If that file gets corrupted, or if your host migrates you to a new server without preserving rules, every old post URL breaks at once.

Another common culprit? You changed your permalink structure from /2023/05/post-name/ to /post-name/ without setting up redirects. Google still has the old URLs indexed. Users click them. Boom — 404.

The First Thing to Check: Permalinks (90% of Cases)

Before you touch a single plugin, go to Settings > Permalinks in your WordPress dashboard. Don’t change anything. Just scroll down and click «Save Changes.»

I know it sounds stupid. But this simple action flushes WordPress’s rewrite rules and regenerates the internal routing. I’ve seen this alone fix the 404 error on old posts in WordPress more times than I can count.

If that doesn’t work, check your .htaccess file via FTP or your hosting file manager. Look for the WordPress block between # BEGIN WordPress and # END WordPress. If it’s missing or looks weird, delete the file and let WordPress regenerate it by saving permalinks again.

When It’s a Plugin or Theme Breaking Your Old URLs

Plugins that mess with SEO, caching, or custom post types are the usual suspects. A poorly coded plugin can hijack the template_redirect hook and send old posts to a 404 even though they exist.

Here’s my no-nonsense approach:

  1. Deactivate all plugins from the Plugins screen (bulk action).
  2. Try to load an old post. If it works, reactivate one by one until it breaks again.
  3. If the 404 persists with all plugins off, switch to a default theme like Twenty Twenty-Four. If it works now, your theme is the problem.

I’ll be blunt: if your theme is the issue and it’s a premium one, contact the developer. Don’t hack core files. You’ll regret it.

Redirects: Your Safety Net for Deleted or Moved Posts

Sometimes the post is actually gone. You deleted it, merged it, or changed its slug. In that case, a 404 is technically correct — but you still don’t want users or Google hitting it.

Install the Redirection plugin by John Godley. It’s free, maintained, and handles thousands of redirects without choking your database.

Go to Tools > Redirection, and set up a 301 redirect from the old URL to the new one. For bulk fixes, use the «Import» feature with a CSV of old and new paths. This is critical if you migrated from another CMS or changed your URL structure globally.

Pro tip: enable the «Log» feature in Redirection for a week. You’ll see exactly which old URLs are getting hit and returning 404. That’s real data, not guesswork.

Database Corruption and the 404 Nobody Talks About

Rare, but it happens. If your wp_posts table has corrupted rows, WordPress might fail to find a post even though the URL is perfect. Symptoms include random 404s on some posts but not others, or 404s that appear and disappear.

Use WP-DB Manager or phpMyAdmin to run a repair on your tables. If you’re on shared hosting, ask support to run mysqlcheck –repair on your database. It takes minutes and can save you hours of plugin-debugging hell.

Server Configuration: The Hosting Side of the 404 Error

If you’re on Nginx, your .htaccess does nothing. Nginx uses its own config. Many managed WordPress hosts handle this, but cheap shared hosts often don’t. If old posts 404 but the homepage works, ask your host to verify the try_files directive in your Nginx config.

On Apache, make sure mod_rewrite is enabled. You can check via phpinfo() or ask support. Without it, pretty permalinks never work, and every old post URL dies.

Preventing Future 404s on Old WordPress Posts

Don’t wait for the next disaster. Set up a few habits:

  • Never delete a post without setting a 301 redirect first.
  • Use a plugin like Broken Link Checker to scan weekly.
  • Monitor Google Search Console’s «Coverage» report for 404 spikes.
  • Before changing permalinks, export a list of all current URLs.

The 404 error on old posts in WordPress is annoying, but it’s almost always fixable in under an hour if you attack it in the right order: permalinks, plugins, theme, redirects, database, server. Skip steps and you’ll waste a weekend.

Fix it now, because every 404 is a visitor you p