How to Add AI to Your WordPress?
Add AI to WordPress with a provider plugin and Settings > Connectors, use the WordPress 7.0 AI Client and Abilities API, and keep privacy and cost in check.

To add AI to your WordPress site today, install an AI plugin for the job you want done (writing help, alt text, a chatbot, comment screening), and connect it to an AI provider such as Anthropic, Google or OpenAI with an API key. On WordPress 7.0 and later you add that key once, under Settings > Connectors, and any plugin built on the new core AI Client can use it. Developers can go further with the wp_ai_client_prompt() function and the Abilities API, which lets AI agents call your site’s features with the same permission checks as a logged-in user.
Two things decide whether this goes well: what content leaves your site, and who pays for every request. This guide covers both. Our team checked every function, hook, plugin figure and policy below on 18 November 2026, against the WordPress 7.1.4 source code, the official AI Client developer note and the plugin pages on WordPress.org.
This page has no recorded Search Console queries yet, so the headings follow the questions site owners and developers actually ask when they start adding AI to WordPress.
What changed for AI in WordPress 7.0?
WordPress 7.0, released on 20 May 2026, added a provider-neutral AI layer to core. Before it, every AI plugin shipped its own settings page, its own API key field and its own code for talking to each provider. Now core offers one shared way to send a prompt, and one shared place to store credentials. Core itself does not include any AI provider and does not send anything anywhere until you install a provider plugin and add a key.
Piece | Added in | What it does |
|---|---|---|
Abilities API | WordPress 6.9 | A registry of things your site can do, each with an input schema, output schema and permission check |
AI Client | WordPress 7.0 | One PHP entry point, |
Connectors screen | WordPress 7.0 | Settings > Connectors, where an administrator adds provider API keys once for the whole site |
Provider plugins | Plugins | The official AI Provider plugins for Anthropic, Google and OpenAI, plus community ones |
AI plugin | Plugin | The WordPress Core AI team’s opt-in features: alt text, excerpts, image generation and more |
MCP Adapter | Plugin | Exposes registered abilities to AI agents over the Model Context Protocol |
We read the current code to confirm how the pieces fit. In 7.1.4, the Connectors submenu is registered under Settings for users with the manage_options capability, and the three official providers are pre-listed there with links to each vendor’s API key page. The AI Client and the Abilities API both live in wp-includes, so they are available on every 7.x site whether or not you use them.
How do you add AI to WordPress without writing code?
This is the path for most site owners. It takes about fifteen minutes on a site that is already on WordPress 7.x. Try it on a staging copy first if your site earns money.
- Update to WordPress 7.0 or later. The current release is 7.1.4, a security release from 28 October 2026. Our guide to confirming the 7.1.4 update actually landed shows how to check.
- Create an API key with one provider. You need a developer account with Anthropic, Google or OpenAI, with billing set up. A ChatGPT or Claude chat subscription is not the same thing and does not give you an API key.
- Install that provider’s plugin. AI Provider for Anthropic, AI Provider for Google or AI Provider for OpenAI. All three are published by WordPress.org and were tested up to 7.1.4 when we checked.
- Add the key under Settings > Connectors. The screen masks the key after you save it.
- Install a plugin that uses it. The AI plugin from the Core AI team is the obvious first choice, because it is built on the same AI Client. Activate it, go to Settings > AI, and switch on only the features you want.
Nothing is turned on when you activate the AI plugin. Its one stable Feature at version 1.5.0 is Image Generation and Editing; everything else is an Experiment, including alt text, excerpt and meta description generation, content summarisation and translation, title suggestions, comment moderation, and editorial notes that review a post block by block. The plugin needs the block editor; the Classic Editor is not supported.
If you manage sites from the command line, the same setup is two WP-CLI commands, checked on 18 November 2026. Add the key in the Connectors screen afterwards, or as a constant as shown in the next section.
# Install and activate one provider plus the Core AI team's plugin.
wp plugin install ai-provider-for-anthropic --activate
wp plugin install ai --activateWhere should the API key live?
The Connectors code checks three places, in this order: an environment variable, a PHP constant, and then a database option. For the official providers, the constant and environment variable are named after the provider ID, so Anthropic reads ANTHROPIC_API_KEY, Google reads GOOGLE_API_KEY and OpenAI reads OPENAI_API_KEY. A key typed into the Connectors screen is stored as a normal option and masked in the interface.
// wp-config.php, above the "That's all, stop editing!" line.
// Checked against WordPress 7.1.4 on 18 November 2026.
define( 'ANTHROPIC_API_KEY', 'your-key-here' );We prefer the constant or an environment variable on production sites. It keeps the key out of database backups, staging copies and anyone’s export file. The AI plugin also has a Key Encryption experiment that encrypts keys stored in the database; its own description warns that turning the experiment off, or deactivating the plugin, restores plaintext keys.
Which AI plugins are worth considering?
You do not have to use the Core AI team’s plugin. Many established plugins have their own AI features, often with their own key settings, and some of them have not moved to the shared Connectors screen yet. Here are the ones site owners ask us about most, with figures from the WordPress.org plugin API on 18 November 2026:
Plugin | Best for | Active installs | Rating | Last updated |
|---|---|---|---|---|
AI (WordPress.org) | Editor helpers on the core AI Client | 60,000+ | 4.2 of 5 (10) | 30 Oct 2026 |
Chatbots, content tools, MCP server | 90,000+ | 4.9 of 5 (879) | 12 Nov 2026 | |
Sites already on Jetpack | 3,000,000+ | 3.7 of 5 (2,412) | 3 Nov 2026 | |
Live chat with an AI support bot (hosted service) | 70,000+ | 4.8 of 5 (395) | 1 Sep 2026 | |
Letting AI agents use your site’s abilities | 70,000+ | Too few ratings | 16 Oct 2026 |
The AI plugin has only ten ratings so far, too few to read much into. AI Engine has the longest track record of the group and an active support forum; WordPress.org showed all 20 of its support threads from the last two months as resolved when we checked. Tidio is a hosted chat service, so conversations live on its platform rather than in WordPress. If you sell online, our walkthrough of AI chatbots for WooCommerce support covers that use case in depth.
SEO plugins are the other common entry point. Several of them sell AI title and meta description features on paid plans or with credits, which is worth knowing before you also turn on meta description generation in the AI plugin: two tools writing the same field is how people end up with the conflict described in the mistakes section below.
How do developers use the WordPress AI Client?
Through one function. wp_ai_client_prompt() returns a prompt builder; you chain configuration onto it and finish with a generate method such as generate_text() or generate_image(). You never touch an API key, because the Connectors screen handles credentials, and you never write provider-specific code, because the user picks the provider.
This example adds a summary helper to a plugin. It checks that the AI Client exists, that AI is allowed on this site, that the user may edit the post, and that a connected provider can generate text, before it makes any paid request:
<?php
/**
* Plugin Name: Example AI Summary
* Description: Adds a "Suggest a summary" helper using the WordPress 7.0+ AI Client.
*/
function example_ai_suggest_summary( int $post_id ) {
// Stop early on WordPress < 7.0 or when AI is switched off for this site.
if ( ! function_exists( 'wp_ai_client_prompt' ) || ! wp_supports_ai() ) {
return new WP_Error( 'ai_unavailable', 'AI is not available on this site.' );
}
$post = get_post( $post_id );
if ( ! $post || ! current_user_can( 'edit_post', $post_id ) ) {
return new WP_Error( 'forbidden', 'You cannot edit this post.' );
}
$builder = wp_ai_client_prompt( wp_strip_all_tags( $post->post_content ) )
->using_system_instruction( 'Summarise this article in two plain sentences, in the same language as the article.' )
->using_max_tokens( 200 );
// Feature check: makes no API call and costs nothing.
if ( ! $builder->is_supported_for_text_generation() ) {
return new WP_Error( 'no_provider', 'Connect a text provider under Settings > Connectors.' );
}
$summary = $builder->generate_text();
// On failure the AI Client returns a WP_Error, never a fatal error.
if ( is_wp_error( $summary ) ) {
return $summary;
}
return sanitize_textarea_field( $summary );
}Three details from the developer note matter in production. The is_supported_for_*() checks make no API call and cost nothing, so use them to hide AI buttons when no provider is connected. Every generate method returns a WP_Error on failure rather than throwing, so check with is_wp_error(). And you can pass a list of preferred models with using_model_preference(), but the site owner’s connected provider still decides what is actually available.
How do you limit who can trigger AI requests?
Use the wp_ai_client_prevent_prompt filter. When it returns true, no request is sent, the support checks return false and the generate methods return a WP_Error. Every plugin built on the AI Client respects it, which makes it the simplest site-wide spending control you have:
<?php
// Only administrators and editors may trigger AI requests on this site.
add_filter(
'wp_ai_client_prevent_prompt',
function ( $prevent ) {
return $prevent || ! current_user_can( 'edit_others_posts' );
}
);To switch AI off completely, for example on a staging site that should never bill your account, set this constant in wp-config.php. Core’s wp_supports_ai() returns false when it is set, and well-behaved plugins check that function before they offer AI features:
// Turn off AI features for this whole install.
define( 'WP_AI_SUPPORT', false );Before you paste any AI-related snippet into a live site, including ours, read it line by line. Our 10 checks for AI-written WordPress snippets apply here too.
What is the Abilities API, and why does it matter for AI?
The Abilities API, added in WordPress 6.9, is a registry of named actions your site can perform, each with a description, a JSON Schema for input and output, and a permission callback. It matters for AI because an agent can discover those abilities, read what each one does, and call it, while WordPress still enforces your permission check every time. The Abilities API handbook on developer.wordpress.org documents the full argument list.
Categories register on wp_abilities_api_categories_init and abilities on wp_abilities_api_init; core logs a “doing it wrong” notice and refuses registration on any other hook. This read-only example reports how many drafts are waiting:
<?php
// 1. Register a category on its own hook.
add_action(
'wp_abilities_api_categories_init',
function () {
wp_register_ability_category(
'example-site',
array(
'label' => __( 'Site reports', 'example' ),
'description' => __( 'Read-only reports about this site.', 'example' ),
)
);
}
);
// 2. Register the ability on wp_abilities_api_init.
add_action(
'wp_abilities_api_init',
function () {
wp_register_ability(
'example/count-drafts',
array(
'label' => __( 'Count draft posts', 'example' ),
'description' => __( 'Returns how many posts are waiting as drafts.', 'example' ),
'category' => 'example-site',
'output_schema' => array(
'type' => 'object',
'properties' => array(
'drafts' => array( 'type' => 'integer' ),
),
),
'execute_callback' => function () {
return array( 'drafts' => (int) wp_count_posts( 'post' )->draft );
},
'permission_callback' => function () {
return current_user_can( 'edit_posts' );
},
'meta' => array(
'annotations' => array( 'readonly' => true ),
'show_in_rest' => true,
),
)
);
}
);With show_in_rest set, the ability appears at /wp-json/wp-abilities/v1/abilities and runs at /wp-json/wp-abilities/v1/abilities/example/count-drafts/run. Because it is marked read-only, the run endpoint expects a GET request; abilities that change data expect POST. Core already registers three abilities of its own in 7.1.4: core/get-site-info, core/get-user-info and core/get-environment-info.
The MCP Adapter plugin turns registered abilities into Model Context Protocol tools, so desktop AI assistants and agents can use them. Treat that like handing out an API: expose read-only abilities first, keep destructive ones behind a strict permission_callback, and give agents their own low-privilege user account.
Is it safe to send your WordPress content to an AI provider?
It can be, but you should decide it on purpose, not by accident. Every AI request sends some of your content to a third party: the post you are summarising, the image you want alt text for, or a visitor’s comment if an automatic moderation feature is on. That makes the provider a data processor for your site, and in many countries your privacy policy has to say so.
- Check the provider’s data terms. OpenAI’s API data documentation says API data is not used to train its models unless you opt in, and that abuse monitoring logs are kept for up to 30 days by default. Anthropic and Google publish their own terms; read the ones for the provider you connect.
- Know which features run on their own. The AI plugin marks Experiments that “run automatically” in its settings. Comment Moderation, for example, checks every new comment, including comments from visitors, which means visitor text goes to your provider. Type-ahead Text, which suggests text as you type in the block editor, is another.
- Update your privacy policy. Name the provider, what is sent and why. WordPress’s Privacy settings page links to the policy guide that plugins can add text to.
- Watch your logs. Debug and request logging features in AI plugins can write prompts, and therefore personal data, into log files. Turn them off once you finish testing.
- Do not send what you would not email. Private member data, health information and anything under contract should stay out of prompts unless your agreement with the provider covers it.
A separate question is who is crawling you for AI. Our guide to scanners pretending to be AI crawlers covers that side, which has nothing to do with the features you add.
How much does it cost to add AI to WordPress?
The plugins are mostly free; the provider bills you for usage. The AI plugin says it plainly: the plugin is free, and each request is billed by your provider under your account. Providers charge by tokens, roughly chunks of words, for both what you send and what comes back, and image generation is priced separately. Current rates are on the Anthropic, Google Gemini and OpenAI pricing pages; they change often enough that we will not quote them here.
In practice, the bill depends far more on how features are used than on the model you pick:
Cost driver | Why it adds up | What to do |
|---|---|---|
Automatic features | Run on every comment, upload or save, not when someone clicks | Enable them one at a time and check usage after a week |
Long content | Summarising a 4,000-word post sends all 4,000 words | Send excerpts or sections where that is enough |
Image generation | Usually the most expensive request type | Limit it to editors with the prevent-prompt filter |
Public chatbots | Visitors, and bots, can send unlimited messages | Rate-limit, require login, or cap monthly spend |
Staging copies | A cloned site keeps the same key and features | Set WP_AI_SUPPORT to false on staging |
Every provider lets you set a monthly spending limit or alerts in its dashboard. Set one before you switch anything on.
Which approach fits your site?
Your situation | Our suggestion |
|---|---|
Blog or business site that wants writing help | Provider plugin plus the AI plugin; enable excerpts and alt text first |
Shop that wants a support bot | A dedicated chatbot plugin or service, with clear limits on what it may answer |
Plugin or theme developer | Build on |
Agency running many client sites | Keys as environment variables, AI off on staging, spending caps per site |
Site that wants AI agents to manage content | Register abilities with strict permissions, then add the MCP Adapter |
If you need AI features built into your own WordPress plugin or workflow, our team at Wbcom Designs does this as WordPress AI integration work: role-based access, keys kept on the server and an approval step before anything goes live. It is custom development scoped after a call, and for many sites the free plugins above are enough, so start there. For a deeper custom build, our walkthrough of a context-aware WooCommerce support agent using RAG shows what that involves.
Common mistakes people report
These come up again and again in the WordPress.org support forums for the AI plugins. We read each thread on 18 November 2026.
- Expecting a chat subscription to work as an API key. In a thread on AI Provider for OpenAI from autumn 2026, a user asked to use their OpenAI subscription instead of paying for API usage as well. The plugin author replied that a “connect your account” option depends on two open WordPress core tickets. For now, API usage is billed separately.
- Blaming the AI plugin for another plugin’s REST API block. A site owner saw “You do not have permission to install plugins” on the Connectors page while logged in as an administrator. In the resolved thread, the cause was another plugin interfering with the REST API. Security plugins that restrict the REST API are the first thing to check.
- Getting English output on a non-English site. A German site owner reported that excerpts, alt text and titles came back in English. In the thread, the plugin author pointed to version 0.7.0, which returns content in the language of the original. If you see this, update first.
- Two plugins writing the same SEO field. With Rank Math active, a generated meta description was shown in the editor but lost on save. The plugin author confirmed the report and scheduled a Rank Math adapter for AI plugin 1.6.0; until then, paste the text into Rank Math’s own field.
- Assuming a chatbot keeps nothing. In an AI Engine thread about retention, the developer explained that the plugin does not send OpenAI’s
store=falseoption, so OpenAI’s default retention applies, and recommended turning off browser-side Local Memory and query debugging for sensitive conversations. Read your chatbot’s data settings before launch.
Frequently asked questions
Do I need WordPress 7.0 to add AI to my site?
No. Many AI plugins work on older versions with their own settings. You need 7.0 or later for the shared Connectors screen and for plugins built on the core AI Client, and 6.9 or later for the Abilities API.
Can I use a local model instead of a cloud provider?
Yes, through a connector plugin. The three official connectors are cloud services, but the AI plugin author pointed a user asking about this to AI Provider for Ollama, which supports local and cloud Ollama models. Local models need a server with enough memory, which most shared hosting does not offer.
Is AI-written content bad for SEO?
Google’s published position, in its guidance on AI-generated content, is that it rewards helpful content however it is produced, and that using automation mainly to manipulate rankings breaks its spam policies. AI drafts still need a person to check facts and add real experience.
Will AI features slow down my site?
Requests happen when an editor clicks a button or in the background, not on every page view, so visitors rarely notice. Watch features that run on page load, such as chat widgets, and a support thread about the Type-ahead feature loading heavy editor files shows it is worth testing the block editor after you enable experiments.
Can I turn AI off again?
Yes. Switch features off in the plugin settings, deactivate the plugins, or set WP_AI_SUPPORT to false in wp-config.php to disable the core AI layer for the whole install. Then remove the API key from Settings > Connectors and revoke it in the provider’s dashboard.
Plugins we build and run
We maintain these ourselves, which is why we can support them on your site.
- BuddyNextThe self-hosted community engine for WordPress
- BuddyXFree community theme, Pro when you outgrow it
- ReignPremium community theme. Add pieces, build anything
- JetonomyCommunity forum and Q&A for WordPress
- EventonomyEvents and RSVPs for WordPress communities
- LearnomyCourses and learning communities on WordPress
- ListoraDirectories and listings your members can browse
- SnipShareCode sharing built for developer communities
- WB Ad ManagerAd placements that turn traffic into revenue
- WP Career BoardA job board your community actually uses
- WP Sell ServicesSell services with offers, orders, and payouts
- MediaVersePhotos, video, and media albums for members
- WB GamificationPoints, badges, and rewards that keep members active
- Product RoadmapPublic roadmaps with voting your users trust
- KanbanomyProject management with a client portal, on your own WordPress site


