If you happen to’ve been following this collection of exploration of vectors and their utility in website positioning, we have now lined 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.
Working Python scripts in a terminal is highly effective, nevertheless 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 online.
I constructed a practical 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. At this time, I’m sharing precisely the way it works, the logic behind the code, and the plugin information so that you can experiment with.
Obtain the ZIP
Let’s dive into the setup, and discover ways to make the plugin work, and anybody with no technical background can do this.
1. Create A Pinecone Vector Database
We lined tips on 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 like, with a customized dimensionality of 768.
To arrange the plugin, you would want:
2. Create An OpenAI API Key
Log in to platform.openai.com and navigate to the Settings > Billing part. You will need to add a small credit score stability (e.g., $5) to your account, because the API is not going to work with no fee 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 duplicate the string instantly, as you won’t be able to view it once more as soon as the window closes.
3. Google Service Account JSON Key
You 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 companies, even in case you keep throughout the free tier. Seek for “Billing” within the high search bar and add the bank card info by following the required steps. We pay round $0.3/month for Vertex API utilization.
When you’ve accomplished that, navigate to “API & Companies” and create “Service Account” JSON key it is advisable to copy and paste within the settings. You may watch this video on how it’s accomplished you probably 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 all the time really helpful to put in new plugins on staging web site first.)

You can even choose put up varieties you wish to index, which supplies you much more granular management over the articles you’ll index.
Principally, we may use the identical Google service account keys to interchange the OpenAI API with Gemini, however I used OpenAI on function so you’d have interaction, create an API key there, and discover ways 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 tips on how to upsert vectors into Pinecone manually. This plugin automates that course of, and also you now not want Python scripts.

If you run the preliminary indexing, the plugin iterates by means of your revealed WordPress posts and pages. It parses the DOM construction of every put up to extract strategically necessary content material sections, concatenating them right into a single textual content illustration that will get embedded as a vector:
- The title.
- Yoast website positioning meta description (if current).
- Excerpt.
- First opening paragraph.
- Every H2 heading, together with its subsequent paragraph.
This ensures that vectors deal with the article’s major subjects 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 put up ID and title (right here chances are you’ll contemplate 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, you probably have a couple of hundred thousand pages, chances are 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 accomplished, later, whenever you hit “Replace” or “Publish” in WordPress, the plugin immediately generates a brand new vector for that particular put up and updates the report. It can delete the report in case you delete the article. It ensures that your index is all the time updated.
I wish to notice that indexing shall be slightly costly, maybe round $1 to $2 for a couple of tens of 1000’s 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.
- Routinely suggesting inner hyperlinks by parsing the content material of the article.
And I do know the WordPress neighborhood remains to be divided on Traditional 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 may configure classes to filter the search, e.g., solely recommend hyperlinks from the “Analytics” class, which serves as a form of RAG to extend outcomes accuracy.
You even have the choice to filter by article freshness, akin to choosing articles revealed inside a yr or two, which may help you fetch recent 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 you’ll find the “Apply” button to insert the hyperlink seamlessly on the phrase within the editor.
That is what occurs below the hood.
- Entity Extraction: If 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.
- End result: It returns probably the most related articles, even when they don’t comprise these actual phrases which are semantically near that phrase.
6. Including LLMs-Primarily based Inside Hyperlinks In WordPress Traditional Editor
Within the Traditional Editor, the method is comparable; you get a devoted “Counsel Hyperlinks” dropdown within the toolbar.

And in the identical method, you need to use every choice. You may simply choose any phrase within the editor and click on on “Counsel by Anchor Textual content” or run “Bulk Auto Suggestion.”
Fairly straightforward and enjoyable so as to add inner hyperlinks now, isn’t it?
7. Alternate options
There are a selection of choices, both free or paid, chances are you’ll wish to discover, akin to:
- Hyperlink Whisper.
- Plugli.
- Yoast Premium.
And chances are 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 would like.
And naturally, it’s free (aside from run prices), and we’re unbiased from third events. Under is the price we pay for Google Vertex utilization for a month of utilization.

To keep away from any unpredictable price spikes, it’s all the time finest follow to set price range alerts.
Conclusion: From Embeddings To A Purposeful WordPress Plugin
We moved from understanding the mathematics of embeddings to constructing a totally practical LLM-based WordPress plugin that manages semantic inner linking.
This plugin is a fruits of that data. It’s a practical basis. I’m sharing the zip file not as a business product, however as an academic device and a base for the neighborhood.
Please notice that this can be a plugin created for academic functions to exhibit the ability of LLMs and Vector Databases in website positioning, and there’s no official assist offered for this plugin. It doesn’t gather, retailer, or share any information with us or any third social gathering. All information stays below the positioning proprietor’s full possession and management.
Nevertheless, you probably have questions concerning the code, or wish to focus on how one can lengthen its performance, be happy to succeed in out to me on LinkedIn. I’ll do my finest to reply questions and enable you to troubleshoot as a lot as my time will let me do this.
Completely happy inner linking!
Extra Assets:
Featured Picture: Collagery/Shutterstock
