Support » Fixing WordPress » Best way to change the domain name of the blog (from .com to say .net)

  • Hi,

    Which is the best way to change the domain name without deleting or modifying the old domanin name?

    For example, if the current blog address is example.com then I want to change that to example.net. The whole files, data etc. must be there in the new account but at the same time it must be there in old account also (so that we can change the domain later).

    I checked the http://codex.wordpress.org/Moving_WordPress#When_Your_Domain_Name_or_URLs_Change but it’s a bit confusing. So a detailed blog post will be good.

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You have cited the correct codex link to help move your site. It’s not confusing as you say. You only need to change URLs after moving content (even before if you use a test install or local host to prepare for the move).

    Yeah.. I understand.. but I’m looking for an in depth blog post…. to check the steps… to be on the safe side… as it involves changing core WP files.

    Edit: Also, my real problem is am not sure about how this works.. Should I create a new web hosting account for the new domain name or we’re parking it or adding as an addon domain?

    as it involves changing core WP files.

    Moving a site doesn’t involve changing core WP files. In fact, you should never be modifying WP core files.

    All you need to do is this.

    Take your entire WP directory and move it where you need to.
    Then change the instances of the domain name in your database.
    I like to use – http://interconnectit.com/products/search-and-replace-for-wordpress-databases/
    to do that.

    Then once your dns have changed or whatever you need to do, login to the new site, reset the permalinks, check everything and then if you’re happy, you can delete the old files on the other server.

    as it involves changing core WP files.

    You do not have to change any core WordPress files. You only need to change the wp-config.php file to reflect your new database info. The rest of the changes will be done automatically by WordPress. The other change that you have to perform is in the MySQL database to change URLs that is as easy as a one-click job using the script mentioned in the above codex:

    Database Search and Replace Script in PHP

    Hi Christine,

    Thanks for the link.. will take a look….

    So I must ask the web hosting provider to copy all the current WP directories to the newly created hosting account (mine is a reseller hosting)?

    Edit: Also, my real problem is am not sure about how this works.. Should I create a new web hosting account for the new domain name or we’re parking it or adding as an addon domain?

    Depends what you are doing. Why are you moving it to begin with?

    If you can just ad a new domain as an add-on, then I would do that. That’s cheaper than setting up a new hosting account.
    There’s no need to park the domain if you’re going to use it.

    The link to the Codex you referred to has a list at the bottom with additional info – http://codex.wordpress.org/Moving_WordPress#Additional_Information

    So I must ask the web hosting provider to copy all the current WP directories to the newly created hosting account (mine is a reseller hosting)?

    If you have FTP access, you can do that yourself.
    Don’t forget the database though. The files are important, but without the database, you won’t get very far.

    Good luck.

    Hi Krishna,

    I think I saw some article related to search and replace but was not sure about it… Have to check all these options before I proceed… Also, we are not modifying any files in the old hosting account (old domain name) right?

    Hi Christine,

    Yes, I do have FTP access but I guess it’s better to ask the hosting company as they have better internet connection and access.

    Will check the database transfers too… I just want to make sure that my old dmoain and data remains intact so that I can switch back whenever i want to…

    Regarding the reason why am changing the domain… There’s something wrong with the backlink profile or at the domain level that I havent sorted yet… So I just wanted to migrate to another domain to see if there’s any problem with the content… So that i can switch back some other day… that’s why am changing only the extention of the domain….

    Yes, you do not have to modify any files in your old hosting account. If you like to maintain it, better redirect (301) the URLs to your new domain so that you won’t lose your current traffic and at the same time you can retain your search engine rankings (PR etc.).

    As you seem to be NOT sure about the move, I suggest you may try it first on your local WordPress install or use a test site and then make the final move to the new location. An easy to setup (and to straightaway start working) local WordPress tool is Instant WordPress.
    http://www.instantwp.com/

    Thanks guys… I migration is done and it was super smooth and took < 2 hours…. I used the cPanel backup to transfer data and then used search and replace…. thanks once again… only problem was it replaced the oldsite’s database too…

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Best way to change the domain name of the blog (from .com to say .net)’ is closed to new replies.