--- title: "Connect Gemini CLI to WordPress" url: "https://plugpress.co/docs/connect-gemini-cli-to-wordpress.md" canonical: "https://plugpress.co/docs/connect-gemini-cli-to-wordpress/" published: "2026-07-28" modified: "2026-08-01" author: "Fahim" description: "Connect Google's Gemini CLI to your WordPress site with Saddle using one terminal command, then read and write posts and pages from your terminal." tags: - "Saddle" --- # Connect Gemini CLI to WordPress **Gemini CLI is Google’s AI agent for the terminal** — and with Saddle it can manage your WordPress content: reading, writing, and organising posts, pages, and media. Setup is one command that Saddle writes for you. ## What do I need before connecting? - A WordPress site on **HTTPS** with the [Saddle plugin](/docs/what-is-saddle/) installed and activated. - [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed on your computer. ## How do I connect Gemini CLI to my WordPress site? ### Step 1: Open the connect wizard In your WordPress dashboard, go to **Saddle → Connections**, click **Connect an app**, and choose **Gemini CLI**. ![Saddle connect wizard in WordPress showing the Choose app step with Claude, ChatGPT, Claude Code, Cursor, Gemini CLI, VS Code and Any MCP app](https://plugpress.co/wp-content/uploads/2026/07/saddle-connect-wizard-choose-app.png) ### Step 2: Copy the setup command ![Saddle setup step for Gemini CLI showing the one-line gemini mcp add terminal command](https://plugpress.co/wp-content/uploads/2026/07/saddle-connect-gemini-cli-setup.png) It looks like this — yours has your real address and key: ``` gemini mcp add --scope user --transport http saddle-your-site https://your-site.com/wp-json/saddle/v1/mcp --header "Authorization: Basic PASTE-YOUR-KEY-HERE" ``` **Copy it before closing the wizard.** The key appears this once, and backing out early revokes it. Lost it? Use **Rotate key** on the app’s row. ### Step 3: Paste it into your terminal Open a terminal, paste, press Enter. It uses `--scope user`, so the connection is saved to your user profile and works from any folder. ## How do I know it worked? Run `gemini` in any folder and ask: ``` What can you see on my WordPress site? ``` It should report your site name, WordPress version, and content counts, and the app appears in **Saddle → Connections**. ## What can Gemini do on my site? Only what you allow on the [Permissions](/docs/permissions-access-levels/) screen — sites start read-only, and deletions always require a [preview-and-confirm approval](/docs/safe-deletions/). ## It didn’t connect — what now? A stripped `Authorization` header or a mistyped key covers most failed connections, and the first has a one-click fix. Open **Saddle → Connections → Connection details & health** and click **Test the endpoint**, then see [Troubleshooting and FAQ](/docs/troubleshooting/). ## FAQ ### Can I connect more than one WordPress site? Yes. Each site’s wizard generates its own server name, so they register as separate servers. ### How do I remove the connection? Remove the server from Gemini CLI, and click **Disconnect** on the app’s row in **Saddle → Connections** so the key stops working. ## Related guides - [Getting started: connect your first AI app](/docs/getting-started/) - [Permissions and access levels](/docs/permissions-access-levels/) - [Editing content and design with AI](/docs/editing-content-and-design/) - [Troubleshooting and FAQ](/docs/troubleshooting/)