Title: Preserve MainWP Connection
Author: Jay Holtslander
Published: <strong>May 10, 2020</strong>
Last modified: October 2, 2026

---

Search plugins

![](https://ps.w.org/preserve-mainwp/assets/banner-772x250.jpg?rev=3723800)

![](https://ps.w.org/preserve-mainwp/assets/icon-256x256.jpg?rev=3723800)

# Preserve MainWP Connection

 By [Jay Holtslander](https://profiles.wordpress.org/jasonh1234/)

[Download](https://downloads.wordpress.org/plugin/preserve-mainwp.2.0.1.zip)

 * [Details](https://kea.wordpress.org/plugins/preserve-mainwp/#description)
 * [Reviews](https://kea.wordpress.org/plugins/preserve-mainwp/#reviews)
 *  [Installation](https://kea.wordpress.org/plugins/preserve-mainwp/#installation)
 * [Development](https://kea.wordpress.org/plugins/preserve-mainwp/#developers)

 [Support](https://wordpress.org/support/plugin/preserve-mainwp/)

## Description

Preserve [MainWP](https://mainwp.com/)‘s connection details from being overwritten
by [WP Migrate](https://deliciousbrains.com/wp-migrate-db-pro/) and severing the
connection when pushing or pulling.

If you use MainWP to manage your WordPress sites and WP Migrate to clone sites between
environments, you’ll find that your site’s connections to MainWP are constantly 
being disconnected by the push/pull operations of WP Migrate. This plugin prevents
the database fields used for MainWP’s connection details from being overwritten 
by WP Migrate during both Push and Pull operations, saving you from having to reconnect
the site after every migration.

## Installation

 1. Upload `preserve-mainwp.php` to the `/wp-content/plugins/preserve-mainwp/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

### Does this plugin require any configuration?

No. It works out-of-the-box (“set and forget”) as soon as it is activated.

### Which migration tools are supported?

It preserves settings for WP Migrate (formerly WP Migrate DB Pro / Delicious Brains).

## Reviews

![](https://secure.gravatar.com/avatar/ec4fedd5566ded7d79d0a05de2f2bd88561abf4e8205af40c113e30200ff7be6?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-7264/)󠁿

 [skunkworks](https://profiles.wordpress.org/skunkworks/) November 17, 2020

Use it on all sites now.

 [ Read all 1 review ](https://wordpress.org/support/plugin/preserve-mainwp/reviews/)

## Contributors & Developers

“Preserve MainWP Connection” is open source software. The following people have 
contributed to this plugin.

Contributors

 *   [ Jay Holtslander ](https://profiles.wordpress.org/jasonh1234/)

“Preserve MainWP Connection” has been translated into 3 locales. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/preserve-mainwp/contributors)
for their contributions.

[Translate “Preserve MainWP Connection” into your language.](https://translate.wordpress.org/projects/wp-plugins/preserve-mainwp)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/preserve-mainwp/), 
check out the [SVN repository](https://plugins.svn.wordpress.org/preserve-mainwp/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/preserve-mainwp/)
by [RSS](https://plugins.trac.wordpress.org/log/preserve-mainwp/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0.1

 * Updated Tested up to tag to WordPress 7.1.
 * Added pre-bundled translation files (.po / .mo) for 10 languages.

#### 2.0.0

 * Complete refactor to OOP architecture (`Preserve_MainWP_Connection`).
 * Expanded preserved keys to all 10 MainWP Child authentication keys (`siteid`,`
   auth`, `connected_admin`, `nossl_key`, `openssl_sign_algo`, `security`).
 * Added pre-migration transient backups (`_preserve_mainwp_backup`) on initiation
   hooks.
 * Added post-migration DB restoration on finalization hooks to prevent connection
   loss during Push migrations.

#### 1.1.0

 * Modernized code structure and PHP 7.4+ compatibility.
 * Added support for `mainwp_child_subkey` option.
 * Updated WordPress and PHP version requirements.
 * Added GitHub Actions workflow for WordPress.org SVN automated deployment.

#### 1.0

 * Initial release

## Meta

 *  Version **2.0.1**
 *  Last updated **2 weeks ago**
 *  Active installations **100+**
 *  WordPress version ** 5.6 or higher **
 *  Tested up to **7.1.3**
 *  PHP version ** 7.4 or higher **
 *  Languages
 * [Dutch](https://nl.wordpress.org/plugins/preserve-mainwp/), [English (US)](https://wordpress.org/plugins/preserve-mainwp/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/preserve-mainwp/), and [Spanish (Spain)](https://es.wordpress.org/plugins/preserve-mainwp/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/preserve-mainwp)
 * Tags
 * [database](https://kea.wordpress.org/plugins/tags/database/)[MainWP](https://kea.wordpress.org/plugins/tags/mainwp/)
 *  [Advanced View](https://kea.wordpress.org/plugins/preserve-mainwp/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/preserve-mainwp/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/preserve-mainwp/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/preserve-mainwp/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/preserve-mainwp/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/preserve-mainwp/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/preserve-mainwp/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/preserve-mainwp/reviews/)

## Contributors

 *   [ Jay Holtslander ](https://profiles.wordpress.org/jasonh1234/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/preserve-mainwp/)