Guide

How to bulk-fix broken internal links across WordPress

By Axel Antas-Bergkvist Published May 4, 2026 Updated May 25, 2026

Internal links go bad in a few predictable ways. You changed domain (oldname.comnewname.com) and a sweep two years ago caught most of them but not the ones in old posts. You restructured your URLs (/blog/post-name/articles/post-name) and the redirects work, but every internal link is now a wasted 301. You deleted a category page or merged two posts, and now thirty old posts point to a 404. Or you linked to something on someone else’s site that has since vanished.

Plugins like Broken Link Checker can find these. They’re worse at fixing them at scale — you still end up clicking through each result, editing one post at a time in the Block Editor. For a few links, fine. For a few hundred, it’s the same wall every bulk WordPress job hits.

The fix is the same as every other bulk job: connect your site to the workspace, run one recipe across the whole archive, review, publish. This is one of the cleanest applications of the bulk edit pattern because the operation is mechanical — old link out, new link in — and the AI can see every page on your site, so it knows which targets actually exist.

Step 1: connect the whole site

Connect Spectersync with your site URL, username, and an Application Password. Your whole archive opens as clean, editable content — every post and page, with the body as plain prose and links in standard form. If you haven’t connected yet, connect WordPress to Spectersync walks through the setup. Subscribe now for 500 free credits when your workspace opens.

Step 2: know what to fix

You’ve got two situations depending on what you know.

If you know the patterns (you changed domain, you restructured a URL prefix, you deleted a specific post), the recipe is a straight swap — you know exactly what to replace with what.

If you don’t know what’s broken, the recipe can do the discovery: ask it to list every distinct URL across the archive, then check which ones resolve, and propose canonical fixes for the dead ones. Because the AI has the whole site in context, it can match a dead internal link to the closest surviving post.

Step 3: run the swap recipe

For a clean swap — oldname.comnewname.com everywhere — the instruction is simple:

Across the whole archive, replace every link to
https://oldname.com with the same path on
https://newname.com. Don't touch any other text.

For something with more nuance — say you deleted a post and want to retarget every link to the closest-matching survivor:

Find any link to https://example.com/old-post-slug and
replace it with a link to the most topically relevant
surviving post. Use the post title and first paragraph to
decide relevance. For each change, log the post, the old
URL, the new URL, and a one-line reason.

The “log the reason” line is important. It gives you something to audit before you publish, instead of just trusting that the swap was sensible. If the AI’s logic looks off on a row, you send that one back before publishing. Browsing and reviewing are free; only the recipe run spends credits.

Step 4: review the diff, then publish

Spectersync’s dry-run diff lays out every post that would be updated and shows the old and new link in context. For a link-fix job, this is the only audit you need: scroll the list, spot-check a dozen rows, look for any updates that don’t make sense.

If everything looks right, publish. Spectersync batches the updates over the REST API in the background — long sweeps don’t time out the way ad-hoc API scripts will.

If a teammate edited a post in wp-admin between your connect and your publish, Spectersync flags it as a conflict and asks which version wins. That matters more on a link-fix sweep than most other jobs because the conflict could be that someone fixed the same link a different way. The conflict prompt is what stops you from quietly undoing their work.

This workflow handles internal links cleanly because you control where they should point. External broken links are trickier. The recipe can sometimes find a replacement (the same article on the Wayback Machine, or a newer version on the same author’s site), but more often the right move is to remove the link and edit the sentence around it. Either way, the workspace is the surface you do that on.

Where this fits

Link cleanup is perpetually overdue because the WordPress admin makes it tedious. With your site connected and your Application Password minted, it becomes a half-hour job instead of a quarter-long project. Run it after every URL change. Run it when you delete a post.

Prefer the desktop edition?

If you’d rather run the engine locally — your archive as plain .md files on your Mac, where a sed one-liner or your own script is the right tool, with nothing routed through our servers — that’s the desktop and open-source edition. The hosted webapp is the fastest way in. Subscribe now →