Overview
Automatic Internal Links for SEO creates links by scanning your content at render time and replacing keyword matches with internal links.
The mechanism
The plugin hooks into WordPress via the the_content filter at priority 99999 (runs last). When a page is rendered, the plugin queries its database for all stored keywords (from both the SYNC log and manual links), finds matches in the page content using the HtmlChanger library, and replaces matching text with anchor tags pointing to the corresponding destination.
Key architectural facts
Non-destructive — Links are injected at render time, not stored in the database content. Deactivating the plugin removes all auto-generated links instantly.
Self-referencing protection — The plugin never creates a link on a page that points to itself.
HTML-aware — The replacement engine respects HTML structure. By default, it ignores content inside <a> tags (no links inside existing links) and can be configured to skip H1, H2, H3, and custom HTML elements.
Cached — Results are stored as WordPress transients to avoid running the same database query on every page view. Cache expiration is configurable (default: 14 days).
Database structure
The plugin creates two custom database tables: one for manual links and one for SYNC log entries. Both tables store the keyword, destination URL, post ID, link attributes, priority, and timestamps.