有5个值需要更改。来自数据库。
wp_options: options named “siteurl” and “home”
wp_site
wp_sitemeta: the option named “siteurl”
wp_blogs: any entries in the “domains” column that have the old domain name
wp_#_options: Each sub-site will have sets of tables that correspond to the blog_id in the wp_blogs table. You need to go to the wp_#_options table, where # corresponds to the blog_id, and update the “siteurl” and “home” settings in that table.
注意:在大多数情况下,您可能/将需要更新WP配置中的条目。php文件。我建议查看以下代码片段:
define(\'WP_ALLOW_MULTISITE\', true);
define( \'MULTISITE\', true );
define( \'SUBDOMAIN_INSTALL\', true );
$base = \'/\';
define( \'DOMAIN_CURRENT_SITE\', \'mysite.com\' );
define( \'PATH_CURRENT_SITE\', \'/\' );
define( \'SITE_ID_CURRENT_SITE\', 1 );
define( \'BLOG_ID_CURRENT_SITE\', 1 );