In this practical guide you set up the connection, configure the editor's AI features and use them on a draft post. At the end there is a separate section for developers: Connectors and the WordPress AI Client enable provider-agnostic server-side requests. The interface path in this guide was tested with WordPress 7.0, PHP 8.3.6, AI plugin 1.3.0 and AI Provider for OpenAI 1.1.0 on 8 September 2026. Other version combinations should be checked in a staging environment.
Before you start
- You need WordPress administrator rights to manage plugins and AI settings.
- You need an account with your chosen provider and an API key for it. In this guide the provider is OpenAI.
- The editor's ready-made AI features need the WordPress AI plugin. Connectors and the WordPress AI Client do not need this plugin themselves.
- Test a new combination on a staging site first, and check the provider's model, quota and billing limits.
1. Connect OpenAI to WordPress
- In the WordPress admin, open Plugins > Add New.
- Install and activate the AI Provider for OpenAI plugin. Before installing, check the provider's official name, author and the slug
ai-provider-for-openai. - Open Settings > Connectors (the Connectors screen). In the OpenAI connector, select Set up.
- Enter your own API key in the API KEY field and click Save. The form in the image is intentionally empty. Do not take a screenshot of a visible API key.
- Make sure the connector's status shows Connected. This confirms the connection setting, but on its own it does not prove that the model is available, that you have quota, or that billing works.


2. Enable the editor's AI features
- Install and activate the AI plugin (identifier
ai) in the WordPress plugin management. - Open Settings > AI and turn on Enable AI.
- Turn on Title Generation and Excerpt Generation. The other experimental features are optional. For this title and excerpt guide you do not need to enable image generation.
- If the plugin's interface texts appear in English, that is expected in this environment even when WordPress core is translated into Finnish.
Note: The AI plugin brings the editor's ready-made features. It does not install a connector or replace setting up the API key.
3. Choose a provider and model for both features
- Open the three-dot menu (Developer Tools) in the top right corner of the AI settings and select Model selection.
- For the Title Generation feature, choose OpenAI as the provider and
gpt-5.6-lunaas the model. Click that feature's Save button. - Choose the same Provider and Model for the Excerpt Generation feature too, and save it separately.
gpt-5.6-luna is an example that was found to work in this test. It is not the default for all accounts, nor a promise of availability. If the model does not appear, check the provider's compatibility, your account's model permissions and usage limits. The UI plugin's settings are feature-specific: they do not automatically configure all of your own PHP calls.

4. Write the post before generating
- Open Posts > Add New Post.
- First write the post's actual content. The title and excerpt features use existing content; they are not a general chat writer for an empty post.
- Write at least 250 characters without spaces. In practice, two paragraphs of content are usually enough to start with. A clear source text produces a more useful suggestion.
- Select Save draft. Do not include confidential information about customers or other people in the text without an appropriate basis.
5. Generate and review the title
- Click the post's Add title field. The AI Generate button appears above the field.
- Click Generate. WordPress opens a Title suggestion window where you can review the suggestion.
- Edit the suggestion if needed in the Generated title field, and click Insert when the title is acceptable.
- If the post already has a title, the button says Regenerate. The Regenerate button in the suggestion window also makes a new API request. Always check claims, names and product details before saving.


6. Generate and review the excerpt
- Open the right-hand sidebar and select the Post tab at the top. If the sidebar is hidden, open Settings in the top right corner.
- Next to the Write an excerpt… item, find the AI icon named Generate excerpt. You can also open the excerpt field and use the same feature.
- In this feature, the AI's suggestion is added directly to the excerpt; there is no separate Insert confirmation in this version. Open Edit excerpt if you want to review or change the whole text.
- Review and edit the text, close the excerpt window and click Save draft. Generating does not publish the post.
The excerpt is separate from the post's body text. A theme may show it in post lists, but it should not automatically be treated as an SEO meta description. Regenerate excerpt replaces the excerpt you are working on, so copy the current text first if you want to keep it.

7. Check the draft
Check the title and content in the preview, and the excerpt in the editor's excerpt field. After saving, make sure the post's status is Draft. Publish only when you are ready. AI-generated text is always a suggestion: check facts, tone, links and accessibility before publishing.
For developers: Connectors and the WordPress AI Client
Connectors is WordPress's Settings > Connectors view and the interface behind it. A connector plugin registers a provider in the WordPress AI Client's provider registry. After that, your own plugin can request, for example, text without its server-side code being tied to the details of the OpenAI, Anthropic or Google API. Connectors and the AI Client do not require the AI plugin.
The provider-agnostic basic model in the WordPress Developer documentation uses the wp_ai_client_prompt() function. The example belongs in a plugin or theme that runs on the server side, not in JavaScript executed in the browser:
<?php
function hostaan_generate_product_description() {
if ( ! function_exists( 'wp_ai_client_prompt' ) ) {
return new WP_Error( 'hostaan_ai_client_missing', 'WordPress AI Client is not available.' );
}
$prompt = wp_ai_client_prompt( 'Write a short description of this product.' );
$text = $prompt->generate_text();
if ( is_wp_error( $text ) ) {
return $text;
}
return $text;
}The function is only defined, and it does not call the AI service when the file is loaded. Call it only from an authorized server-side action where the user and the action have the required permissions. Always handle WP_Error, do not output secrets along with an error, and escape the accepted output according to context, for example with the esc_html() function.
Source of the API key: In this implementation of the OpenAI provider, the primary source is the server's OPENAI_API_KEY environment variable, followed by a PHP constant of the same name, and finally the database setting saved in the Connectors view. Always check the current documentation of the provider you use. Do not write the key in source code, JavaScript, public HTML, version control, screenshots or logs. If a key leaks, revoke it in the provider's admin and create a new one.
The feature-specific model setting is not a general default: The provider and model selected in the Settings > AI view control that particular editor feature. Your own wp_ai_client_prompt() calls must be designed and tested separately with the capabilities, provider and model they need.
A key saved in the Connectors view is stored in the database. Masking the field does not mean the database is encrypted: the core default does not encrypt the key. AI plugin 1.3.0 has an optional, experimental Key Encryption feature. If storing the key in the database does not suit your environment, use a server-level secret through an environment variable or a PHP constant.
Troubleshooting
- Generate does not appear: turn on Enable AI and Title Generation or Excerpt Generation, click the right field, and make sure the post has at least 250 characters without spaces.
- The excerpt controls do not appear: open the Post tab of the right-hand sidebar and make sure the excerpt area is visible.
- The connector does not appear: check that the provider plugin is installed and active, and that the WordPress, AI and provider versions you use are compatible.
- The model does not appear in the menu: check the provider's compatibility, your account's model permissions and the model's availability. Do not switch to a random model just because its name is visible.
- 401 error: check that the API key is valid, the priority of its source and the provider's permissions.
- 429 error or a billing problem: check the provider's quota, usage limits, billing and the model's availability. A connected connector alone does not guarantee a successful request.
- The text is incorrect: review the AI's suggestion yourself, keep the source text appropriate, and do not send private customer information to the provider without an appropriate basis.
Costs, data and permissions
The provider's API use may incur separate charges. Check the provider's billing, quota, model-specific restrictions and data processing terms before going to production. Give access to managing Connectors and AI settings only to people who are allowed to manage the service's keys and the content to be published.
Tested environment
Successful editor work with a title and an excerpt was tested on 8 September 2026 with WordPress 7.0, PHP 8.3.6, AI plugin 1.3.0, AI Provider for OpenAI 1.1.0 and the model gpt-5.6-luna. The result was a saved title and excerpt in a draft. The test is not a promise that all versions, providers or features work. Verify your own combination on staging first, and use supported versions in production.