MainWP is a WordPress management suite that allows you to control multiple WordPress sites from a single dashboard. With the MainWP API, you can manage updates, backups, security, and more for your child sites programmatically. When integrated with Pipedream, this API enables you to automate various WordPress management tasks, set up custom alerts, or tie in other services to enhance your site management capabilities.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mainwp: {
type: "app",
app: "mainwp",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.mainwp.$auth.url}/wp-json/mainwp/v1/updates/available-updates`,
params: {
consumer_key: `${this.mainwp.$auth.customer_key}`,
consumer_secret: `${this.mainwp.$auth.customer_secret}`,
},
})
},
})
Automate WordPress Updates Across Multiple Sites: Use Pipedream to regularly check for WordPress core, plugin, and theme updates across all your MainWP managed sites. Automate the update process, and receive notifications via Slack or email if manual intervention is needed.
Backup Sites Before Making Changes: Configure a Pipedream workflow that triggers a backup on your child sites with MainWP before applying critical updates or site changes. You could then upload these backups to a cloud storage service like Google Drive or Dropbox for safekeeping.
Monitor and Report Uptime Status: Set up Pipedream to periodically check the uptime status of your MainWP managed sites and report any downtime immediately through services like PagerDuty or to create a log entry in a Google Sheets spreadsheet.
MainWP uses API keys for authentication. When you connect your MainWP account, Pipedream securely stores the keys so you can easily authenticate to MainWP APIs in both code and no-code steps.
To retrieve your API keys,
The url field below is your WordPress site's domain where MainWP is installed.
For example, if you have a Wordpress.org site hosted at https://example.com
, then enter example.com
in the url field below.