deliciousbrains / wp-migrate-db

WordPress plugin that exports your database, does a find and replace on URLs and file paths, then allows you to save it to your computer.
https://wordpress.org/plugins/wp-migrate-db/
341 stars 515 forks source link

Bad default value when creating a new migration #63

Open k1sul1 opened 7 years ago

k1sul1 commented 7 years ago

This image will describe the issue better than I ever could.

issue

So, to the point. For some reason, when you create a new migration, the replace_old[] field has a value automatically set. This value seems to be dependent on whatever domain you're using to access the site, instead of the siteurl.

I'm using browsersync to automatically reload the pages whenever a change to the project files is detected, and it basically proxies every request I make to the actual local domain. The downside is that I've to use https://localhost:3000 as my development domain.

Proposed fix: use value of get_option('siteurl') as this fields value.

I'm using the Pro version, but this is relevant to the free version also.