← Features / Developer & admin tools

WP-CLI bulk classification

Re-classify, re-transcribe, or re-summarise thousands of posts and attachments from the command line in a single batch.

How it works

ClassifAI registers a wp classifai command namespace with a subcommand for every feature that can run in bulk. Each subcommand accepts a list of post IDs, a post type, or an attachment query, then iterates through the matched items and invokes the same generation path the editor UI uses — so the output is identical to what an editor would see if they triggered the action manually.

Available subcommands

  • wp classifai post — runs language-processing classification (Watson or embeddings) over a list of posts.
  • wp classifai text — classifies arbitrary text for ad-hoc use.
  • wp classifai embeddings — regenerates or refreshes embeddings for the embeddings-based features.
  • wp classifai generate_excerpt — backfills excerpts.
  • wp classifai text_to_speech — regenerates the read-to-me audio for one or more posts.
  • wp classifai transcribe_audio — transcribes audio attachments.
  • wp classifai image — adds alt text and tags to attachments.
  • wp classifai crop — runs smart cropping over existing attachments.
  • wp classifai auth and wp classifai reset — utility commands for credentials and settings.

Common flags

Most subcommands accept the same set of flags so a site can preview a run, throttle batch size to stay inside provider rate limits, and force re-processing of items that already have a generated value:

  • --per_page — batch size per loop.
  • --dry-run — print the affected items without making any API calls.
  • --force — reprocess items that already have a generated value.

Use cases

  • Onboarding ClassifAI onto an existing site with years of legacy content rather than waiting for the lazy-on-publish path to catch up.
  • Backfilling alt text or excerpts across the entire archive after enabling a new feature.
  • Refreshing embeddings after a model upgrade, so Smart 404 and Recommended Content reflect the newer vector space.

From the WordPress experts at Fueled, formerly 10up.

We’ve been delivering enterprise-grade digital work on WordPress since 2011, building and growing sites for global newsrooms, Fortune 500 marketing teams, ambitious startups, and public-sector clients. Our team helps lead the official WordPress Core AI team and has led and contributed to multiple WordPress core releases.

We also partner directly with organizations to build with AI and bring it into their digital products and marketing — on or off WordPress.

15+

years building enterprise WordPress, since 2011

1M+

active installs across plugins authored by our team

Core

co-leads of the official WordPress AI Team

Multi

WordPress core releases led and contributed to