Skip to content
WP Engine Developer Docs Example

Getting Started with AI Toolkit

Learn how to add AI-powered features to your WordPress site in minutes.

Before you begin, ensure you have:

  • An active WP Engine hosting account
  • WordPress 6.0 or higher
  • AI Toolkit enabled in your WP Engine portal
  • Basic PHP and WordPress knowledge
  1. Log in to your WP Engine portal
  2. Navigate to the Add-ons section
  3. Find “AI Toolkit” and click “Enable”
  4. Wait for provisioning to complete (usually 2-3 minutes)

Via WP-CLI:

Terminal window
wp plugin install wpe-ai-toolkit --activate

Or via WordPress admin:

  1. Go to Plugins → Add New
  2. Search for “WP Engine AI Toolkit”
  3. Click Install and Activate

Navigate to Settings → AI Toolkit and configure:

  • AI Model: Choose your preferred model (GPT-4o, Claude, Gemini)
  • Rate Limit: Set your daily request limit
  • Features: Enable the features you want to use
  • API Key: Your key is auto-configured

Add this to your theme or plugin:

<?php
// Generate a post excerpt
$excerpt = wpe_ai()->content()->generate([
'prompt' => 'Create a compelling excerpt for: ' . get_the_title(),
'length' => 'short',
'tone' => 'engaging'
]);
echo '<p>' . esc_html($excerpt) . '</p>';

Add AI-powered search to your site:

add_filter('pre_get_posts', function($query) {
if ($query->is_search() && !is_admin()) {
return wpe_ai()->search()->enhance($query);
}
return $query;
});

Insert this shortcode on any page:

[wpe_ai_chatbot style="modern" position="bottom-right"]
// Check if AI Toolkit is active
if (function_exists('wpe_ai')) {
echo 'AI Toolkit is ready!';
// Check quota
$usage = wpe_ai()->usage()->get_stats();
echo "Used: {$usage['used']} / {$usage['limit']} requests";
}
Terminal window
wp wpe-ai test --feature=content-generation
// In wp-config.php
define('WPE_AI_MODEL', 'gpt-4o');
define('WPE_AI_TEMPERATURE', 0.7);
define('WPE_AI_MAX_TOKENS', 2000);
// Enable/disable specific features
define('WPE_AI_CONTENT_GENERATION', true);
define('WPE_AI_SMART_SEARCH', true);
define('WPE_AI_CHATBOT', false);
define('WPE_AI_IMAGE_GENERATION', true);

Now that you’re set up, explore more features:

  1. Check PHP version (7.4+ required)
  2. Verify AI Toolkit is enabled in portal
  3. Check error logs: wp-content/debug.log

If you see API errors:

Terminal window
# Test connectivity
wp wpe-ai diagnose
# Refresh API credentials
wp wpe-ai refresh-credentials

Monitor your usage:

$stats = wpe_ai()->usage()->get_stats();
echo "Remaining: " . ($stats['limit'] - $stats['used']);