WordPress.org

Ready to get started?Download WordPress

Forums

Transferring Domain (2 posts)

  1. ihaveanidea
    Member
    Posted 5 years ago #

    I'm currently hosting a WordPress of the site, using my friend's hosting, so the domain is currently...

    http://example.example.com

    And I just bought a
    http://example.com
    From 1&1 hosting. On their site, I changed the DNS settings to..

    Primary: ns1.wordpress.com
    Secondary: ns2.wordpress.com
    Third: ns3.wordpress.com

    I've tried editing wp-config.php with this line

    define('WP_SITEURL', 'http://old.example.net/');
    define('WP_HOME', 'http://new.net/');

    Which is results in the new one opening as "Link Broken" or something. The other 2 variants,

    define('WP_SITEURL', 'http://new.net/');
    define('WP_HOME', 'http://old.example.net/');

    AND

    define('WP_SITEURL', 'http://new.net/');
    define('WP_HOME', 'http://new.net/');

    And they all result in the same thing. I'm not sure if I'm putting it in the right place, I'm putting it here -

    <?php
    /**
    Loads of comments
    */
    Script I put in
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', '______________');

    What am I supposed to do? Is there more I should edit with the DNS on 1&1, or what do I need to change on WordPress? Also, keep in mind I want to keep my hosting where it is, just change the domain.

  2. merzedes
    Member
    Posted 4 years ago #

    Try and put something like

    define('WP_HOME',    'http://' . $_SERVER['HTTP_HOST']);
    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);

    this in your wp_config.php file which makes your blog accessible either via http://old.example.net/ or via http://new.net/.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.