我正在将wordpress多站点(http://blogs.xxx.com)迁移到新服务器(http://blogs-test.xxx.com/blogs)中的子目录。运行wp-admin / install.php之后,我在所有页面中都有“页面未正确重定向”错误。我做过这些事情:
我错过了别的什么吗? 谢谢!
答案 0 :(得分:0)
您是否也在数据库中进行了更改?
为了快速参考,这是您需要使用新域名更新的主要表格列表:
- wp_options> SITEURL
- wp_options>主页
- wp_site
- wp_sitemeta> SITEURL
- wp_blogs>域(对使用旧域的所有实例更改此选项)
- wp _#_ options> siteurl(“#”指网络中其他网站的博客ID)
- wp _#_ options>家
- wp _#_ options> fileupload_url
在此处阅读更多内容:https://premium.wpmudev.org/blog/move-multisite-new-domain
答案 1 :(得分:0)
好的,我通过修改wp-config.php解决了重定向循环。这是关于我的网站的子目录。我必须从
修改这两行 define('DOMAIN_CURRENT_SITE', 'blogs.xxx.com/blogs' );
define('PATH_CURRENT_SITE', '/' );
为:
define('DOMAIN_CURRENT_SITE', 'blogs.xxx.com' );
define('PATH_CURRENT_SITE', '/blogs' );
不确定原因,但这解决了重定向循环问题。
答案 2 :(得分:0)
如果没有任何效果,请尝试此操作,并感谢我在下面给出的链接中的那个家伙,因为他已经弄清楚了
First thing, make sure that at WordPress General settings, you have HTTPS version URL, not HTTP.
You can verify once by checking MySQL database table. If there is HTTP, you may change to HTTPS.
Or if you need very fast solution, simply define HTTPS version URL via wp-config.php
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
define('WP_HOME','https://example.com');
define('WP_SITEURL','https://example.com');
/* That's all, stop editing! Happy blogging. */
Then try to access, it should work. If it works, better, at last you can use Search/Replace to fix.
Also, one more thing. Make sure you don’t have vice-versa redirection in the .htaccess
#####Ref
https://codex.wordpress.org/Changing_The_Site_URL
https://codex.wordpress.org/Administration_Over_SSL
这是reference link感谢这个家伙!
答案 3 :(得分:0)