Getting Started with AI Toolkit
Getting Started with AI Toolkit
Section titled “Getting Started with AI Toolkit”Learn how to add AI-powered features to your WordPress site in minutes.
Prerequisites
Section titled “Prerequisites”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
Installation
Section titled “Installation”Step 1: Enable AI Toolkit
Section titled “Step 1: Enable AI Toolkit”- Log in to your WP Engine portal
- Navigate to the Add-ons section
- Find “AI Toolkit” and click “Enable”
- Wait for provisioning to complete (usually 2-3 minutes)
Step 2: Install the WordPress Plugin
Section titled “Step 2: Install the WordPress Plugin”Via WP-CLI:
wp plugin install wpe-ai-toolkit --activateOr via WordPress admin:
- Go to Plugins → Add New
- Search for “WP Engine AI Toolkit”
- Click Install and Activate
Step 3: Configure Settings
Section titled “Step 3: Configure Settings”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
Your First AI Feature
Section titled “Your First AI Feature”Generate Content with AI
Section titled “Generate Content with AI”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>';Enable Smart Search
Section titled “Enable Smart Search”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;});Add a Simple Chatbot
Section titled “Add a Simple Chatbot”Insert this shortcode on any page:
[wpe_ai_chatbot style="modern" position="bottom-right"]Testing Your Setup
Section titled “Testing Your Setup”Verify Installation
Section titled “Verify Installation”// Check if AI Toolkit is activeif (function_exists('wpe_ai')) { echo 'AI Toolkit is ready!';
// Check quota $usage = wpe_ai()->usage()->get_stats(); echo "Used: {$usage['used']} / {$usage['limit']} requests";}Run a Test Generation
Section titled “Run a Test Generation”wp wpe-ai test --feature=content-generationConfiguration Options
Section titled “Configuration Options”Basic Settings
Section titled “Basic Settings”// In wp-config.phpdefine('WPE_AI_MODEL', 'gpt-4o');define('WPE_AI_TEMPERATURE', 0.7);define('WPE_AI_MAX_TOKENS', 2000);Feature Toggles
Section titled “Feature Toggles”// Enable/disable specific featuresdefine('WPE_AI_CONTENT_GENERATION', true);define('WPE_AI_SMART_SEARCH', true);define('WPE_AI_CHATBOT', false);define('WPE_AI_IMAGE_GENERATION', true);Next Steps
Section titled “Next Steps”Now that you’re set up, explore more features:
Troubleshooting
Section titled “Troubleshooting”Plugin Not Activating
Section titled “Plugin Not Activating”- Check PHP version (7.4+ required)
- Verify AI Toolkit is enabled in portal
- Check error logs:
wp-content/debug.log
API Errors
Section titled “API Errors”If you see API errors:
# Test connectivitywp wpe-ai diagnose
# Refresh API credentialswp wpe-ai refresh-credentialsRate Limit Reached
Section titled “Rate Limit Reached”Monitor your usage:
$stats = wpe_ai()->usage()->get_stats();echo "Remaining: " . ($stats['limit'] - $stats['used']);