MainWP Control
MainWP Control is a free, open-source command-line tool that runs your MainWP Dashboard’s actions for every site you manage, from your terminal, shell scripts, cron jobs and CI pipelines. It runs on your own computer or server, talks to your Dashboard over HTTPS, and shows you a preview of updates and deletions before they go ahead.
It’s built for agencies, freelancers and developers who look after many client sites and want their routine checks and update rounds to run the same way every time, on a schedule.
Over 20,000 MainWP Dashboards manage over 700,000 child sites, and MainWP has over 2,200 five-star reviews on WordPress.org.
What routine work can MainWP Control script for you?
Much of site care is the same few checks, repeated every morning or every month. MainWP Control turns each one into a command you write once and schedule.
| TodayLog in each morning to see that every site is connected | With MainWP ControlA cron job checks every site and posts to Slack when one needs attention. |
| TodayClick through the monthly update round | With MainWP ControlA scheduled script lists the pending updates, runs them and waits for the batch to finish. |
| TodayOpen each site to check that a plugin rollout landed | With MainWP ControlA GitHub Actions job checks the plugins on every site and lists the sites that still need it. |
| TodayCopy site numbers into your monitoring tool | With MainWP ControlSite counts, pending updates and connection status go straight to StatsD, Datadog, Prometheus or a log file. |
| TodayLog in to each Dashboard you run, one after another | With MainWP ControlEach Dashboard gets its own profile, and one flag picks the Dashboard a command runs on. |
What does MainWP Control include?
MainWP Control gives you one command, mainwpcontrol, for everything your MainWP Dashboard offers through the WordPress Abilities API.
| Feature | What it means for you |
|---|---|
| Over 100 abilities | Sites, updates, clients, tags, backups and Knowledge, read from your Dashboard each time, so new abilities from a Dashboard update are ready to use right away. |
| Add-on abilities | MainWP add-ons such as Cache Control add their own abilities while they’re active, and MainWP Control lists them with the rest. |
| Preview and confirm | Updates, deletions and other destructive actions show a --dry-run preview first and run with --confirm. |
| Made for scripts | --json prints one result object, each kind of result has its own exit code, and input can come from a file or stdin. |
| Batch jobs | Operations that affect many sites return a job ID. --wait or jobs watch follows the job to the end, and you can pick it up again later. |
| Profiles | One profile for each Dashboard, such as staging and production, with --profile to choose one per command. |
| Credentials in your keychain | Your Application Password stays in the macOS Keychain, Windows Credential Manager or libsecret on Linux. CI jobs read it from environment variables tied to their Dashboard URL. |
| Doctor and completions | mainwpcontrol doctor checks your configuration, credentials and connection, and bash and zsh completions fill in commands and profile names. |
| Plain-English chat | An optional chat mode with your own Anthropic, OpenAI, Google Gemini or OpenRouter key, or a local model. |
| Open source | Free under the GPL, with the code on GitHub and the package on npm as @mainwp/control. |
How do you run MainWP Dashboard actions from the terminal with MainWP Control?
Every MainWP Control action is an ability in your MainWP Dashboard. abilities list shows them grouped by category, marks each one as read, write or destructive, and prints the exact command to run it. abilities info shows an ability’s input and safety labels, and abilities run executes it.
For example, mainwpcontrol abilities run list-updates-v1 --json returns the pending updates across your sites as JSON, ready for jq, a report or another tool.
How does MainWP Control preview an update or a deletion before it runs?
MainWP Control runs updates, deletions and other destructive actions in two steps: a --dry-run preview of what will change, then the same command with --confirm.
- Preview first: a confirmed run takes a fresh preview of the sites and items it covers, shows it before it asks you, and goes ahead once that preview has succeeded.
- Careful by default: MainWP Control treats an ability as destructive unless it’s labelled safe, and the same goes for any ability named for a delete, a disconnect or an update.
- Approval stays with you: preview and confirm settings inside input files are removed, so approval always comes from the command you type or schedule, even when a file or an AI model writes the input.
- An audit log: each confirmed run is written to a local audit log before it’s sent, with secrets masked.
Can MainWP Control run in cron jobs and CI pipelines?
Yes. --json keeps the output clean for the next step, exit codes tell your script what happened, and CI jobs sign in with MAINWP_APP_PASSWORD and MAINWP_DASHBOARD_URL secrets.
The MainWP Control repository has step-by-step workflow guides for a daily health check with Slack alerts, monthly batch updates from cron or GitHub Actions, a plugin rollout check, and site metrics for StatsD and Datadog.
Can you manage your MainWP sites in plain English with MainWP Control?
Yes. Run mainwpcontrol chat with your own key for Anthropic, OpenAI, Google Gemini or OpenRouter, or point it at a local model, and ask about your sites in plain English. The model calls the same abilities, and destructive actions go through the same preview and your approval in the terminal. With a local model, everything stays on your machine.
To work from Claude, Cursor or Codex instead, MainWP MCP connects your AI assistant to the same abilities. MainWP AI walks through everything your Dashboard can do with AI, including Knowledge, the saved instructions for your agency, each client and each site.
Is MainWP Control right for your sites?
MainWP Control suits you if you manage your sites from your MainWP Dashboard and like to automate work in a terminal, a script or a CI pipeline.
| What you need | Details |
|---|---|
| MainWP Dashboard | MainWP Dashboard 6.0 or later on WordPress 6.9 or later, over HTTPS. Version 6.3 adds the guided setup page and previews for updates. |
| Child sites | Your child sites keep running MainWP Child, with nothing new to install. |
| Your computer or server | Node.js 20.18.1 or later on macOS, Linux or Windows, or a CI runner such as GitHub Actions. |
| Access | A WordPress Application Password for an administrator account on your Dashboard. A dedicated account keeps the audit trail separate from your everyday login. |
| Plan | MainWP Control is free and open source, and the abilities it uses are part of the free MainWP Core. MainWP Pro adds abilities from Pro add-ons such as Cache Control. |
How do you set up MainWP Control?
- Update your MainWP Dashboard to the latest version, on WordPress 6.9 or later.
- Open AI > MainWP Control in your Dashboard.
- In Credentials, create an Application Password and save it.
- In Install, copy the commands and run them on the computer or server that will use MainWP Control:
npm install -g @mainwp/control, thenmainwpcontrol loginwith your Dashboard URL, username and Application Password. - In Test, run
mainwpcontrol abilities listandmainwpcontrol abilities run list-sites-v1 --jsonand check the sites it returns. - In Finish, review profiles, JSON output, previews and credentials.
The MainWP Control docs and the README on GitHub cover every command and option.
MainWP Control FAQ
Is MainWP Control free?
Yes. MainWP Control is free and open source under the GPL, and the abilities it uses are part of the free MainWP Core. MainWP Pro adds abilities from Pro add-ons such as Cache Control. See MainWP Free vs Pro.
Do you need to install anything on your client sites?
Your client sites keep the MainWP Child plugin they already run. MainWP Control runs on your computer or server and talks to your MainWP Dashboard, and your Dashboard works with your child sites as it always does.
Should you use MainWP Control or MainWP MCP?
Use MainWP Control for scripts, cron jobs and CI pipelines, where you want exact commands and JSON output. Use MainWP MCP when you want Claude, Cursor, VS Code Copilot or OpenAI Codex to work on your sites. Both use the same abilities and follow the same safety model for updates and deletions.
How is MainWP Control different from WP-CLI?
MainWP Control runs from any computer or CI runner that reaches your MainWP Dashboard over HTTPS. WP-CLI’s wp mainwp commands run on the server that hosts your Dashboard. MainWP Control also brings the Abilities API’s previews and confirmation to updates, deletions and other destructive actions.
Does MainWP Control work on Windows?
Yes. MainWP Control is tested on Windows, macOS and Linux. On Windows, Git Bash runs every example as written, and WSL or GitHub Actions handle scheduled jobs.
Can you use MainWP Control with more than one MainWP Dashboard?
Yes. mainwpcontrol login creates a profile for each Dashboard. Switch with mainwpcontrol profile use, or add --profile to a single command.
Where does MainWP Control keep your Application Password?
In your system keychain: the macOS Keychain, Windows Credential Manager or libsecret on Linux. CI jobs pass it as an environment variable paired with the Dashboard URL it belongs to. Revoke it from your MainWP Dashboard at any time under API Access > Application Passwords.
How do you check that MainWP Control is connected?
Run mainwpcontrol doctor. It checks your configuration, credentials and connection to your MainWP Dashboard and names the step to look at. The troubleshooting guide covers each one.








