Internal Links Disappear After Deactivating a Plugin? Why

You set up an auto-linking plugin, watched it sprinkle internal links across a few hundred posts, and felt good about it. Then you switched it off (to test a slowdown, or to try something else) and the links were gone. Every one of them.

You’re not the first. A user on the WordPress.org forums put it plainly in a thread called “Retain Links after plugin deactivation”: “after creating links, we disable the plugin and the internal links it added are removed.” The same question turns up as a pre-sales worry too: if I stop paying, or uninstall, do I lose all of this?
The answer depends on one thing: how the plugin adds its links. Once you know that, you can check your own site in about two minutes and decide what to keep.
Two ways an auto-linker can work
There are really only two designs.
1. Links added when the page is shown
The plugin leaves your post content alone. Every time someone (or Google) loads the page, it scans the text on the way out and wraps matching words in links. The links exist in the HTML your visitors get, but not in the post saved in your database.
This is the common approach for keyword rules, and it has real upsides. Change a rule and every post updates at once. Delete a rule and its links vanish everywhere. Nothing in your content gets touched, so there’s nothing to clean up.
The downside is the one you just hit. The links only exist while the plugin runs. Deactivate it and WordPress shows the post exactly as it’s saved, which is without them.
2. Links written into the post
Here the plugin actually edits your post content and saves <a href="..."> tags into it, the same as if you’d typed the link yourself in the editor. After that, the plugin isn’t needed for the link to exist. Remove it and the links stay, because they’re just part of your text now.
The downside is also the mirror image. Those links are permanent. If you change your mind about a target page, or a keyword rule was too greedy, the plugin’s “off switch” won’t undo them. You’d need an undo feature or a manual cleanup.
Neither design is wrong. They just fail in different ways, and it’s worth knowing which one you’ve got before you rely on it.
How to tell which one your plugin uses
Pick a post where you know an auto link appears on the front end. Then:
- Open the post in the block editor.
- Open the three-dot menu at the top right and choose Code editor (or press Ctrl+Shift+Alt+M, Cmd+Shift+Option+M on a Mac).
- Search the raw content for the linked word or the target URL (Ctrl+F works fine).
If you see the <a href around that word in the Code editor, the link is written into the post and it will survive deactivation. If the word is there but plain, with no link around it, the link is added on display. That one disappears when the plugin goes.
Using the Classic editor? Switch to the Text tab and do the same check.
A second, quicker test if you have a staging copy: deactivate the plugin there and reload a few posts. Whatever’s still linked was written in. Don’t run this one on your live site if you can avoid it, since search engines might crawl the page in its unlinked state.
What actually happens when you deactivate
For links added on display, the change is instant. The next page load has no links. Cached pages may still show them until the cache clears, which can make it look like they survived for a day or two. They didn’t.
For SEO, losing a batch of internal links isn’t a disaster on day one, but it does matter over time. Pages that relied on those links for their only route in can end up close to orphaned. If that’s a worry, our post on finding orphaned pages in WordPress walks through checking for it.
Also worth knowing: deactivating usually doesn’t delete a plugin’s settings. Most plugins keep their rules in the database until you uninstall, and some keep them even then unless you tick a “delete data” option. So turning it back on often brings everything back exactly as it was. Check your plugin’s own docs before you delete it if you think you might return.
How to keep the links you care about
If your plugin adds links on display and you want to move away from it (or just want insurance), you have a few options.
Hand-insert the important ones
Honestly, this is the best fix for most sites. You probably don’t need all 800 auto links. You need the ones pointing at your money pages, your pillar posts, and any page that has few other links into it.
Make a short list of those target pages. Then find the posts that mention each topic:
wp post list --post_type=post --s="contact form spam" --fields=ID,post_title
Open each one and add a link by hand, with anchor text that fits the sentence. It’s slower, but the links read better than keyword-matched ones, and they’re yours forever. Our notes on anchor text that doesn’t look spammy help here.
Export your rules first
Before you deactivate, export or copy down the plugin’s keyword-to-URL rules. Even if you never import them anywhere, that list is your to-do list for hand-linking. Without it you’re guessing which links existed.
Bake the links into the posts
Some tools can take the links a rule adds on display and write them into the post content for good. If your plugin offers that, it’s the fastest way out. If it doesn’t, you could script it, but be careful: a search-and-replace that wraps every match of a keyword will also hit headings, image alt text, existing links and code blocks. Writing that safely is more work than it looks. Back up the database first, whatever you do.
Or just keep the plugin
That’s a legitimate answer too. If the plugin is light, works, and you’re happy with it, display-time links are fine. The risk only bites if you deactivate.
The trade-off with written-in links
Before you bake hundreds of links into your posts, think about the other side.
- They don’t update. If a target page moves to a new URL, every written-in link to it still points at the old one. Set up a 301 redirect, and ideally update the links too.
- They’re harder to remove. Turning off a rule won’t take them back out. You need an undo, or you edit posts one by one.
- They show up in revisions. Each written post gets a new revision. That’s handy for rollback, but it adds rows to your database.
- Over-linking sticks. A rule that was too eager now leaves its mark permanently. See how many internal links per post before you write in a big batch.
A sensible middle ground: keep display-time rules while you’re still tuning them, then write in the ones you’re sure about.
Where JnK Linkweave fits
Linkweave is a free download from our site; writing rule links into posts is in Pro. On the Rules screen, “Write rule links into posts” saves the links your rules add into the posts themselves, so they stay if Linkweave is ever removed. It shows you the posts and links first, writes them in batches of 20, and can undo the whole run from the URL changer history. A post that’s been edited since won’t be overwritten. You can leave the rules on afterwards; they never link a page twice.
Either way, deactivating or deleting the plugin leaves its index, rules and reports in place unless you turn on “Delete data on uninstall”. You can grab it here.
A quick checklist before you switch off any auto-linker
- Do the Code editor check on two or three posts so you know which design you’re dealing with.
- Export or copy the rule list.
- Pick the 10 to 30 links that actually matter and hand-insert them, or bake them in if your tool can.
- Back up the database before any bulk write.
- Deactivate on staging first, crawl a few posts, then do it live.
- Clear your page cache so you see the real result, not yesterday’s HTML.
That’s an afternoon’s work at most, and it means the plugin is a convenience you can walk away from rather than something you’re stuck with.
Frequently asked questions
Do internal links stay if I deactivate an auto-linking plugin?
Only if the plugin wrote them into your post content. Links added when the page is shown disappear as soon as the plugin is deactivated. Check one post in the block editor’s Code editor: if the link tag is in the raw content, it will stay.
Will reactivating the plugin bring the links back?
Usually yes, for links added on display, as long as the plugin’s settings weren’t deleted on uninstall. Most plugins keep their rules in the database when deactivated. Check the plugin’s docs for a delete-data option before you remove it completely.
Is it better to have links written into posts or added on display?
Neither is better for every site. Written-in links are permanent and survive any plugin change, but they need cleanup if a target moves or a rule was too eager. Display-time links are easy to change or remove, but they vanish if the plugin is turned off.