A demonstration plugin showcasing the integration and capabilities of the WordPress AI Client library. This plugin demonstrates how to build AI-powered features in WordPress using both PHP and JavaScript.
WP AI Workshop Demo provides a practical example of integrating AI capabilities into WordPress. Its core feature — Photo to Post — takes an image URL, describes the image with an AI vision model, writes a blog post about it, and creates a draft post with the photo as the featured image. It demonstrates:
- AI vision (image understanding) using the WP AI Client
- AI text generation for post title and Block Editor content
- Composing multiple WordPress Abilities (one ability calling others via
WP_Ability::execute()) - Exposing abilities over REST and MCP
- An admin interface (React + DataViews) that drives an ability from the browser
See WORKSHOP.md to build this plugin step by step.
- WordPress 6.0 or higher
- PHP 8.0 or higher
- Composer
- Node.js and npm (for building JavaScript assets)
- API credentials for an AI provider (configured through the WP AI Client)
-
Clone or download this plugin to your WordPress plugins directory:
cd wp-content/plugins git clone git@github.com:jonathanbossenger/wp-ai-workshop-demo.git -
Install PHP dependencies:
cd wp-ai-workshop-demo composer install -
Install JavaScript dependencies and build assets:
npm install npm run build
-
Activate the plugin through the WordPress admin interface or via WP-CLI:
wp plugin activate wp-ai-workshop-demo
-
Configure your AI provider credentials as required by the WP AI Client library
Access the demo tools page from the WordPress admin:
- Navigate to Tools > WP AI Workshop Demo in your WordPress admin
- Use the interface to test AI capabilities
GPL-2.0-or-later
Jonathan Bossenger