Support » Installing WordPress » Domain migration

  • Resolved TheDegree0

    (@thedegree0)


    Hello,
    I tried to move my wordpress website from a from an old domain to a new domain, I also changed the hosting provider.
    Everything is working perfect, I went to the database and changed everything that contained the old domain to the new one.
    The website works except when you visit the main page, it redirects you to the old domain. I’v been now 4 hours with this problem and I can’t fix it and I have no idea why its happening, it only happends when you visit the main page, with everything else it works perfectly.
    I also tried of adding this lines to the wp-cofig.php file:
    define(‘WP_HOME’,’http://www.newdomain.com’);
    define(‘WP_SITEURL’,’http://www.newdomain.com’);
    but it didn’t fix the problem.

    Im not sure if this goes here,
    Thank you,
    TheDegree0

Viewing 3 replies - 1 through 3 (of 3 total)
  • You could try this plugin http://wordpress.org/plugins/search-and-replace/ to search the DB for the old URL.

    In the future you may want to use a plugin such as Duplicator.

    Hope that helps 🙂

    Instead of the two DEFINE lines in your wp-config.php, try adding these (at the bottom):

    update_option('siteurl','http://www.newdomain.com');
    update_option('home','http://www.newdomain.com');

    If that works, you can/should remove those lines again.

    Thank you! At the end it was a cache problem with my router.
    I’ll try the Duplicator next time I have to change domains, thank you! 🙂

    I tried the update_option thing but it was creating PHP errors. It said that “update_option” is not defined.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Domain migration’ is closed to new replies.