Skip to content
ThemesIonic — home
Troubleshooting

How to Find and Fix Broken Links in WordPress

Scan with a crawler rather than a resident plugin, fix internal links at the source, and redirect only where a genuine equivalent exists. Deleting the link is often the right answer.

4 min read beginner

Use an external crawler, not a resident plugin. A desktop crawler or an online tool checks every link in one pass without adding load, cron jobs or database tables to the site. Run it monthly rather than leaving something scanning continuously.

A crawler. Point it at the domain and let it fetch every page and every link. Sort the results by status code: 404 is missing, 410 is deliberately gone, 500 is a server error, 301 chains are worth flattening.

Google Search Console. The Pages report lists URLs Google tried and could not fetch, and the Links report shows internal links pointing at them. This is the source that reflects what search engines actually experience.

Server logs. Filter for 404 responses. This catches links from other sites and from old bookmarks that no crawl of your own site would reveal.

A plugin, if none of the above is available. Choose one that scans on demand rather than continuously, and deactivate it between scans — the reasoning is in how to speed up a slow WordPress admin.

Classify before fixing

Type Typical cause Fix
Internal link to a renamed page Slug changed Update the link, add a 301 from the old URL
Internal link to deleted content Page removed Remove the link, or point it somewhere relevant
Broken image File missing or path wrong See images not showing
External link to a dead site The other site changed Remove, replace, or link to an archived copy
Link with a typo Manual error Correct it
Old domain in links Migration leftover Search and replace in the database

The last row is worth checking first after any move. A migration that did not run a proper search-and-replace leaves hundreds of links pointing at the old domain — the correct procedure is in how to migrate a WordPress site.

Editing the link in the content is better than redirecting it. A redirect adds a request for every visitor and hides the problem from the next person who edits the page.

For a slug change that affects many links, run a database replacement with a serialisation-aware tool:

wp search-replace '/old-slug/' '/new-slug/' --dry-run --report-changed-only

Read the dry run, then repeat without --dry-run. Never use a plain SQL REPLACE; it corrupts serialised option and widget values.

Redirect what genuinely moved

One direct 301 per moved URL, pointing at its closest real equivalent:

old URL → final URL

Not:

old URL → intermediate URL → final URL

Chains accumulate as content is reorganised, and each hop costs time. Flatten them whenever you touch them.

Where no equivalent exists, let the URL return 404 — or 410 if the content is deliberately and permanently gone. A helpful 404 page is a better answer than a misleading redirect, and the reasoning is spelled out in how to fix WordPress 404 errors.

Dead external links are inevitable — the other site does not consult you before reorganising.

  • Replace with a current equivalent where one exists.
  • Link to an archived copy when the original is genuinely valuable and gone.
  • Remove when the link no longer serves the reader. A sentence without a link is better than a sentence with a dead one.

Do not redirect external links through your own domain to "manage" them; that creates a maintenance burden and looks like cloaking.

Make a useful 404 page

Some links will always break. The page they land on should:

  • say plainly that the page was not found;
  • offer search;
  • link to the main sections;
  • avoid auto-redirecting anywhere after a delay;
  • return a real 404 status, not 200 with a "not found" message.

Verify the status rather than trusting the visual — the method is in how to check HTTP headers.

Keep it from recurring

  • Change slugs rarely, and add a redirect immediately when you do.
  • Use the link inserter's search rather than pasting URLs by hand.
  • Before deleting a page, check what links to it.
  • Re-crawl after any migration, redesign or bulk edit.
  • Keep redirects in one place — a plugin or the server config — rather than spread across both.

A short monthly crawl catches most of it. The problem is not that links break; it is that nobody looks for months, and then a hundred need fixing at once.

Frequently asked

No. Redirect only to a genuinely equivalent page. Sending unrelated URLs to the homepage confuses visitors and is treated as a soft 404 by search engines.
A handful will not move rankings directly. Many of them waste crawl budget, break the flow of internal link value and, more importantly, frustrate visitors.
Resident checkers run scans through wp-cron and store results in the database, which is heavy on shared hosting. External crawlers do the same job without loading the site.

Related guides