Why does my page redirect to localhost in my wordpress blog?

左心房为你撑大大i 提交于 2020-01-12 04:45:34

问题


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.

And if I write this code in wp-config file

define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');

then this URL appears with an error message.

http://weblogicsol.com/blog/wp-login.php?redirect_to=http%3A%2F%2Fwww.weblogicsol.com%2Fblog%2F%2Fwp-admin%2F&reauth=1


回答1:


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

Here's a very extensive documentation on migrating wordpress http://codex.wordpress.org/Moving_WordPress




回答2:


Check the Dashboard -> Settings -> WordPress Address (URL), Site Address (URL) There should NOT be 'localhost'




回答3:


There are two areas in the WP_OPTIONS that you need to change. One is one the fisrt page and the other one is on the 2nd page.

This video will definitely help if you have access to phpMyAdmin

http://educhalk.org/blog/?p=21




回答4:


you should check wp_options on your database , modify site url dan home as your web domain




回答5:


Here is the way. 1. Login to Phpmyadmin 2. select Db 3. goto table "wp_options" 4. change url in siteurl & home.

its works 100%



来源:https://stackoverflow.com/questions/9764722/why-does-my-page-redirect-to-localhost-in-my-wordpress-blog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!