Skip to content

search-replace does not update wp_blogs and wp_site tables #165

@paulschreiber

Description

@paulschreiber

Describe the current, buggy behavior
wp search-replace does not update the wp_blogs and wp_site tables. It appears the wp_blogmeta and wp_sitemeta tables are also affected, but my wp_blogmeta table is empty.

Describe how other contributors can replicate this bug

$ wp search-replace terraso.org terraso.test
$ mysql terraso

MariaDB [terraso]> select * from wp_blogs;
+---------+---------+-------------+------+---------------------+---------------------+--------+----------+--------+------+---------+---------+
| blog_id | site_id | domain      | path | registered          | last_updated        | public | archived | mature | spam | deleted | lang_id |
+---------+---------+-------------+------+---------------------+---------------------+--------+----------+--------+------+---------+---------+
|       1 |       1 | terraso.org | /    | 2021-05-07 12:13:50 | 2021-10-11 15:41:43 |      1 |        0 |      0 |    0 |       0 |       0 |
|       4 |       1 | terraso.org | /es/ | 2021-10-04 18:29:57 | 2021-10-11 15:41:43 |      1 |        0 |      0 |    0 |       0 |       0 |
|       6 |       1 | terraso.org | /pt/ | 2021-10-05 15:23:28 | 2021-10-11 15:41:44 |      1 |        0 |      0 |    0 |       0 |       0 |
+---------+---------+-------------+------+---------------------+---------------------+--------+----------+--------+------+---------+---------+

MariaDB [terraso]> select * from wp_site;
+----+-------------+------+
| id | domain      | path |
+----+-------------+------+
|  1 | terraso.org | /    |
+----+-------------+------+

Describe what you would expect as the correct outcome

wp_blogs and wp_sites (and their meta tables) contain terraso.test instead of terraso.org

Let us know what environment you are running this on

OS:	Linux 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64
Shell:	/bin/bash
PHP binary:	/usr/bin/php7.4
PHP version:	7.4.24
php.ini used:	/etc/php/7.4/cli/php.ini
MySQL binary:	/usr/bin/mysql
MySQL version:	mysql  Ver 15.1 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
SQL modes:	STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/srv/www/terraso
WP-CLI packages dir:	/home/vagrant/.wp-cli/packages/
WP-CLI global config:	
WP-CLI project config:	/srv/www/terraso/wp-cli.yml
WP-CLI version:	2.5.1-alpha-41c44d5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions