Support » Fixing WordPress » Changing URL: Need to alter WordPress installation?

  • Hi,
    I want to change to a new URL using the same blog, same web hosting space. The only change would be the URL in which I’ll need to simply fiddle with the DNS in order to “point” the new URL at my webspace.

    Question: I’m new to WP and while I have installed it at my current URL, will I need to do anything after pointing my NEW URL at the site? I don’t see why I would but I’m checking just in case.

    Again, not changing web space, only URL.


Viewing 12 replies - 1 through 12 (of 12 total)
  • You will need to make sure that WordPress knows where it is.

    Can I have one WP installation with two URL’s pointing to it, like an HTML website?

    Just curious…

    Sort of. Let’s say you fllow the directions linked about and change all the information in your databse to point to the new URL. This means you will not only have changed your main url, but all your permalink urls will reflect the new site name as well.

    So, you still have your old domain, and you want to make sure that anyone who bookmarked your old domain will still be able to access the newly-named site. Well, all you need to do is *forward* your old domain to the new one, something that should be pretty easy to do via your server’s interface. Then, when someone inpouts the old url into their browser, it will automatically “jump” to the new url.

    However, let’s say someone bookmarked a post on your site call That post still exists, at, but if someone inputs the old url into their browser, it will only redirect them to the home page of your site,, NOT the actual post. As far as I know, there is no way around this, but maybe another wp expert can help you.

    Thanks for all the help so far. This has spawned another question, however. I’ve been using a backup plugin “WordPress Database Backup” by Scott Merrill.

    Would a backup like this restore my blog to ANY URL with ANY webhost?(Of course performing the modifications as mentioned by LesBessant)

    In otherwords, does a backup like this contain the data (posts, CSS, etc.) to restore my blog theoretically under any hose/URL situation? Or does it simply reinstate the data under a pre-existing WP install?

    Thanks again!

    The database backup backs up whatever information is in the database at the time you run the plugin. For example, if you follow all the above directions and change your site url in your database, and then next day you run the backup plugin, then the backup will only show the new database url. This is because the database no longer shows the old url — you changed them all to the new url in the first step listed above.

    The same holds true if you make changes to a post. In other words, the database does not track versions or “first drafts” of posts or pages (this is different from Drafts that you actualy save). It only shows the most recent change, and everything before that is overwritten.

    Well thanks everyone –I just checked my work from last night (to give the DNS servers, etc. time to catch up) and it all worked fine! My new URL works with my WP installation AND my old domain forwards to the new one just fine!

    Thanks again 🙂

    WAIT A SECOND: I got this error message when I was tinkering about with my site. I replaced the actual URL with “OLD_URL”, to indicate that this is no longer my current URL. Obviously something somewhere is making reference to my old URL …?? Everything else seems to be working great and this doesn’t happen every time. Again I’m not exactly sure how I got it to do this.

    ” WordPress database error: [Lost connection to MySQL server during query]
    INSERT INTO wp_postmeta (post_id,meta_key,meta_value) VALUES (’18’,’_encloseme’,’1′)

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/e/n/a/OLD_URL/html/wp-includes/wp-db.php:102) in /home/content/e/n/a/OLD_URL/html/wp-admin/post.php on line 122 “

    Oh and this is what was in the browser address field: “”

    Be advised that Google does not look fondly on content duplicated on more than one domain or subdomain. You could be penalized though I imagine the point that the two domains point to the same virtual host would be a pretty arguable point that it is not _in fact_ duplicate content.

    See point 5 under Quality:

    abrazell: I don’t know what that means –I’m very new to this.

    Abrazell — I don’t think that refers to domain forwarding. It’s more like creating 2 individual sites that contain the same exact conetnt with different domain names.

    Birdpress — I’m not sure why the error you are getting above contains the old url, but most of the time, a “headers already sent” error means that there are extra spaces in your php document. In most php pages, <?php should be at the <i>very top</i>, no spaces before it, and ?> at <i>the very end</i>. Look at the first file listed in the error —wp-includes/wp-db.php — and see if you can find spaces there. Many times, when you move a code file, spaces get automatically insreted into it (for what reason, I have no idea). Simply edit that file to take the first and last spaces out and all should be good.

    More info in The Codex, as usual.

    brittanie: Thanks, I did find an exra line (space) in post.php, so I’ll see if it works better after having deleted that. The wp-db.php was fine, however, but we’ll see.

    However no one thinks it odd that I still show the old URL in these references? I did everything as required here: and for the most part my installation works fine.

    Update: My WordPress installation has become broken beyond repair. I’ve used various backup methods (manually and using the “Skippy” plugin) and none of my restores have been successful.

    When typing in my blog URL it gave me a bunch of jargon, some of which was indicating problems with a plugin that rotated graphics (again, still making old URL references).

    So I’ve wiped the slate clean and am going to reinstall WP 2.0.2

    Now I’ll have to search to see if I can restore some entries from an older installation.

    But my blog was pretty new so I’m terribly concerned with it at this point –pain in the butt but I’m learning 😉

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Changing URL: Need to alter WordPress installation?’ is closed to new replies.