{"id":19,"date":"2026-11-09T20:29:40","date_gmt":"2026-11-09T20:29:40","guid":{"rendered":"https:\/\/nazmulrobin.com\/products\/database-cleaner\/docs\/wp-cli\/"},"modified":"2026-11-09T20:29:40","modified_gmt":"2026-11-09T20:29:40","slug":"wp-cli","status":"publish","type":"nazmulrobin_doc","link":"https:\/\/nazmulrobin.com\/products\/database-cleaner\/docs\/wp-cli\/","title":{"rendered":"WP-CLI and AI agents"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Options, cleanups and tables have WP-CLI commands. Add <code>--format=json<\/code> to any list.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp nhrotm list\nwp nhrotm cleanup list\nwp nhrotm cleanup run &lt;type&gt; --older-than=30 --dry-run\nwp nhrotm tables list\nwp nhrotm tables optimize<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">AI agents and MCP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On WordPress 6.9 and later the plugin registers its features with the WordPress Abilities API. An AI agent or MCP client (through the WordPress MCP Adapter) can read the health score, cleanup counts, autoload report, tables, cron events and the activity log, preview a cleanup, and run the safe actions: a cleanup (a dry run unless told otherwise), turning off autoload for an option, optimizing a table and taking a snapshot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It cannot read option or meta values, edit or delete options, drop tables, run Search &amp; Replace or Import, or change settings. Every ability needs an administrator.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Options, cleanups and tables have WP-CLI commands. Add &#8211;format=json to any list. AI agents and MCP On WordPress 6.9 and later the plugin registers its features with the WordPress Abilities API. An AI agent or MCP client (through the WordPress MCP Adapter) can read the health score, cleanup counts, autoload report, tables, cron events and [&hellip;]<\/p>\n","protected":false},"parent":12,"menu_order":7,"template":"","class_list":["post-19","nazmulrobin_doc","type-nazmulrobin_doc","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/nazmulrobin_doc\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/nazmulrobin_doc"}],"about":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/types\/nazmulrobin_doc"}],"up":[{"embeddable":true,"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/nazmulrobin_doc\/12"}],"wp:attachment":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/media?parent=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}