If you’ve been following this series of exploration of vectors and their application in SEO, we have covered the building blocks of the plugin I’m sharing with you:

  1. Understanding the basics.
  2. Solving content issues.
  3. Scaling up to handle massive amounts of data.
  4. Automating 301 redirects at scale.

Running Python scripts in a terminal is powerful, but it isn’t where SEOs and content writers spend most of their day, and there has been a friction point. It wasn’t accessible.

We are bringing what we learned directly into your WordPress, a content management system which powers 43.3% of the web.

I built a functional proof-of-concept WordPress plugin with AI assistance, using Google Vertex AI, OpenAI, and Pinecone APIs to manage internal linking directly inside the WordPress editor. Today, I’m sharing exactly how it works, the logic behind the code, and the plugin files for you to experiment with.

Download the ZIP

Let’s dive into the setup, and learn how to make the plugin work, and anyone with no technical background can do that.

1. Create A Pinecone Vector Database

We covered how to work in Pinecone vector database in the previous chapter, in case you want to have a more in-depth look. But registering is quite simple and straightforward; just visit their website and sign up. Create a table with any name you prefer, with a custom dimensionality of 768.

To set up the plugin, you would need:

Pinecone table with dimensionality of 768
Pinecone table with dimensionality of 768 (Image from author, December 2025)

2. Create An OpenAI API Key

Log in to platform.openai.com and navigate to the Settings > Billing section. You must add a small credit balance (e.g., $5) to your account, as the API will not work without a payment method attached. We pay about $0.5/month for OpenAI API usage.

Generate the key by clicking on “Create new secret key” and give your key a name (like “WP Internal Link Plugin”) and copy the string immediately, as you will not be able to view it again once the window closes.

3. Google Service Account JSON Key

You need to go to Google Cloud Console and enable “Vertex AI API” by navigating to this URL. Please note Google requires a billing account for AI services, even if you stay within the free tier. Search for “Billing” in the top search bar and add the credit card information by following the required steps. We pay around $0.3/month for Vertex API usage.

Once you’ve done that, navigate to “API & Services” and create “Service Account” JSON key you need to copy and paste in the settings. You can watch this video on how it is done if you have a hard time to navigate in Google Cloud Console.

4. Plugin Configuration

Once you’ve set up all accounts and gathered all the keys, it is time to install the zip file and set up the settings in the plugin. (It is always recommended to install new plugins on staging website first.)

Plugin Settings Page (Image from author, December 2025)
Plugin Settings Page (Image from author, December 2025)

You can also select post types you want to index, which gives you even more granular control over the articles you will index.

Basically, we could use the same Google service account keys to replace the OpenAI API with Gemini, but I used OpenAI on purpose so you would engage, create an API key there, and learn how to do it.

    4. Indexing: Moving Content To The Vector DB

    Before we can search for links, our existing content must exist as vectors in the vector database you’ve created.

    In Part 3 of this series, we learned how to upsert vectors into Pinecone manually. This plugin automates that process, and you no longer need Python scripts.

    Upsert articles into pinecone
    Upsert articles into Pinecone (Image from author, December 2025)

    When you run the initial indexing, the plugin iterates through your published WordPress posts and pages. It parses the DOM structure of each post to extract strategically important content sections, concatenating them into a single text representation that gets embedded as a vector:

    1. The title.
    2. Yoast SEO meta description (if present).
    3. Excerpt.
    4. First opening paragraph.
    5. Each H2 heading, along with its subsequent paragraph.

    This ensures that vectors focus on the article’s primary topics rather than being diluted by background context. Afterwards, it sends the composed copy to the embedding model to generate a numerical vector representation (768 dimensions), and stores that vector in Pinecone along with the post ID and title (here you may consider tweaking the functionality and instead of the content push only Yoast meta description).

    The plugin makes batch requests for efficiency. To give you a sense of indexing speed, it indexed 25,000 articles in about 50 minutes. Alternatively, if you have a few hundred thousand pages, you may want to export them and upsert using a Jupyter notebook, as described here.

    It is a one-time heavy job that needs to be done, later, when you hit “Update” or “Publish” in WordPress, the plugin instantly generates a new vector for that specific post and updates the record. It will delete the record if you delete the article. It ensures that your index is always up to date.

    I would like to note that indexing will be a little expensive, perhaps around $1 to $2 for a few tens of thousands of articles, but it is a one-time expense for the initial setup.

    Now it is time to add internal links to your content. This is where the fun part starts.

    The plugin has two modes of operation:

    1. Internal linking by manually selected anchor phrase.
    2. Automatically suggesting internal links by parsing the content of the article.

    And I know the WordPress community is still divided on Classic and Gutenberg editors, so I ensured the plugin works for both.

    5. Adding Internal Links In WordPress Gutenberg Editor

    In Gutenberg, it utilizes a sidebar panel for automatic internal link suggestions, and if you want to add an internal link for the phrase you’ve chosen, click on the pencil icon.

    You can configure categories to filter the search, e.g., only suggest links from the “Analytics” category, which serves as a sort of RAG to increase results accuracy.

    You also have the option to filter by article freshness, such as selecting articles published within a year or two, which can help you fetch fresh content linking ideas when dealing with news articles.

    Once you set the filters and run bulk suggestions, it uses OpenAI’s “GPT-4.1-nano” model for anchor text extraction that populates the sidebar, where you will find the “Apply” button to insert the link seamlessly on the phrase in the editor.

    This is what happens under the hood.

    1. Entity Extraction: When you click “Bulk Auto Suggestion,” the plugin sends the current content of your draft to the OpenAI API to extract “entities” and “key phrases” that are relevant to the article’s topic.
    2. Vectorization using Google Vertex AI: The plugin takes that specific phrase and converts it into a vector.
    3. Vector Search: It queries Pinecone for articles using the vector it created in your database.
    4. Result: It returns the most relevant articles, even if they don’t contain those exact words that are semantically close to that phrase.

    6. Adding LLMs-Based Internal Links In WordPress Classic Editor

    In the Classic Editor, the process is similar; you get a dedicated “Suggest Links” dropdown in the toolbar.

    Adding LLM-based internal links in Classic Editor.
    Adding LLM-based internal links in Classic Editor. (Image from author, December 2025)

    And in the same way, you can use each option. You can just select any phrase in the editor and click on “Suggest by Anchor Text” or run “Bulk Auto Suggestion.”

    Quite easy and fun to add internal links now, isn’t it?

    7. Alternatives

    There are a number of options, either free or paid, you may want to explore, such as:

    1. Link Whisper.
    2. Plugli.
    3. Yoast Premium.

    And you may ask why we didn’t use one of the existing solutions, but preferred to build one from scratch. The answer is simple: We needed granular control over the output, and none of the plugins met our needs. Thus, we built one that we can fine-tune, flex, and control 100% as we want.

    And of course, it is free (apart from run costs), and we are independent from third parties. Below is the fee we pay for Google Vertex usage for a month of usage.

    Google Cloud Console Fee
    Google Cloud Console Fee (Image from author, December 2025)

    To avoid any unpredictable cost spikes, it is always best practice to set budget alerts.

    Conclusion: From Embeddings To A Functional WordPress Plugin

    We moved from understanding the math of embeddings to building a fully functional LLM-based WordPress plugin that manages semantic internal linking.

    This plugin is a culmination of that knowledge. It is a functional foundation. I am sharing the zip file not as a commercial product, but as an educational tool and a base for the community.

    Please note that this is a plugin created for educational purposes to demonstrate the power of LLMs and Vector Databases in SEO, and there is no official support provided for this plugin. It does not collect, store, or share any data with us or any third party. All data remains under the site owner’s full ownership and control.

    However, if you have questions about the code, or want to discuss how you can extend its functionality, feel free to reach out to me on LinkedIn. I will do my best to answer questions and help you troubleshoot as much as my time will let me do that.

    Happy internal linking!

    More Resources:


    Featured Image: Collagery/Shutterstock




Source link


administrator