Wordpress DNS issue - Has this ever happened to you?

Discussion in 'Site & Server Administration' started by sheffernan, Jan 3, 2013.

  1. #1
    Hi there,


    I am moving an existing Wordpress site to a new host, but keeping the same URL.


    The DNS is still currently pointing to the old host, just while I get the new host set up and can test it out.


    When I install Wordpress on the new domain, it will not load. The host provided a 'temp' address to access your site before the DNS is set, but it still won't load Wordpress properly, and I can't get past the wp-login. It simply doesn't load anything.


    My suspicions are that Wordpress is trying to load itself from the intended domain, but because the DNS is not set yet, it can't.


    Does anyone know how I can test and access the site before switching DNS?


    Thanks :)
     
    sheffernan, Jan 3, 2013 IP
  2. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #2
    Point the website to the new IP by using the hosts file on your local machine. Point the website to new IP locally. Doing this the website will point to new server before changing the DNS.
     
    MilesWeb, Jan 3, 2013 IP
  3. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #3
    Or you could simply edit the pertinent WP config files (wp-config.php - it's well documented on Wordpress.org) and SQL database entries on your install at the new host, so that only the new host/temporary details are used.
     
    ryan_uk, Jan 3, 2013 IP
  4. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #4
    The rewrites inside of .htaccess should be set to your temp folder, such that:

    RewriteBase /~username/

    The above applies if they gave you a http://IP/~user/ address as the temporary address.

    You will also want to update the 'home' and 'siteurl' keys in wp_options table to point to the base address of your temporary site so you can work on it. Something like:

    http://IP/~user/

    would work as the base address. Then, when the DNS changes over, revert your changes, and update home,siteurl,.htaccess and it should all work perfectly.
     
    zacharooni, Jan 5, 2013 IP