简体   繁体   中英

Changing the URL of a wordpress site

I have a wordpress site at http://myname.myprovider.info and I just bought the domain http://www.myname.com

Ive tried to change the URL in the backend at "Setting > General" both fields WordPress Address (URL) and Site Address (URL) with http://www.myname.com . The moment i click save, Im automatically logged out of the backend. If i try to log back in, I get a white screen.

The only way to log back in is to add in the config file the following line:

define('RELOCATE',true);

If then I go back to "Settting > General" I see that WordPress Address (URL) still has the http://myname.myprovider.com and everytime I try to change it again, the loop starts again...

What can I do?

you cant just change the url in wordpress ... you would need to move all the files to your new host

you can facilitate this in wp-admin

under tools select export and follow the dirrections

then setup wordpress on your new host

and goto wp-admin and select tools import and select the earlier exported file

If you're moving from a subdomain to the main domain, you have to move files. See Moving WordPress « WordPress Codex and How to Move WordPress Blog to New Domain or Location » My Digital Life and check with your host; the URL structure "myprovider.info" may be problematic, whoever the "provider" really is.

I had a very similar problem some time back and I'm trying to remember what the source of the problem was. Until I do, here are some ideas you may or may not have tried:

(obviously backup everything first!)

  • Check your code (theme, scripts, functions.php, etc.) for any instances of the old URL. Sure, we all know better than hard-coding the URL but...
  • Do a search through your WordPress database for the old URL. Carefully (very carefully!) replace it with the new one. In my experience some plugins aren't well behaved when it comes to storing the web site URL in the database.
  • Try disabling all plugins to see if one of them is causing a problem.
  • I assume you've set the DNS by hand, rather than your domain registrar putting in place some kind of forwarding?

经过大量的修改,事实证明我没有正确配置域:P仍然感谢您的所有帮助。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM