Can not access site after WP Migrate DB Pro sync (domain redirects)

I’m using the latest version of Flywheel and the latest version of WP Migrate DB Pro.

I have a remote dev environment (projectname.uniqueurl.com) and a local dev environment (projectname.dev). After I pull the DB from the remote to the local (and I make sure to update the urls), I then change the table_prefix to whatever WP Migrate DB Pro tells me to: my local url is no longer accessible but instead points to a different domain altogether (projectname.com) that haven’t entered into anywhere on the remove dev site.

It makes flywheel unusable once I start working with data.

Has anyone ran into a similar issue or have a better walk around?

Hi Patrick,

There could be a handful of things causing this:

  1. Caching. If you’re on the Preferred environment, be sure to enable “Dev Mode” in the top-right of the site info in Local to disable the Varnish caching layer
  2. Not every URL/domain is changed. See the examples here for how to change the URL with WP-CLI: https://developer.wordpress.org/cli/commands/search-replace/ … To use WP-CLI with Local, simply right-click on the site in the sidebar and go to “Open Site SSH”
  3. If you’re using Apache in the Custom environment, double-check that there isn’t an .htaccess file causing this
  4. Double-check your custom themes/plugins for any hard-coded URLs

I’m getting a 500 internal server error after using Migrate DB Pro and can’t even access the admin. Not sure what to do. I did a find and replace in the SQL file to make sure that the urls were correct but still having issues.

Any ideas why the admin would be inaccessible?

Hi Robert,

I’d check the logs directory in the site directory for clues.

You can also try enabling WP_DEBUG in wp-config.php.

Thanks! I’m currently plugging my way through this. I don’t think Debug would work (unless it writes to a file) since I can’t access the site.

Update: I removed all plugins and the site loaded. I have a one too hundred many plugins … so who knows what the conflict is. Going to have to go one by one here.

Thanks.

1 Like