1

Errors i get while replacing: First: Error: There has been a critical error on this website.Learn more about debugging in WordPress. There has been a critical error on this website.

Second: Fatal error: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in phar://C:/wp-cli/wp-cli.phar/vendor/wp-cli/search-replace-command/src/WP_CLI/SearchReplacer.php:86 Version of php: Version

When i am trying to replace adresses with this comand:

wp search-replace https://example.com http://example.com --all-tables --verbose

I am getting this errors above.

urodii
  • 11
  • 1

1 Answers1

0

The WP-CLI expetcs your search and replace parameters to be a string. Currently (most probably because of colons :) the CLI thinks your url's are multiple strings and puts them into an array.

If you wrap each url into quotes ' the problem should be fixed.

wp search-replace 'https://example.com' 'http://example.com' --all-tables --verbose

Alex Berger
  • 1,357
  • 1
  • 10
  • 22
  • still the same :/ – urodii Feb 11 '21 at 14:11
  • Used the code like it is in my answer and it's running just fine. Can you tell me your WP CLI version `wp --version` and the php-version `php -v`? – Alex Berger Feb 11 '21 at 14:19
  • I solved problem, different version of php was installed on cmd terminal and xmapp shell i changed php folder in xampp and it is working but, anyway thanks for help :) – urodii Feb 11 '21 at 15:10