ManageWP Disconnects After Migrating From Staging Site

Do you use ManageWP to manage both the staging and live site, but each time the staging site is pushed to live site it disconnects the live site from ManageWP?

You can prevent this by telling WP Staging Pro to keep the manageWP connection data while pushing the staging site to live.

To do that, download and install the WP Staging hooks plugin from here:

You can find more about that plugin here:

You can either do the changes manually or you can use the code below that we’ve already completed. Just copy the code and add it to a file on your site into the folder:

Manual modifications

If you already use the WP Staging Hooks plugin please follow the instructions below to modify it:

In the WP Staging hooks source code, you will find a function named wpstg_push_options_excl() and an action named wpstg_preserved_options

To activate it uncomment the line
//add_action( 'wpstg_preserved_options', array($this, 'wpstg_push_options_excl'), 10 );


add_action( 'wpstg_preserved_options', array($this, 'wpstg_push_options_excl'), 10 );

Then change the function to:

function wpstg_push_options_excl($options){
$moreOptions = array(
return array_merge($options, $moreOptions ); 

You also need to exclude the ManageWP worker plugin from being copied from staging to live. You can either exclude it manually before your push the staging site or you can change the function wpstg_exclude_folders_custom()

function wpstg_exclude_folders_custom($args){ 
$folders = array('worker');      
return array_merge($args, $folders); 
add_filter('wpstg_push_excl_folders_custom', 'wpstg_exclude_folders_custom');

Make also sure that you uncomment the line

//add_action( 'wpstg_push_excl_folders_custom', array($this, 'wpstg_push_directories_excl'), 10 );

Updated on March 23, 2023