The WordPress plugin
What it does on your site: receiving posts and the optional visibility tracker.
In shortThe AI Rank Lab WordPress plugin receives articles you publish from the AI content writer and turns them into WordPress posts: it creates or updates the post, downloads images into your media library, sets categories, tags and the featured image, and writes Yoast or All in One SEO meta. It authenticates with your API key and domain ID. Optionally, it can also add the AI Rank Lab tracking script to every page.
What the plugin does on your site
The plugin adds one REST endpoint to your site, /wp-json/airanklab/v1/publish, and an AI Rank Lab page in the WordPress admin. When you click Publish Now or a scheduled publish fires in AI Rank Lab, the article arrives at that endpoint and the plugin does the rest. It does nothing on its own: no post is created unless you publish from AI Rank Lab.
| Part of the article | What the plugin does |
|---|---|
| Title, body, excerpt, slug | Creates the post with the status you chose when connecting (published, draft or pending review) |
| The same article published again | Updates the existing post instead of creating a second one. It matches on the article's AI Rank Lab id, then on the slug |
| Images in the body | Downloads them into your media library and points the post at the local copies |
| Featured image | Downloads it and sets it. If none is sent, it draws a simple title image (needs the PHP GD extension) |
| Categories and tags | Assigns them, creating categories that don't exist yet |
| Author | Uses the WordPress user with that name; otherwise the first administrator |
| Meta title, description, focus keyword | Writes them to Yoast SEO and All in One SEO fields |
| Live URL | Returns the post's permalink, which AI Rank Lab saves for citation tracking |
Install and set it up
- InstallDownload
airanklab.zipfrom Content → Publish → WordPress and webhooks (Download Plugin (.zip)). In WordPress go to Plugins → Add New → Upload Plugin, upload it and activate. It needs WordPress 5.0 or later and PHP 7.4 or later. - Validate your API keyOpen AI Rank Lab in the WordPress admin menu, on the Settings tab. Paste your key into API Key and click Validate. Validation fills in the Domain ID for the AI Rank Lab domain that matches your site and ticks Activate Plugin. Click Save Settings.
- Connect it in AI Rank LabValidating already adds a webhook in AI Rank Lab. Open the WordPress and webhooks page and run Test Connection on it, or use Connect WordPress for a guided setup. Step by step: Connect WordPress.
- Watch the logsThe Publishing tab shows the plugin's Webhook URL and Webhook Debug Logs: every call, its status and HTTP code, errors and missing fields, with the API key hidden.
How it decides a publish is genuine
Each publish carries your API key, your domain ID and your domain. The plugin checks the key with AI Rank Lab on every publish, checks the domain ID matches the one saved when you clicked Validate, and checks the domain matches the WordPress site address (ignoring www). Only then does it create the post. Each publish carries your current key, so generating a new key in AI Rank Lab does not break a connected site.
The optional visibility tracker
Tick Enable visibility tracker system on the Settings tab and save, and the plugin adds the AI Rank Lab tracking script to every page of your site, using the Domain ID from validation. That is the same tracking tag you would otherwise paste by hand, so WordPress users don't need to edit their theme. Its data shows in the AI bot tracker. See Add your domain and install the tracking tag.
The tracker is a JavaScript tag that runs in the visitor's browser. It records visitors that AI assistants send to your site and AI agents that run JavaScript. It does not count crawls by GPTBot, ClaudeBot or PerplexityBot, because those crawlers don't run the script. It is charged per tracked request; see the cost table.
Gotchas
- Only one AI Rank Lab plugin per site. A second plugin, AI Rank Lab Publisher, uses the same publish address with a signed format. If both are active, publishes fail. Connect WordPress detects which one you run.
- The domain must match. The plugin only accepts articles for the domain it was validated against. If you see a domain ID mismatch, click Validate again in WordPress, then Reconnect in AI Rank Lab.
- Firewalls and security plugins can block
/wp-json/airanklab/v1/. Allow that path if tests or publishes never arrive. - Test entries in the debug log saying required fields are missing are expected. The connection test sends an empty article so that nothing is created.
- No PHP GD extension means no generated featured image. Generate a header image in the writer instead, or ask your host to enable GD.
Check yourself
0 of 3 answered.
Progress is saved in this browser.
Put the lesson to work
Paste your site and get a free SEO, AEO and GEO audit with the fixes, then come back to the next lesson.