Wordpress wp-admin 将我重定向到不同的域
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8456360/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Wordpress wp-admin redirects me to a different domain
提问by cyberscientist
I go to mysite.net/wp-admin.
Once I type in my username and pass word it redirects me to a blank page with address of
我去mysite.net/wp-admin.
一旦我输入我的用户名和密码,它就会将我重定向到一个地址为的空白页面
mysite.co.uk/wp-login.php?redirect_to=http%3A%2F%2Fmysite.net%2Fwp-admin%2F&reauth=1
mysite.co.uk/wp-login.php?redirect_to=http%3A%2F%2Fmysite.net%2Fwp-admin%2F&reauth=1
I own both domains mysite.co.uk and mysite.net. in fact mysite.co.uk redirects to mysite.net
我拥有域名 mysite.co.uk 和 mysite.net。事实上 mysite.co.uk 重定向到 mysite.net
回答by bingjie2680
Go to your database, and find the table called wp-option, then change the wordpress address and site address to mysite.net.
转到你的数据库,找到名为 wp-option 的表,然后将 wordpress 地址和站点地址更改为 mysite.net。
You can also add the following lines of code to the wp-config.php-file
您还可以将以下代码行添加到 wp-config.php-file
define('WP_SITEURL','http://your-site-url.com');
define('WP_HOME','http://your-site-url.com');
回答by ergohack
The above answer didn't work for me. See:
上面的答案对我不起作用。看:
- https://wordpress.stackexchange.com/a/179788/107311by James
- https://codex.wordpress.org/Moving_WordPress
- https://wordpress.stackexchange.com/a/179788/107311by James
- https://codex.wordpress.org/Moving_WordPress
change "siteurl" and "home" in the database table "wp_options" (through phpMyAdmin or similar)
更改数据库表“wp_options”中的“siteurl”和“home”(通过phpMyAdmin或类似)