目标:将多站点WordPress安装迁移到本地主机
环境: Ubuntu 10.4上的LAMPP。
我正在将一个多机的wordpress安装转移到localhost。我已经完成的步骤:
使用备份sql文件重新创建的数据库。从服务器复制所有文件夹和文件,并保存在htdocs下。现在,使用新生成的wp-config.php,当我尝试安装一个多脚本时,系统要求我将以下内容添加到wp-config.php中
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'localhost/wordpress');
define('PATH_CURRENT_SITE', '/wordpress/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);我还在.htaccess中添加了以下内容:
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]当我使用url http://localhost/wordpress访问我的站点时,我被带到了http://localhost/wordpress/wordpress/,并得到了说明Firefox has detected that the server is redirecting the request for this address in a way that will never complete的错误消息。
请帮我把它设置好。
附言:我是Wordpress的新手。
发布于 2013-02-15 17:41:56
这几行
define('DOMAIN_CURRENT_SITE', 'localhost/wordpress');
define('PATH_CURRENT_SITE', '/wordpress/');`必须是:
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/wordpress/');https://stackoverflow.com/questions/14891283
复制相似问题