Skip to main content
If you need to completely remove all MainWP Child plugin data from a child site’s database, you can do so using SQL commands. This is useful when decommissioning a site or troubleshooting connection issues.

What You’ll Learn

  • How to remove MainWP data from the database
  • When to use this procedure

Prerequisites

  • Access to phpMyAdmin or similar database tool
  • Database backup completed
Back up your database before proceeding. These commands permanently delete data and cannot be undone.

When to Use This

Use this procedure when:
  • Completely removing MainWP from a child site
  • Troubleshooting persistent connection issues
  • Resetting a site to reconnect with a new Dashboard
  • Decommissioning a child site

Delete MainWP Data

1

Back up your database

Create a full database backup before making any changes.
2

Access phpMyAdmin

Log in to your child site’s cPanel, Plesk, or hosting control panel and open phpMyAdmin (or a similar database management tool).
3

Select the database

Navigate to and select the database for your child site.
4

Open SQL tab

Click on the SQL tab to enter custom queries.
5

Run the delete command

Paste and execute this SQL command:
DELETE FROM `wp_options` WHERE option_name LIKE '%mainwp_%'
If your WordPress installation uses a custom table prefix (not wp_), replace wp_options with your actual prefix (e.g., custom_options).
6

Execute the query

Click Go to run the query. The command removes all MainWP-related entries from the options table.

What Gets Deleted

This command removes:
DataDescription
Connection keysEncryption keys linking to Dashboard
Plugin settingsMainWP Child configuration
Cached dataStored sync information
Unique Security IDSite identification data

After Deletion

After removing the data:
  1. Deactivate and delete the MainWP Child plugin if you’re removing MainWP completely
  2. Reconnect the site if you want to add it to a Dashboard again (you’ll need to reinstall and configure the Child plugin)

Self-Check Checklist

  • Database backup created
  • Correct database selected in phpMyAdmin
  • Table prefix verified (wp_ or custom)
  • SQL command executed successfully
  • MainWP Child plugin deactivated/deleted (if removing)