问题描述
这是我的网站网址 http://www.weblogicsol.com/,在这里我安装了 http://www.weblogicsol.com/blog 的strong> wordpress主题,问题是当我想打开 wp-admin 时(即当我编写 http://www.weblogicsol.com/blog/wp-admin )重定向到本地主机.请帮我解决这个问题,我有麻烦了.
This is my site URL http://www.weblogicsol.com/ , Here I installed a wordpress theme having URL http://www.weblogicsol.com/blog , the problem is this when I want to open the wp-admin (means when I write http://www.weblogicsol.com/blog/wp-admin) it redirect to localhost. Please help me to solve this problem, I am in trouble.
如果我将此代码写在wp-config文件中
And if I write this code in wp-config file
define('WP_HOME','http://example.com');define('WP_SITEURL','http://example.com');
define('WP_HOME','http://example.com');define('WP_SITEURL','http://example.com');
然后该URL出现错误消息.
then this URL appears with an error message.
推荐答案
检查您的wp-options表,并在option_value字段中查找所有出现的"localhost"
Check your wp-options table and find all occurrence of 'localhost' in option_value field
http://codex.wordpress.org/Database_Description#Table:_wp_options
SELECT * from wp_options where option_value like '%localhost%';
并将其更改为您的实时网址,您应该已设置
and change those to your live URL and you should be set
这是有关迁移wordpress的非常详尽的文档 http://codex.wordpress.org/Moving_WordPress
Here's a very extensive documentation on migrating wordpresshttp://codex.wordpress.org/Moving_WordPress
这篇关于为什么我的页面在我的wordpress博客中重定向到localhost?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!