Documentation

WP_HTTP_BLOCK_EXTERNAL

Setting the WP_HTTP_BLOCK_EXTERNAL constant to true in your wp-config.php file will stop all outgoing network requests from your site. This is typically set on sites that are sitting behind a closed environment.

However, having this set is problematic when performing migrations using WP Migrate DB Pro. If you are pushing or pulling your database to another site, unless that site is also accessible from ‘localhost’, then the plugin won’t be able to contact the site and you will see this error:

The connection failed, an unexpected error occurred, please contact support. (#121 - scope: push)

If your site requires the constant to be set then there is a way to get round the problem, so the plugin can operate.

WordPress uses another constant; WP_ACCESSIBLE_HOSTS in tandem with WP_HTTP_BLOCK_EXTERNAL to allow specific hosts to get past the block. First you will need to add api.deliciousbrains.com to enable license activation and updates to the plugin and its addons. Then add the host URL of the remote site involved in the migration:

define( 'WP_ACCESSIBLE_HOSTS', 'api.deliciousbrains.com,www.mystagingsite.com' );

Note, the remote site URL ‘www.mystagingsite.com’ has the full subdomain of ‘www’, as this needs to exactly match the URL from the connection info used when migrating:

Remote site connection screen
WP Migrate DB Pro v2.0+

URL of migration connection
WP Migrate DB Pro v1.x