Wordfence Central uses production URL on staging after migration
-
When using WP Migrate, to migrate a production site to a staging website. The Wordfence Central keeps reporting “Wordfence Central Alert: 1 scan findings on site https://mydomain.com “.
Even though the the website is actually located at https://staging.mydomain.com.
I think there COULD be several solutions to this, sorted from best to worst:
1. Can I programmatically disable Wordfence Central? I don’t need it on staging. But I do like to keep the Wordfence plugin for added security.
Is there a hook or a filter I can call?add_action( 'init', function(){
if( $_SERVER['SERVER_NAME'] == 'staging.mydomain.com' ){// code to deactivate Wordfence Central here
}
}, 99 );
2. How do I force the Wordfence Central URL to change?
3. Last resort would be to add Wordfence to above code using:deactivate_plugins('wordfence/wordfence.php');
- The topic ‘Wordfence Central uses production URL on staging after migration’ is closed to new replies.