WordPress AI 0.9.0: Moderation, CLI, and Model Controls

Blue-lit server rack hardware representing WordPress AI infrastructure controls

WordPress is steadily moving toward a reality where AI isn’t just a flashy sidebar tool but a fundamental part of the core infrastructure. The recent release of WordPress AI 0.9.0 proves this trajectory. While the marketing teams are busy talking about “magic,” we developers need to look at the actual plumbing: the hooks, the CLI commands, and the model selection logic that actually dictates how these features land on production sites.

The Pragmatic Shift: Why 0.9.0 Matters

In earlier iterations of the AI plugin, we were essentially dealing with a black box. You’d enable a feature, and it would call a pre-defined endpoint with very little room for architectural oversight. However, WordPress AI 0.9.0 introduces a much-needed “Developer Mode.” This isn’t just a UI toggle; it’s a shift toward granular control. Specifically, you can now configure the provider and model on a per-feature basis.

Why is this huge? Because using GPT-4o for a simple “slugify” task is a waste of tokens and adds unnecessary latency. Conversely, you might want a high-parameter model for comment sentiment analysis but something faster and cheaper for bulk alt-text generation. This release lets you make those calls.

Experiment: Automated Comment Moderation

The new Comment Moderation experiment is probably the most practical addition for high-traffic sites. It uses sentiment analysis and toxicity detection to flag comments. If you’ve ever dealt with a site hit by a coordinated spam attack, you know that the native wp_blacklist_keys is a blunt instrument. This new approach acts more like a scalpel.

From a technical perspective, this hooks into the pre_comment_approved filter. It’s not just looking for “bad words”; it’s evaluating intent. But here’s the gotcha: AI isn’t perfect. I’ve seen sentiment analysis flag legitimate technical critiques as “toxic” simply because the tone was blunt. Always keep a human in the loop for the final moderation step.

Scaling with WP-CLI: Bulk Alt-Text Generation

If you’re managing a media library with 50,000 images, clicking an “AI Generate” button in the admin UI is a joke. WordPress AI 0.9.0 finally addresses this with a dedicated WP-CLI command. This is exactly how we should be handling heavy lifting.

# Generate alt text for all images in the media library that are missing it
wp ai alt-text generate --all --missing-only

# Or target a specific attachment ID for testing
wp ai alt-text generate 1024

This command is a lifesaver for accessibility compliance audits. I’d recommend running this in a screen session or a background job, as processing thousands of images via an LLM vision model is a time-intensive operation that you don’t want timing out in your browser.

Fixing the Image Filename Mess

I honestly thought I’d seen every way a media library could get messy. Until recently, AI-generated images were often saved with generic, timestamp-based filenames. It was an SEO disaster. In WordPress AI 0.9.0, the plugin now slugifies filenames based on the post title or the generation prompt. It’s a small refactor that makes a massive difference in organization.

For those of us building custom wrappers around the AI API, you can still filter these outputs. Here’s a quick example of how you might append a custom string to these filenames to track AI-originated assets:

<?php
/**
 * Append a suffix to AI-generated filenames for tracking.
 */
add_filter( 'wp_ai_generated_image_filename', function( $filename ) {
    $path_info = pathinfo( $filename );
    return $path_info['filename'] . '-ai-generated.' . $path_info['extension'];
}, 10, 1 );

Look, if this WordPress AI 0.9.0 stuff is eating up your dev hours, let me handle it. I’ve been wrestling with WordPress since the 4.x days.

Final Takeaway: Preparing for 1.0.0

The road to version 1.0.0 is paved with “experiments” like type-ahead suggestions and C2PA provenance tracking. The goal isn’t to make WordPress “an AI tool,” but to make AI an invisible utility within the editor. If you’re building for clients, now is the time to start testing these features in a staging environment. Don’t wait for 1.0.0 to find out that your custom comment filters are conflicting with the new toxicity detection logic.

For more on integrating these tools, check out my guide on building a custom image generation plugin or read about the upcoming WordPress 7.0 AI framework hurdles. For official specs, the WP-CLI Command Reference is your best friend.

“},excerpt:{raw:
author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.

Leave a Comment