Opens in a new tab

Save $50 Every Year with MainWP

Get $50 off the MainWP Yearly Plan this Black Friday. Your discount renews every year! Claim Your $50 Discount

MainWP for Developers

Script the work you repeat, shape your MainWP Dashboard to fit, and build your own add-ons on it.

MainWP for Developers is everything in your MainWP Dashboard that you can script, customize and build on. The MainWP REST API, WP-CLI, the Abilities API and MainWP Control automate your maintenance. Themes and saved layouts shape your Dashboard, and over 1,000 actions and filters carry your own code and add-ons.

It’s built for agency developers and technical freelancers who script their site maintenance, for teams that run cron jobs and CI/CD pipelines, and for plugin makers who want a MainWP add-on of their own. The free MainWP Dashboard and MainWP Child plugins are open source under the GPL, and so are MainWP Control and MainWP MCP.

“It’s source code is open and you can easily understand, adapt, enhance or modify what it does. With MainWP you are totally in control.”

Konstantin S., CEO at enym – medienkompetenz

Managing many client sites means repeating the same clicks every week: the morning update check, the sync before a release, the export for the billing system. MainWP’s developer tools turn that work into calls and commands you write once and run on every site.

Repeated work today With MainWP’s developer tools
Click through Sites and Updates each morning to see what’s pending Run wp mainwp updates --available-updates or call the REST API, and get the pending updates across all your sites in one answer.
Copy site, client and cost data into billing, ticketing or a client portal by hand Your own tools read and update sites, clients and costs through the MainWP REST API v2, directly or through Zapier and Make.
Keep a script per site for the maintenance you run from cron or a CI pipeline MainWP Control runs any of over 100 MainWP abilities from your terminal, shell scripts, cron jobs and CI/CD pipelines, with JSON output.
Look up a client’s sites before you answer their question Ask your AI assistant about every site in your MainWP Dashboard with MainWP AI, built on the same abilities your scripts use.
Open your MainWP Dashboard to check whether anything needs attention The MainWP Browser Extension shows pending updates and changes made outside MainWP in your browser toolbar.
Work in a Dashboard that looks the same for every agency Switch between Light and Dark, add your own CSS theme, and save the widget layouts your team uses.
Edit plugin files that the next Dashboard update replaces Change how MainWP behaves with actions and filters from your own code, or with snippets in MainWP Custom Dashboard that stay in place through Dashboard updates.
The MainWP Dashboard API Keys page listing four enabled REST API v2 keys, Slack update alerts, Client portal, Nightly maintenance and Zapier billing sync, with their permissions and when each key was last used

What does MainWP give developers?

Feature What it means for you
MainWP REST API v2 Read and change sites, clients, tags, updates, costs, monitors, posts, pages, users and settings from your own code, starting from an OpenAPI 3.1 file and a Postman collection.
API keys Bearer tokens with Read or Write & Delete permission. Each key works as the user who created it and shows when it was last used.
WP-CLI wp mainwp commands for sites, updates, plugins, themes and Built-In Backups restores, run on your Dashboard’s server.
Abilities API Over 100 MainWP abilities registered with the WordPress Abilities API, shared by your scripts and your AI assistant through MainWP AI.
MainWP Control A free, open-source command-line tool that runs those abilities from your terminal, scripts, cron jobs and CI/CD pipelines.
MainWP Browser Extension Pending updates, changes made outside MainWP and Time Tracker timers in your browser toolbar.
Themes Light and Dark themes plus your own CSS theme, chosen by each user.
Widget layouts Drag, resize, show and hide widgets, then save the layout under a name and load it again.
MainWP Custom Dashboard Your own PHP, CSS and JavaScript snippets for your Dashboard in one editor, free with MainWP Essentials.
Actions, filters and add-ons Over 1,000 actions and filters in your Dashboard, and a filter that registers your own add-on.

How do you connect your own tools to the MainWP REST API?

The MainWP REST API v2 lets any tool that sends an HTTP request work with your MainWP Dashboard: a billing system that reads clients and costs, a client portal that lists each client’s sites, or a nightly script that collects pending updates.

Each request carries an API key as a Bearer token. Create keys under Access > API Keys in your Dashboard and give each one Read or Write & Delete permission. A key works as the WordPress user who created it. Your Dashboard shows the key once, stores it hashed, and records each key’s Last access.

Add-ons such as SSL Monitor, Domain Monitor, Lighthouse, Pro Reports and Time Tracker add routes of their own. The MainWP docs publish an OpenAPI 3.1 file and a Postman collection, so you can generate a client or try a call before you write code.

The MainWP Browser Extension uses a REST API key too, and shows your pending updates and changes made outside MainWP in Chrome and other Chromium browsers.

A terminal running curl with a Bearer API key against the MainWP REST API v2 sites endpoint, with jq printing each site's name, number of plugin updates and tags

Can you run MainWP from the command line with WP-CLI?

Yes. MainWP adds wp mainwp commands to WP-CLI on your MainWP Dashboard’s server, and each command works on your child sites through your Dashboard.

  • Sites: wp mainwp sites lists your sites, and syncs or checks all of them in one run.
  • One site: wp mainwp site reads a site’s plugins, themes, updates and health score, runs its updates, and adds, syncs or removes the site.
  • Backups: wp mainwp backup restore restores a site from a Built-In Backups snapshot.

Add-ons such as SSL Monitor, Domain Monitor and Lighthouse add wp commands of their own.

A terminal running wp mainwp commands that count 10 connected child sites, show site details for Sunny Side Cycles and count its 4 available plugin updates

How do MainWP abilities connect your scripts and AI assistants?

Your MainWP Dashboard registers over 100 abilities with the WordPress Abilities API. They cover sites, updates, clients, tags, Knowledge, Built-In Backups and batch operations, and your scripts call them at /wp-json/wp-abilities/v1 with a WordPress Application Password from Access > Application Passwords.

MainWP Control is a free, open-source command-line tool for those abilities. mainwpcontrol abilities list shows every ability, --json gives your script one clean result to pipe into jq, and destructive abilities run after a dry run and your --confirm. Open AI > MainWP Control in your Dashboard for guided setup in four steps: Credentials, Install, Test and Finish.

The same abilities power MainWP AI. Connect Claude, Cursor, VS Code Copilot or OpenAI Codex through MainWP MCP, ask your assistant about every site in your Dashboard, and preview each update before it runs.

The MainWP Control setup page in the MainWP Dashboard at the Install step, with the npm install and mainwpcontrol login commands ready to copy

How do you brand and arrange your MainWP Dashboard?

Your MainWP Dashboard comes with Light and Dark themes. Switch between them from the header, or pick one under Select MainWP Dashboard theme in MainWP Tools. Each user keeps their own choice, so everyone on your team works in the theme they prefer.

Add your own CSS theme in your agency’s colors, and it appears in the theme list next to Light and Dark for everyone on your team to pick.

The MainWP Dashboard theme setting in MainWP Tools with the dropdown open on the Light and Dark themes and a custom theme named Lumen

Widgets are yours to arrange too. Drag and resize them, choose which ones to show in Page Settings, then open Layout > Save Layout to keep the arrangement under a name, and Load Layout to bring it back. Layouts work on Operations, each site’s and each client’s Overview, Cost Summary and Insights.

The MainWP Operations page with the Layout menu open on Save Layout and Load Layout, above the Recent Pages and Connection Status widgets

What can you change with MainWP Custom Dashboard?

MainWP Custom Dashboard, free with MainWP Essentials, keeps your own PHP, CSS and JavaScript snippets for your MainWP Dashboard in one editor. A CSS snippet can restyle the Sites list in your agency’s colors, and a PHP snippet can hook into MainWP’s actions and filters.

Your snippets stay in place when you update the MainWP Dashboard plugin. Each PHP snippet is checked before it’s saved, and version 5.2 adds four abilities to read, check and replace snippets from your scripts or AI assistant.

The MainWP Sites page restyled with MainWP Custom Dashboard, with a navy top bar and sidebar, an orange Sync button, and orange site and client links in the sites table

How do you build on MainWP with hooks and your own add-ons?

Your MainWP Dashboard runs over 1,000 actions and filters. Hook into them from your own plugin to change your Dashboard’s logo, add a menu entry, a tab on Add Site or a column in Manage Sites, or set the FROM address of MainWP emails, and your code stays apart from MainWP’s own files.

A MainWP add-on is a WordPress plugin that runs inside your Dashboard. It registers through the mainwp_getextensions filter and gets its own pages, settings and widgets. Build one for your agency’s own workflow, or for your plugin or tool so its users can run it across all their sites.

“The MainWP codebase offered a lot of filter and action hooks. As a WordPress developer I could write my own extensions and code enhancements.”

Michael Weichselgartner, Founder at mensmaximus

mainwp.dev is where you learn how:

  • Add-on Development Guide: nine lessons, from setting up a development environment to packaging and distributing your add-on.
  • Hook reference: MainWP actions and filters grouped by sites, updates, plugins, themes, users, widgets and more.
  • Starter code: the MainWP Development Extension on GitHub, with admin pages, database tables, AJAX and a widget ready to rename.
  • Partner Program: co-marketing for plugin and tool makers who launch a MainWP add-on.

If you make a plugin or tool and want to build and sell a MainWP add-on, Develop MainWP explains how add-ons reach MainWP users. You sell from your own site and keep your sales.

The MainWP hook reference on mainwp.dev listing action hooks with short descriptions, next to the Actions menu of the Actions and Filters reference

Do MainWP’s developer tools fit your setup?

What you need Details
Plan The REST API, WP-CLI, the Abilities API, themes, widget layouts and every action and filter are part of the free MainWP Core. MainWP Control is a free tool, and MainWP Custom Dashboard is free with MainWP Essentials. With MainWP Team Control, a MainWP Pro add-on, each team member’s rights apply to their API keys and Application Passwords.
MainWP Dashboard WordPress 6.2 or later and PHP 8.3 or later.
REST API v2 An API key from Access > Add API Keys, and pretty permalinks on your Dashboard site.
WP-CLI WP-CLI and shell access on your Dashboard’s server.
Abilities API and MainWP Control WordPress 6.9 or later on your Dashboard site and an Application Password. MainWP Control runs on any computer or server with Node.js 20.18.1 or later.
MainWP Browser Extension Chrome 116 or later, or another Chromium browser such as Edge or Brave, and a REST API key.
Your own theme File access to your Dashboard site, by FTP or your host’s file manager.
Your own add-on PHP and WordPress plugin experience. The MainWP Development Extension gives you the starting structure.
Child sites The free MainWP Child plugin. Your scripts talk to your MainWP Dashboard, and your Dashboard works with each site.

How do you get started with MainWP’s developer tools?

  1. Install the free MainWP Dashboard plugin and connect your sites with MainWP Child.
  2. Open Access > Add API Keys. Enter an API key name, choose Read or Write & Delete, copy the API key (Bearer token), and click Save Key. Store the key securely, because your Dashboard shows it once.
  3. Call https://your-dashboard.com/wp-json/mainwp/v2/sites with the header Authorization: Bearer followed by your key.
  4. On your Dashboard’s server, run wp mainwp sites --all-sites to list your sites from WP-CLI.
  5. For abilities, open AI > MainWP Control and follow the Credentials, Install and Test steps.
  6. For your own theme, add your CSS file to wp-content/uploads/mainwp/themes/ and pick it under Select MainWP Dashboard theme in MainWP Tools.

The REST API guide, WP-CLI commands, Abilities API guide, MainWP Control docs and Dashboard themes guide cover each step in detail.

The Add API Keys form in the MainWP Dashboard with the key name Staging deploy bot, the Read and Write & Delete permissions selected and a masked Bearer token

MainWP for Developers FAQ

Are MainWP’s developer tools free?

Yes. The REST API, WP-CLI, the Abilities API, themes, widget layouts and over 1,000 actions and filters are part of the free MainWP Core. MainWP Control and MainWP MCP are free tools, and MainWP Custom Dashboard is free with MainWP Essentials. See MainWP Free vs Pro and MainWP Free Features.

Is MainWP open source?

The free MainWP Dashboard and MainWP Child plugins are open source under the GPL, and so are MainWP Control and MainWP MCP. You can read, adapt and extend their code.

Which credentials does each MainWP tool use?

The MainWP REST API v2 and the MainWP Browser Extension use MainWP API keys. The Abilities API, MainWP Control and MainWP MCP use a WordPress Application Password on WordPress 6.9 or later. WP-CLI runs on your Dashboard’s server with your own server access.

What can a MainWP API key do?

Each key has Read or Write & Delete permission and works as the WordPress user who created it, so with MainWP Team Control that user’s rights apply to the key too. Your Dashboard shows each key once, stores it hashed and records when it was last used.

Do child sites need anything extra for the REST API or WP-CLI?

The free MainWP Child plugin is all they need. Your scripts, WP-CLI and MainWP Control talk to your MainWP Dashboard, and your Dashboard works with each child site.

Can you sell a MainWP add-on you build?

Yes. Build an add-on for your plugin or tool, sell it from your own site and keep your sales. Develop MainWP explains the approach, and the Partner Program adds co-marketing such as emails, social posts and newsletter mentions for your launch.

Can your AI assistant work with your MainWP Dashboard?

Yes. MainWP MCP connects Claude, Cursor, VS Code Copilot or OpenAI Codex to the same abilities your scripts use, so you can ask your assistant about every site in your MainWP Dashboard and preview each update before it runs. MainWP AI shows what your assistant can do and how to connect it.

How do you turn off a MainWP API key?

Click Edit on the key in Access > API Keys, turn off Enable API key and click Save API Key. The key’s Status changes to Disabled, and you can turn it back on later, or click Delete to remove it.

Choose a Smarter Way to Manage Multiple WordPress Sites!