MainWP Community

Preserve MainWP Child Site option value connection if using WP Migrate DB Pro

Preserve MainWP child site option values used for connections if using WP Migrate DB Pro.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'wpmdb_preserved_options', function( $options ) {
    $opts = [
        'mainwp_child_uniqueId',
        'mainwp_child_pubkey',
        'mainwp_child_server',
        'mainwp_child_nonce'
    ];
    
    return array_merge($options, $opts);
});
1 Like


1 Like