WP-CLI commands
If you know WP-CLI, your assistant can use the same commands on your site, or on many sites at once: plugins, themes and WordPress updates, users, settings, menus, cache, cron and the database. They run through AI Puffer like everything else: as the WordPress user you chose, at your safety level, and in your activity log. There’s no SSH, no server login and no WP-CLI install. It’s on every plan, including Free.
Ask in plain words, or name the command:
Check which plugins have updates, then update WooCommerce and tell me the old and new version.
You don’t need to name WP-CLI. Your assistant chooses a supported tool for the task. This page explains the command adapter and its limits; ready-to-use tasks live in the WordPress cookbook.
How it runs
Section titled “How it runs”- Nothing runs in a shell. AI Puffer reads the command, checks it and carries it out through WordPress’s own functions. There’s no shell expansion, no chaining and no
wp eval. - Your safety level applies. At Standard, every command that changes something requires your approval; reads don’t. At Trusted, it just runs.
- The user you chose is the ceiling.
wp user createneeds a user who may create users,wp plugin installone who may install plugins, and so on. - Passwords and keys stay hidden. They’re never shown in results and can’t be changed, and neither can AI Puffer’s own connection settings.
- Output is JSON. Run
wp helpto see every supported command and its flags.
Posts, pages, images and comments
Section titled “Posts, pages, images and comments”| Command | What it does |
|---|---|
wp post list, wp post get |
Find and read ordinary posts and pages. |
wp post-type list |
List registered content types and their available REST routes. |
wp post create, wp post update |
Create a post or page (always a draft), or change it. update needs the version from get, so a newer edit is never overwritten. On posts and pages built in the block editor, update doesn’t change the content, so the blocks are never flattened: leave out --post_content to change the title, excerpt, slug, categories, tags or featured image. For supported text or link fixes, your assistant uses the native block abilities instead: see Add internal links to a post. To replace the whole layout, see Build a page from blocks. |
wp post delete |
Move to the trash, or delete for good with --force. |
wp post meta get/list/add/update/delete |
Custom fields. Hidden fields (starting with _) need --force; fields a plugin registers also follow that plugin’s own permission checks. |
wp post term set/add/remove, wp term list/get/create/update/delete, wp taxonomy list |
Categories and tags. |
wp media list, wp media import, wp media image-size |
Find images, add one from a public HTTPS address, list image sizes. |
wp comment list/count/create/approve/unapprove/spam/unspam/trash/untrash/delete |
Moderate comments. |
For a plugin’s custom content, such as a directory listing, your assistant uses that plugin’s native ability or REST route. From AI Puffer 2.5.18, wp post-type list reports the routes registered on your site, including custom namespaces. When one route is available, it appears as rest_route; rest_routes lists all available routes. If none is listed, your assistant can inspect the plugin’s REST namespace. A route still needs the permissions of your connected WordPress user.
For example, GeoDirectory places use /geodir/v2/places. With AI Puffer 2.5.19 or later and GeoDirectory’s Advanced Editor enabled, supported description fields preserve safe headings, paragraphs, bold text and links. See the GeoDirectory workflows. Ordinary post commands explain when a custom content type needs its native route. Existing Gutenberg blocks remain protected when changing content through a supported post route.
Menus and widgets
Section titled “Menus and widgets”| Command | What it does |
|---|---|
wp menu list/create, wp menu item list/add-post/add-term/add-custom/update/delete |
Classic navigation menus. |
wp menu location list/assign |
Put a menu in a theme location. |
wp sidebar list, wp widget list |
See sidebars and widgets. |
Settings
Section titled “Settings”| Command | What it does |
|---|---|
wp option get/list/pluck/add/update/patch/delete |
Site and plugin settings stored as options. |
wp transient get/list/delete |
Temporary cached values. |
wp theme mod list/get/set |
Customizer settings of the active theme. |
Changes to active plugins, the active theme, user roles and scheduled tasks go through their own commands below, not wp option.
Users and roles
Section titled “Users and roles”| Command | What it does |
|---|---|
wp user list/get/create/update/delete |
Accounts. delete can reassign posts to another user with --reassign. |
wp user set-role/add-role/remove-role/add-cap/remove-cap |
A user’s roles and capabilities. |
wp user meta get/list/add/update/delete |
User fields. |
wp role list/create/delete/reset, wp cap list/add/remove |
Roles and what they can do. The administrator role can’t be deleted. |
Plugins, themes and WordPress
Section titled “Plugins, themes and WordPress”| Command | What it does |
|---|---|
wp plugin list/status/get/search |
What’s installed, and what’s on WordPress.org. |
wp plugin install/activate/deactivate/update/uninstall |
Install, switch on or off, update or remove a plugin. |
wp plugin auto-updates status/enable/disable, wp plugin verify-checksums |
Auto-updates and file checks. |
wp theme list/status/get/install/activate/update/delete |
Themes. |
wp core version/check-update/update/update-db/verify-checksums |
WordPress itself. |
Installs and updates come from WordPress.org only. Plugins and themes sold elsewhere update the way their vendor provides. Editing theme files is separate and needs a paid plan: see Themes.
Cache, cron and maintenance
Section titled “Cache, cron and maintenance”| Command | What it does |
|---|---|
wp cache type/flush, wp rewrite list/flush/structure |
Object cache and permalinks. |
wp cron event list/run/delete, wp cron test |
Scheduled tasks. |
wp litespeed-purge, wp sg purge, wp super-cache flush, wp w3-total-cache flush, wp breeze purge, wp elementor flush-css |
Clear the cache of LiteSpeed Cache, SiteGround Optimizer, WP Super Cache, W3 Total Cache, Breeze and Elementor. |
wp maintenance-mode status |
Whether the site is in maintenance mode. |
Database
Section titled “Database”| Command | What it does |
|---|---|
wp db tables, wp db columns <table>, wp db prefix, wp config get |
Look around: tables, including your plugins’ own, and their columns. |
wp db query "SELECT …" |
Read from WordPress’s tables and your plugins’ tables. Joins, WHERE with AND, OR, IN and BETWEEN, and totals such as COUNT, SUM and AVG. Up to 1,000 rows. |
wp db query "UPDATE …" (or INSERT, DELETE) |
Change data in a plugin’s table: up to 100 rows in one go, chosen with WHERE, all or nothing. Add --expected-count=<n> to stop if the number of matching rows isn’t what you expect. Nothing changes, and your assistant tells you how many it expected and how many it found. Posts and settings change one exact record at a time. |
wp search-replace <old> <new> |
Replace text across content and settings, safe for serialized data. Try --dry-run first, then pass its count with --expected-count=<n>. If the content changed in between, nothing is replaced and your assistant previews again. Large sites go in batches of up to 100 rows. |
Queries are read and checked by AI Puffer, never passed to the database as typed. Passwords, keys and AI Puffer’s own tables stay hidden. Schema changes (CREATE, ALTER, DROP) aren’t supported.
From 2.5.18, a supported SQL function with the wrong number of arguments is refused before the query runs, with an explanation your assistant can use to correct it. For example, ROUND(ID, 2) is valid, while ROUND(ID, 1, 2) returns unsupported_command. A refused read uses no website actions.
Many sites at once
Section titled “Many sites at once”Your assistant can run a list of commands on up to 50 of your connected sites as one background job, up to 50 commands per site.
On all my sites, check which plugins have updates and update Yoast SEO.
- Commands run in order on each site. If one needs your approval, fails or has an unclear outcome, the rest wait on that site; the other sites carry on.
- Each site keeps its own WordPress user, safety level, approvals and allowance.
- Ask for progress at any time, or stop the commands that haven’t started. Stopping never undoes what already ran.
- Each command that succeeds counts as one website action. Starting a job, checking it and stopping it are free.
- A job runs for at most 24 hours. Ask your assistant how it’s going at any time.
Not supported yet
Section titled “Not supported yet”- Database schema changes.
wp eval,wp shell,wp packageand anything that runs code. Unknown commands and flags are refused with a list of what is supported.
Native page builders
Section titled “Native page builders”For builder pages, your assistant uses the installed native page operations instead of replacing post HTML. AI Puffer 2.5.19 adds tested workflows for Beaver Builder, GenerateBlocks, SiteOrigin Page Builder, Pagelayer and SeedProd, plus GeneratePress page settings. SeedProd layout changes need a Save in its editor before visitor output updates. Each integration page explains the supported scope.