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/
342 stars 515 forks source link

wp-cli integration #1

Closed emzo closed 6 years ago

emzo commented 12 years ago

It would be awesome to integrate this with wp-cli, to enable you to initiate an export from the command-line.

duncanjbrown commented 12 years ago

I had a go at this:

https://github.com/duncanjbrown/wp-cli/blob/master/src/php/wp-cli/commands/community/migrate.php

emzo commented 12 years ago

@duncanjbrown this is awesome work! I'm just wondering, would it be more intuitive if the migrate output was directed to STDOUT by default if no output filename was given, rather than having to specify STDOUT? I'm just thinking that this might be more expected behaviour for command line tools, but maybe you have good reasons for doing it this way? I'd like to hear your thoughts!

duncanjbrown commented 12 years ago

Hi. Great!

The STDOUT option It's only because wp-cli creates a file by default on wp export. I wonder if @scribu has any thoughts?

It could do with an 'in' as well as 'out', too, perhaps with some sort of network connection, see @joehoyle 's comment in my post on the subject herehttp://duncanjbrown.com/migrate-your-wp-database-in-one-command/ .

On 15 June 2012 09:31, Emyr Thomas < reply@reply.github.com

wrote:

@duncanjbrown this is awesome work! I'm just wondering, would it be more intuitive if the migrate output was directed to STDOUT by default if no output filename was given, rather than having to specify STDOUT? I'm just thinking that this might be more expected behaviour for command line tools, but maybe you have good reasons for doing it this way? I'd like to hear your thoughts!


Reply to this email directly or view it on GitHub: https://github.com/bradt/wp-migrate-db/issues/1#issuecomment-6351766

scribu commented 12 years ago

wp-cli already has wp db import and wp db export. If you want to propose a change to how they work, please open an issue there: https://github.com/wp-cli/wp-cli/issues/

As for search-replace, there's a similar effort underway: wp-cli/wp-cli#118

scribu commented 12 years ago

Oh, and there's also wp-cli/wp-cli#249

mattgrshaw commented 6 years ago

This has been implemented for a while now.