Title: Using WP-CLI
Last modified: July 17, 2026

---

# Using WP-CLI

 *  Resolved [jpenglish98](https://wordpress.org/support/users/jpenglish98/)
 * (@jpenglish98)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/using-wp-cli/)
 * Working well so far! Thanks for your great product!
 * I’m running into timeouts when I try to run bulk action on more than 20 images
   at a time within the wp-admin Media Library, and as I have around 2000 images
   to process, I’m looking at WP-CLI (which I’ve never worked with,) as a solution.
 * Is it necessary to specify AI provider/model, API key, and Prompt in the WP-CLI
   terminal session? Or will it get that information from within the settings?
 * It would be helpful if you created a FAQ with more explicit instructions on using
   WP-CLI.
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Valerio Monti](https://wordpress.org/support/users/valeriomonti/)
 * (@valeriomonti)
 * [6 days, 17 hours ago](https://wordpress.org/support/topic/using-wp-cli/#post-18969955)
 * Thanks for the kind words!
 * Good news: you don’t need to pass anything. The WP-CLI command (available since
   v2.8.0) runs through exactly the same service the Media Library uses, so it reads
   the AI provider, model, API key and prompt straight from Auto Alt Text options.
 * There are no flags for credentials at all, just configure the plugin in wp-admin
   once, and the CLI will
   use those settings.
 * Basic usage (run it from your WordPress root over SSH):
 *     ```wp-block-code
       wp auto-alt-text generate --all --limit=50
       ```
   
 * **–limit** is the batch size the command works through, so with 2000 images you
   can just leave it running. WP-CLI has no HTTP timeout, which is exactly why it
   solves the problem you hit in the browser.
   Other options:**–ids**=123,456,789–
   process specific attachments instead of everything**–dry-run** – see what would
   happen without writing any alt text (good for a first test)**–force** – overwrite
   existing alt text even if “Keep existing alt text” is enabled in the settings
 * A couple of practical tips for a 2000-image run:
    1. Start with a small test: wp auto-alt-text generate –ids= –dry-run, then without–
       dry-run.
    2. By default, if “Keep existing alt text” is enabled, images that already have
       alt text are skipped, so you only pay for what’s missing.
    3. At the end the command prints a summary (Processed / Updated / Skipped / Failed).
       Any API failure is logged in Auto Alt Text → Error log with the reason, and 
       never blocks the run.
    4. Keep an eye on your provider’s rate limits/billing. 2000 vision calls is a real
       cost.
 * And yes, you’re right that the docs are too thin on this, I’ll add a proper FAQ
   section on WP-CLI in the next release.
 *  Thread Starter [jpenglish98](https://wordpress.org/support/users/jpenglish98/)
 * (@jpenglish98)
 * [3 days, 15 hours ago](https://wordpress.org/support/topic/using-wp-cli/#post-18973215)
 * Thank you so much for your rapid and comprehensive response! I’m happy to let
   you know that I’ve successfully run the operation per your instructions without
   a hitch. Everything came out great! Thanks again for your fantastic product!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-wp-cli%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/auto-alt-text/assets/icon.svg?rev=3052057)
 * [Auto Alt Text](https://wordpress.org/plugins/auto-alt-text/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/auto-alt-text/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/auto-alt-text/)
 * [Active Topics](https://wordpress.org/support/plugin/auto-alt-text/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/auto-alt-text/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/auto-alt-text/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 2 replies
 * 2 participants
 * Last reply from: [jpenglish98](https://wordpress.org/support/users/jpenglish98/)
 * Last activity: [3 days, 15 hours ago](https://wordpress.org/support/topic/using-wp-cli/#post-18973215)
 * Status: resolved