• Resolved DavidWoods

    (@davidwoods)


    I got my multi-site setup working perfectly, a main site and two additional sites. So I’m ready to go live.

    I move my domain name to the new server. I type in the domain name and the correct site comes up. The additional sites are fine, but the main site lists the IP address instead of the DNS as the URL.

    So I start reading, start making changes based on the suggestions I find. I’ve made all the recommended changes, but things are not working right. I’ve narrowed it down to two changes I believe I need to make that break things badly.

    If I change:

    define('DOMAIN_CURRENT_SITE', '104.168.144.44');

    in wp-config.php to use ‘spurgeonwoods.com’ instead of the IP address, I get an “Error establishing a database connection” error. This also occurs if I change the domain value in the wp_blogs table. I know the database is running, I have the right connection information, etc. because everything worked before I made the change. I wondered if it was a permission issue in MySQL, but adding access beyond localhost made no difference. So I’ve had to keep that as the IP address. This affected only the main site, not the additional sites.

    Also, editing the wp_options table, changing the home option from the ip address to ‘https://www.spurgeonwoods.com’ causes a “The page isn’t redirecting properly error. I’ve reverted this setting as well.

    I have updated the siteurl value in wp_optons. I’ve updated all the entries in my wp_posts table. I’ve updated the wp_site table. I changed the siteurl in the wp_sitemeta table. I’ve update the siteurl and home values in the wp_#_options tables for the additional sites and they work fine.

    So my wp-config.php DOMAIN_CURRENT_SITE value, my home setting in wp_options, and my domain setting in wp_blogs all point to the IP rather than the domain name. The site runs, but shows the IP address rather than the domain name. Changing any or all of these values breaks the site as described in ways I have been unable to diagnose.

    Any suggestions would be greatly appreciated. My google-fu has let me down here.

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DavidWoods

    (@davidwoods)

    I had to revert siteurl in wp_options as well. Having that set to the DNS rather than the IP adderss disabled my ability to get into my admin tools.

    David

    Thread Starter DavidWoods

    (@davidwoods)

    To be honest, I’m not sure what I did differently today, but it WORKS!!

    I did all of the following at the same time:

    I made sure all references were to spurgeonwoods.com, not https://www.spurgeonwoods.com. (I had a mix of these, along with IP address in some places so at least the site wasn’t dead.)

    Changed wp_config.php’s DOMAIN_CURRENT_SITE value.

    Changed wp_options’s siteurl and home values from IP to domain name.

    Changed wp_site’s domain value.

    Changed wp_sitemata’s siteurl metakey to the domain name.

    Changed wp_blog’s entry for the domain for the site.

    Suddenly, the site works correctly, showing the domain name instead of the ip address. I can even get into the admin portion of the site.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problems changing from IP to DNS on main site’ is closed to new replies.