By ProfKaos

2010-12-12 04:11:09 8 Comments

I have a WordPress blog for which the domain name has expired. I can still nearly access the blog via a new domain name at the same host, but it seems like the original domain name is quite solidly baked into WordPress. Every time I get WordPress to serve just one page, all links on that page still point to the old domain name.

What is wrong with relative URL's is another question for the WordPress team, but my real question here is how can I recover my blog and reopen it under a new domain name?


@canoodle 2020-01-21 09:20:35

today... sedoparking hogged one of my domain that i planed to renew (this is evil).

thanks hakre! that really really helped!

  1. did the fix wp-config.php

    define('WP_HOME',''); define('WP_SITEURL','')

  2. now can login to (a lot of links will still be pointing to

  3. install this plugin highly recommended! (Open Source FOREVER!)

  4. create an backup archive with the plugin (download installer.php and, store at safe place)

  5. (s)ftp upload it to

  6. run

enter image description here

this will search and replace all old and thus broken links in the database

now you should have your old wordpress back online under in full glory! :)

@hakre 2010-12-26 03:09:12

If you have problems to log even into your blog, edit wp-config.php:

Add these two lines to your wp-config.php, where "" is the NEW location of your site.


This will at least make it useable again (but won't fix links inside post and page content, see Ticket #4003). .

Additionally you can add this third line:


Then go immediatly to and login as normal. When the RELOCATE flag is set to true, the siteurl (NOT the home setting) will be automatically updated to whatever path you are using to access the login screen. This will get the admin section up and running on the new URL, but it will not correct any other part of the setup. Those you will still need to alter manually. (Source)

More information on how to change the URL can be found in Changing The Site URL (Wordpress Codex).

@alexandru 2010-12-12 04:30:59

You mean after changing the Site and WordPress addresses in Settings > General you still have this problem? This seems like a pretty serious bug, but may be a design limitation of WordPress. Either way, it's probably wise to report it upstream.

To address your problem: backup the database and run an update to replace any references to the old URL with the new one, in case some things have been committed to the DB. I think that should solve any issues you see (clear the caches as well, if applicable).

A slightly more hackish way would be to clone both WordPress and the database locally, then change your hosts file to claim your old URL resolves to and run the server locally. With that going, you can export WordPress wholesale and import the resulting file in a new installation, which would be under the new domain.

@ProfKaos 2010-12-12 05:12:49

Even changing the Site and WordPress addresses in "Settings > General" is proving problematic because all redirection and links right from the login page are wrong, but I like your suggestion of getting it running locally.

@Dan Grossman 2010-12-12 08:36:10

You can fix this by changing the site URL directly in the database. You can either use the mysql client or phpMyAdmin to issue the necessary query:

UPDATE wp_options SET option_value = '' WHERE option_value = ''

If you had the blog running at a subfolder, make sure to include that in the old URL as well. Once you run that query everything will stop redirecting you to the old domain.

This is the same as the "manual" method here:

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] Migrating WordPress - New domain entry, links broken

2 Answered Questions

[SOLVED] Wordpress migration to new domain and environment with only zip file

  • 2019-06-08 05:10:18
  • navarrofrancisco
  • 28 View
  • 0 Score
  • 2 Answer
  • Tags:   migration

4 Answered Questions

[SOLVED] WP redirects all pages from new domain to old domain

1 Answered Questions

[SOLVED] Wordpress Domain redirects to different host

4 Answered Questions

[SOLVED] Export WordPress from one domain to another domain

1 Answered Questions

2 Answered Questions

how to move a wordpress blog to my static site

  • 2013-11-13 02:11:19
  • Chris
  • 142 View
  • 0 Score
  • 2 Answer
  • Tags:   migration

1 Answered Questions

Migrating domain name from old WP host to new (which uses vhosts)

2 Answered Questions

Sponsored Content