Magic Linking – Internal Links
Magic Linking – Internal Links

Magic Linking – Internal Links

0/5 (0 ratings) — active installs Updated Nov 8, 2026
Outbound suggestions in the block editor: each card shows the destination and the reason, and the anchor text is highlighted in the text.

Outbound suggestions in the block editor: each card shows the destination and the reason, and the anchor text is highlighted in the text.

Magic Linking is a free internal linking plugin for WordPress. It gives you internal link suggestions while you write, in the block editor (Gutenberg) and in the classic editor, and adds the one you choose without touching anything else. Every change is kept in a history, so you can undo it.

It also adds automatic internal links with rules you create (“this phrase links to this page”), and reports which of your posts and pages are orphans, under-linked, over-linked or have broken internal links. A free alternative to paid internal linking plugins: no account, no key and no limits, not even on the number of automatic rules.

It works entirely on your server. Artificial intelligence is optional: it only runs if you have connected an AI provider in WordPress (Settings > Connectors) and press Improve with AI in the panel.

In the editor

  • Outbound suggestions: a Magic Linking panel in the block editor (and a box in the classic editor) proposes phrases of the text you are writing that could link to other posts of your site. Each suggestion shows the phrase with the anchor text highlighted in the editor, the destination and the reason.
  • One click to link: press Link and the link is added in the editor itself, on that phrase only. It is part of your unsaved changes until you save, and you can undo it with the Undo button of the card or with the editor’s own undo.
  • Inbound suggestions: the same panel lists other posts whose text mentions the one you are editing and could link to it. Pressing Link writes the link in that other post, see “How and when it changes your content”.
  • Only the posts and block types where a link can be inserted safely are proposed. Paragraphs and lists are always used; headings, quotes and tables are left alone unless you turn them on in Settings (or a developer allows them with a filter).
  • Pillar content and filters: mark your main posts as pillar content (the mark of an active Yoast SEO or Rank Math also counts) so links to them rank higher. In Settings > Suggestions you can ignore, consider or require the same content type, category or tag.
  • More phrases and adjustable anchor: the card can offer alternative sentences (off by default, Settings > Suggestions) and lets you adjust the anchor text before linking. Each suggestion warns when the anchor already links somewhere else or is repeated too often, and a collapsible list shows what is already linked.
  • Your own target phrases: for each post you can write the phrases you want it to rank for, so other posts link to it with them.
  • Exclude: leave a post (from the report) or whole categories (Settings > General) out of the analysis. Excluded posts are neither suggested nor a source of links.
  • Dismiss: a suggestion you do not want can be dismissed for good, from either side, and restored with Undo.
  • Improve with AI (optional): with an AI connector (WordPress 7.0 or later), Improve with AI sends the best 20 suggestions to your AI provider in one request. It reorders them, marks the ones it does not recommend, may propose a better anchor text from the same sentence and shows what the request cost. See “AI and your privacy”.

Automatic rules

  • Rules: a screen where you say “this phrase links to this post”. A rule has a phrase and its variants, a destination (a published post), how many links to add per post, whether to link only the first appearance, and an optional gap of one word (so “heat pump” also matches “heat water pump”). You can leave out post types and categories, and pause or edit a rule at any time. There is no limit on the number of rules.
  • Applied by themselves when you publish or update: when a published post is saved with new text, the rules are applied in the background, not during the save. If the post is open in someone’s editor, Magic Linking waits and tries again later instead of touching it. Drafts are not linked; they are when you publish them.
  • Applied to what you already have, one post at a time: Apply to existing entries lists the posts where the rule fits, shows the sentence with the link that would be added and an Add link button for each one, with Undo. There is no “apply to all” button.
  • Quality limits: a rule only adds links. It never removes or changes a link you already have, never links inside a link, and respects your limits: words per link, links to the same target from one post (Settings > Suggestions) and posts that can use the same anchor text for the same target.
  • A link you undo does not come back: if you undo a link added by a rule, the same rule does not add it again to that post (unless you edit the rule).
  • WP-CLI: wp magic-linking rules (list, add, delete, scan, apply).

How and when it changes your content

  • Nothing is changed until you press Link on a suggestion, apply a rule to a post, or publish or update a post that matches a rule you created. Suggestions never change anything by themselves, and rules only add links.
  • For the post you have open, the link is inserted in the editor; saving is up to you.
  • For inbound suggestions, the link is written into the other post on the server. Before saving, Magic Linking checks that the rest of that post stays exactly as it was: only the link is added. If the check fails, it writes nothing and tells you why. WordPress keeps a revision of the post as usual.
  • Every change is recorded in History, where you can undo it and redo it; links added by a rule are marked “Automatic rule”. Links you add from the editor panel are listed there too once you save the post; Magic Linking only records them. Undo removes only that link; if the text around it was edited since, it tells you instead of guessing.
  • A post that is open in someone’s editor is never modified from the server.
  • Links already written in your content are never removed or rewritten, except to undo a link Magic Linking added or when you fix a broken link from its list.

History

  • Every link Magic Linking changes is listed with who did it, when, where and the anchor text: links from inbound suggestions, from the editor panel (once you save the post), from rules and fixes from the broken links list.
  • Changes are grouped by post, newest first. Filter by status, source or title, view by batch, and undo or redo one change, a post or a whole batch.
  • Undo and redo also with WP-CLI (wp magic-linking history undo --post=<id>).
  • Export to CSV, with no row limit, from Export CSV (what the current filters show) or with WP-CLI (wp magic-linking history export --format=csv). It includes whether the AI recommended each link and with which model.
  • The history is kept 90 days by default; you can choose 30 days, a year or forever.

Report

  • Orphan pages: posts that no other post links to.
  • Under-linked pages: posts with some inbound links, but fewer than you consider enough (2 by default, you can change it).
  • Over-linked pages: posts with more internal links than one for every 100 words (you can change that too). A short text may always have one link.
  • Broken internal links: links to a post that is in the trash, is a draft or private, or does not exist. The complete list, with the anchor text and the reason. Fix each one from the list: change its destination to another published post, or remove the link and keep its text. Magic Linking checks that nothing else in the post changes, and you can undo it from History.
  • Numbers for every post: inbound, internal outbound, external and broken links.
  • Add links from the report: Inbound suggestions and Outbound suggestions on each row open a side panel with the suggested sentences. Press Link on the ones you like, one at a time, without opening the editor of the post; the row updates its numbers and you can undo each link right there or from History.
  • Filters, search by title, sorting, pagination and CSV export of the view you are looking at.

Also

  • WP-CLI: analyse the site, print reports and manage the history from the terminal.
  • Multilingual: the language of each post comes from WPML, Polylang or, if you use neither, from the site language. Suggestions never link posts of different languages. An optional setting detects the language from the text itself (tested on Spanish and English).
  • Status tab: The Status tab shows how long the last suggestions took, so you can see whether the engine is slow on your server.
  • Made for big sites: the analysis and the index of suggestions are built in the background in small batches with Action Scheduler (bundled), and every post is updated when you save it. Suggestions for a post are calculated in a few milliseconds even with thousands of posts.
  • Light: no scripts, no styles and no database queries from this plugin on your public pages.
  • Private: no telemetry, no cookies, no email requests, no notices outside its own screens, and nothing leaves your server unless you press Improve with AI with an AI connector (see “AI and your privacy”).

What it does not do (in this version)

  • It does not check links over the network: a link is “broken” when it points to an address on your own site that leads nowhere, according to WordPress. Links to other sites are counted, not checked.
  • It does not add links by itself, except for the rules you create. Suggestions always need a click of yours.

AI and your privacy

  • Magic Linking has no AI of its own and asks for no key. It uses the AI client and the Connectors screen of WordPress 7.0 or later. On WordPress 6.9 the AI options are turned off and the plugin works as usual.
  • Nothing is sent until you press Improve with AI, and then only to the provider you configured (a local model never leaves your server). You set a daily token limit in Settings > AI (0 turns AI off). See “External services” for exactly what is sent.

Roadmap

Next: suggestions by meaning with the AI connectors of WordPress, when WordPress offers embeddings.

Support and documentation

Documentation and news: https://magiclinking.com

Questions and bug reports: use the support forum of this plugin on WordPress.org.

External services

Magic Linking does not connect to any external service by itself and has no servers of its own. It has no API keys, no accounts and no telemetry.

The only exception is the optional Improve with AI button, which exists only if you have connected an AI provider to WordPress yourself. Magic Linking does not call any provider directly: it uses the AI client that WordPress 7.0 and later provide (wp_ai_client_prompt()), which sends the request to the provider you configured on the Settings > Connectors screen of your site (wp-admin/options-connectors.php), for example OpenAI, Google, Anthropic or a local Ollama.

  • What is sent: the sentence of the post you are editing, with the anchor text marked, and, for each of the best 20 suggestions, the title and a summary of about 200 tokens of the destination post (its title, headings and the start of its text). Only clean text. No metadata, authors, email addresses, comments or private fields. Private, password-protected and draft posts are never sent as destinations. The post you are editing is sent only because you pressed the button.
  • When: only when you press Improve with AI, once per press. Never in the background, never on page load and never on the public side of your site.
  • To whom: to the provider you configured in Settings > Connectors. Their terms and privacy policy apply to that request, for example OpenAI (https://openai.com/policies), Google (https://policies.google.com) or Anthropic (https://www.anthropic.com/legal). If you use a local model, nothing leaves your server.
  • Control: you choose the provider, you can set a daily token limit (0 turns it off) in Magic Linking > Settings > AI, and a site can veto requests with the wp_ai_client_prevent_prompt filter.

Magic Linking stores the number of tokens used, the provider and the model of each request (not the text) to show your usage in Settings > AI.

Privacy

Magic Linking does not collect personal data and sends nothing anywhere on its own. It stores, in your database, the addresses and anchor texts of the internal links found in your own content, a word index of your posts used for suggestions, counts per post and a history of the links it has added or fixed, including those you add from the editor panel (which user, when, which post and the text of the paragraph that changed, so it can be undone). The pairs (post, target) of the suggestions you dismiss, with the user and the date, so they are not proposed again. It does not set cookies. For the optional AI button it also stores, for each request, the date, the user, the provider, the model, the tokens used and an estimated cost, never the text that was sent; and, for an hour, the result of checking what your AI connector can do. See “External services” for what is sent when you press that button.

Third-party libraries

  • Action Scheduler (WooCommerce) 4.2.x, GPL-3.0-or-later, bundled in vendor/woocommerce/action-scheduler/. Used to run the analysis and the index in the background.