REST API Errors
Since version 2.0, WP Migrate DB Pro makes extensive use of custom WordPress REST API routes to perform plugin actions, migration actions, or transfer media, theme, and plugin files.
Some plugins and themes disable the WordPress REST API or disable any REST API routes other than those that ship with WordPress core. If this happens, WP Migrate DB Pro cannot access and make use of the REST API.
If the REST API on your WordPress install is disabled or altered somehow, the plugin UI will notify you with the following message.
If you see this message, please check if you have any plugins or themes installed that may affect the REST API.
Some WordPress plugins that may affect the default functionality of the REST API include the ability to add specific REST API endpoints to an allowed list.
For example, the JWT Auth plugin will intercept all REST API requests. If installed, it could block the WP Migrate DB Pro endpoints. You can use this plugin’s jwt_auth_whitelist
filter to add WP Migrate DB Pro endpoints to the allowed list.
add_filter( 'jwt_auth_whitelist', function ( $endpoints ) {
$wp_migrate_db_pro_endpoints = array(
'/wp-json/mdb-api/v1/*',
);
return array_unique( array_merge( $endpoints, $wp_migrate_db_pro_endpoints ) );
} );