Notes · LLM and WordPress, 4 of 4

WP-CLI or the AI connector: which tool for the job

WP-CLI for mechanical WordPress jobs. An AI agent through the MCP connector for everything you would have to explain.

3 min read Updated Oct 18, 2026 MCP SI WordPress

WP-CLI or the AI connector: which tool for the job

There are two ways to manage a WordPress site without clicking through wp-admin: type exact commands with WP-CLI, or connect an AI agent through the MCP connector and describe what you want. I run real estate and mortgage sites at rgi.realty and rgimortgage.com alongside this one, and both tools get used every week. They are good at different jobs, and picking wrong wastes time in both directions.

WP-CLI: when you can state the exact operation

WP-CLI is a command line tool that runs on the server, over SSH. It does exactly what you type, every time, with no judgment involved. That sounds limiting until you have a job where judgment is the enemy.

The clearest example from the mortgage side: a license line changes. An NMLS number, a DRE number, a required disclosure that appears on dozens of pages. You do not want anything rephrased, interpreted, or improved. You want every instance replaced identically, and you want proof. That is one command:

wp search-replace 'NMLS 0000000' 'NMLS 1111111' --dry-run

The --dry-run flag shows what would change without changing it. Run it, read the count, run it again without the flag. Other jobs that belong here: exporting the database before anything risky (wp db export), flipping forty sold listings to draft in one pass, purging caches after a deploy, and anything on a schedule, since a cron job can run a command but cannot have a conversation.

The cost of WP-CLI is that it needs SSH access to your host, and mistakes execute exactly too. The dry-run habit is not optional.

The connector: when you would have to explain

The WP MCP Connector turns the site into something an AI agent can work on directly: Claude, ChatGPT, or Grok connects with its own credentials, sees only the tools your chosen profile exposes, and can never do more than the WordPress account behind it is allowed to do. No SSH, and nothing to install on your computer.

This is the tool for work you would describe rather than dictate. On the real estate side that looks like: draft a market-update post from three numbers I paste in, matching the voice of the last one. Check every loan-program page for a meta description and write the ones that are missing. Which listings still say “coming soon”? Update the rates page and make sure the APR disclaimer still matches the new figure. Each of those needs reading, judgment, and writing, which is exactly what a command line does not have.

On a mortgage site the judgment part deserves one caution. Disclosure language is mandated, so I treat agent edits to it the way I treat a junior assistant’s: the agent drafts, I read before it publishes. Mechanical replacement of a known string is CLI work. New compliance language is review work. The agent sits usefully between the two, but it does not remove the review.

Where they overlap

The connector includes a small bridge for people who already think in wp commands: an emulated CLI tool that accepts a fixed list of WP-CLI style commands and maps each one to a WordPress API call. Nothing touches a shell, anything outside the list is refused, and it is only exposed on the admin profile. It exists so “wp plugin list” works in a chat the way your fingers expect, not to replace the real thing.

It also works the other way around. An agent that lives on your machine, like Claude Code, can hold the SSH connection and run real WP-CLI for you. This site is managed both ways depending on where I am sitting: real commands over SSH from the desk, the connector from anywhere else.

The rule

If you can write the exact command, script it. If you would have to explain what you want, connect an agent. Export the database before either one touches anything that matters. And for the setup itself, the connector guide is here: connect Grok, ChatGPT or Claude to your WordPress site.

The connector is open source: wp-mcp-connector-plugin on GitHub.