db-command icon indicating copy to clipboard operation
db-command copied to clipboard

Problem `wp db export` in windows

Open mehrshaddarzi opened this issue 3 years ago • 5 comments

Hi @schlessera, When I use wp db export in Cmd windows get Error:

eere

There is a Double quote that Causes an error. When I run the mysqldump command separately, it is complete:

345

I saw this function in the source and I think its condition should be cleared:

97649

mehrshaddarzi avatar Jul 18 '21 11:07 mehrshaddarzi

@mehrshaddarzi I am having same issue. What is the filename of the source ?

monirulalom avatar Oct 08 '21 11:10 monirulalom

@monirulalom @schlessera

Unfortunately, WP-CLI development on Windows operating system is very weak. I found some different bugs from WP-CLI that are not followed at all.

The File path: ~/wp-cli/php/utils.php

You must remove the quotation mark. thanks

mehrshaddarzi avatar Oct 08 '21 11:10 mehrshaddarzi

@mehrshaddarzi Thanks for quick response . It is now exporting but showing an warning. Warning: Failed to get current character set of the posts table. Reason: ERROR at line 1: Unknown command '\_'.

monirulalom avatar Oct 08 '21 11:10 monirulalom

@mehrshaddarzi @monirulalom For WP-CLI usage on Windows I recommend WSL or similar unix-like environment.

wojsmol avatar Oct 08 '21 12:10 wojsmol

I submitted pulls request to resolve this issue:

  1. https://github.com/wp-cli/db-command/pull/231
  2. https://github.com/wp-cli/wp-cli/pull/5689

lipemat avatar Oct 14 '22 17:10 lipemat

Closing in favor of https://github.com/wp-cli/wp-cli/issues/5521

We can continue the conversation there

danielbachhuber avatar Oct 28 '22 17:10 danielbachhuber