Should you’ve been following this collection of exploration of vectors and their utility in web optimization, we’ve got coated the constructing blocks of the plugin I’m sharing with you:
- Understanding the fundamentals.
- Fixing content material points.
- Scaling as much as deal with large quantities of information.
- Automating 301 redirects at scale.
Operating Python scripts in a terminal is highly effective, however it isn’t the place SEOs and content material writers spend most of their day, and there was a friction level. It wasn’t accessible.
We’re bringing what we discovered straight into your WordPress, a content material administration system which powers 43.3% of the net.
I constructed a useful proof-of-concept WordPress plugin with AI help, utilizing Google Vertex AI, OpenAI, and Pinecone APIs to handle inner linking straight contained in the WordPress editor. Immediately, I’m sharing precisely the way it works, the logic behind the code, and the plugin information so that you can experiment with.
Let’s dive into the setup, and learn to make the plugin work, and anybody with no technical background can do this.
1. Create A Pinecone Vector Database
We coated find out how to work in Pinecone vector database within the earlier chapter, in case you wish to have a extra in-depth look. However registering is kind of easy and simple; simply go to their web site and join. Create a desk with any title you favor, with a customized dimensionality of 768.
To arrange the plugin, you would wish:

2. Create An OpenAI API Key
Log in to platform.openai.com and navigate to the Settings > Billing part. You should add a small credit score stability (e.g., $5) to your account, because the API won’t work with no cost methodology hooked up. We pay about $0.5/month for OpenAI API utilization.
Generate the important thing by clicking on “Create new secret key” and provides your key a reputation (like “WP Inside Hyperlink Plugin”) and replica the string instantly, as you will be unable to view it once more as soon as the window closes.
3. Google Service Account JSON Key
You might want to go to Google Cloud Console and allow “Vertex AI API” by navigating to this URL. Please notice Google requires a billing account for AI providers, even in the event you keep inside the free tier. Seek for “Billing” within the prime search bar and add the bank card data by following the required steps. We pay round $0.3/month for Vertex API utilization.
When you’ve performed that, navigate to “API & Companies” and create “Service Account” JSON key you could copy and paste within the settings. You’ll be able to watch this video on how it’s performed when you have a tough time to navigate in Google Cloud Console.
4. Plugin Configuration
When you’ve arrange all accounts and gathered all of the keys, it’s time to set up the zip file and arrange the settings within the plugin. (It’s at all times really useful to put in new plugins on staging web site first.)

You may also choose publish varieties you wish to index, which provides you much more granular management over the articles you’ll index.
Principally, we might use the identical Google service account keys to interchange the OpenAI API with Gemini, however I used OpenAI on goal so you’ll have interaction, create an API key there, and learn to do it.
4. Indexing: Shifting Content material To The Vector DB
Earlier than we will seek for hyperlinks, our present content material should exist as vectors within the vector database you’ve created.
In Half 3 of this collection, we discovered find out how to upsert vectors into Pinecone manually. This plugin automates that course of, and also you now not want Python scripts.

Once you run the preliminary indexing, the plugin iterates by your printed WordPress posts and pages. It parses the DOM construction of every publish to extract strategically essential content material sections, concatenating them right into a single textual content illustration that will get embedded as a vector:
- The title.
- Yoast web optimization meta description (if current).
- Excerpt.
- First opening paragraph.
- Every H2 heading, together with its subsequent paragraph.
This ensures that vectors give attention to the article’s major matters reasonably than being diluted by background context. Afterwards, it sends the composed copy to the embedding mannequin to generate a numerical vector illustration (768 dimensions), and shops that vector in Pinecone together with the publish ID and title (right here it’s possible you’ll take into account tweaking the performance and as a substitute of the content material push solely Yoast meta description).
The plugin makes batch requests for effectivity. To provide you a way of indexing pace, it listed 25,000 articles in about 50 minutes. Alternatively, when you have a couple of hundred thousand pages, it’s possible you’ll wish to export them and upsert utilizing a Jupyter pocket book, as described right here.
It’s a one-time heavy job that must be performed, later, while you hit “Replace” or “Publish” in WordPress, the plugin immediately generates a brand new vector for that particular publish and updates the document. It would delete the document in the event you delete the article. It ensures that your index is at all times updated.
I wish to notice that indexing will probably be a bit of costly, maybe round $1 to $2 for a couple of tens of hundreds of articles, however it’s a one-time expense for the preliminary setup.
Now it’s time to add inner hyperlinks to your content material. That is the place the enjoyable half begins.
The plugin has two modes of operation:
- Inside linking by manually chosen anchor phrase.
- Robotically suggesting inner hyperlinks by parsing the content material of the article.
And I do know the WordPress neighborhood continues to be divided on Basic and Gutenberg editors, so I ensured the plugin works for each.
5. Including Inside Hyperlinks In WordPress Gutenberg Editor
In Gutenberg, it makes use of a sidebar panel for automated inner hyperlink options, and if you wish to add an inner hyperlink for the phrase you’ve chosen, click on on the pencil icon.
You’ll be able to configure classes to filter the search, e.g., solely counsel hyperlinks from the “Analytics” class, which serves as a type of RAG to extend outcomes accuracy.
You even have the choice to filter by article freshness, akin to deciding on articles printed inside a 12 months or two, which may also help you fetch contemporary content material linking concepts when coping with information articles.
When you set the filters and run bulk options, it makes use of OpenAI’s “GPT-4.1-nano” mannequin for anchor textual content extraction that populates the sidebar, the place one can find the “Apply” button to insert the hyperlink seamlessly on the phrase within the editor.
That is what occurs below the hood.
- Entity Extraction: Once you click on “Bulk Auto Suggestion,” the plugin sends the present content material of your draft to the OpenAI API to extract “entities” and “key phrases” which are related to the article’s subject.
- Vectorization utilizing Google Vertex AI: The plugin takes that particular phrase and converts it right into a vector.
- Vector Search: It queries Pinecone for articles utilizing the vector it created in your database.
- Consequence: It returns probably the most related articles, even when they don’t include these precise phrases which are semantically near that phrase.
6. Including LLMs-Based mostly Inside Hyperlinks In WordPress Basic Editor
Within the Basic Editor, the method is analogous; you get a devoted “Counsel Hyperlinks” dropdown within the toolbar.

And in the identical approach, you should utilize every possibility. You’ll be able to simply choose any phrase within the editor and click on on “Counsel by Anchor Textual content” or run “Bulk Auto Suggestion.”
Fairly simple and enjoyable so as to add inner hyperlinks now, isn’t it?
7. Options
There are a selection of choices, both free or paid, it’s possible you’ll wish to discover, akin to:
And it’s possible you’ll ask why we didn’t use one of many present options, however most well-liked to construct one from scratch. The reply is straightforward: We wanted granular management over the output, and not one of the plugins met our wants. Thus, we constructed one which we will fine-tune, flex, and management 100% as we wish.
And naturally, it’s free (aside from run prices), and we’re impartial from third events. Under is the payment we pay for Google Vertex utilization for a month of utilization.

To keep away from any unpredictable price spikes, it’s at all times greatest follow to set price range alerts.
Conclusion: From Embeddings To A Purposeful WordPress Plugin
We moved from understanding the maths of embeddings to constructing a totally useful LLM-based WordPress plugin that manages semantic inner linking.
This plugin is a fruits of that data. It’s a useful basis. I’m sharing the zip file not as a industrial product, however as an academic instrument and a base for the neighborhood.
Please notice that it is a plugin created for academic functions to exhibit the facility of LLMs and Vector Databases in web optimization, and there’s no official help supplied for this plugin. It doesn’t accumulate, retailer, or share any knowledge with us or any third occasion. All knowledge stays below the positioning proprietor’s full possession and management.
Nonetheless, when you have questions in regards to the code, or wish to talk about how one can lengthen its performance, be at liberty to achieve out to me on LinkedIn. I’ll do my greatest to reply questions and enable you to troubleshoot as a lot as my time will let me do this.
Glad inner linking!
Extra Assets:
Featured Picture: Collagery/Shutterstock















