Domain Mapping with sub-domains initial setup on a new network.

Hi,

The domain mapping still wants to install on a sub-directory vs. a sub-domain.

I remember in the past it us to give a option upon first setting up to decided on one or the other. I need sub-domains for mapped sites.

Thanks.

  • Andre Foisy

    Hi Greg,

    Thank you for contacting our support team.

    Can you verify your wp-config.php file and make sure the following is included?

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'yourdomain.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    If not, you should add those lines and then try again.
    Just pay attention and make sure you replace "yourdomain.com" by your actual domain name :wink:

    Let me know how that works I hope that helps.

    Best regards,
    Andre

    • Greg

      Hey there @Andre Foisy

      Yes. Here it is exactly FYI:

      . . . 
      
      define('WP_DEBUG', false);
      define( 'SUNRISE', 'on' );
      
      /* Multisite */
      define( 'WP_ALLOW_MULTISITE', true );
      define('MULTISITE', true);
      define('SUBDOMAIN_INSTALL', false);
      define('DOMAIN_CURRENT_SITE', 'yourdomain.com');
      define('PATH_CURRENT_SITE', '/');
      define('SITE_ID_CURRENT_SITE', 1);
      define('BLOG_ID_CURRENT_SITE', 1);
      
      /* That's all, stop editing! Happy blogging. */
      
      . . .

      Greg

      • wp.network

        Hey @Greg

        1) I notice that your screenshot shows a key difference from the example given by @Andre Foisy

        1a) the key line is shown in your screenshot as:
        define('SUBDOMAIN_INSTALL', false);
        Which means your multisite has been setup to use subdirectories rather than subdomains.

        1b) if you want to use subdomains, this line should be look like it does in the example given above by Andre:
        define('SUBDOMAIN_INSTALL', true);
        Note: there can be issues changing this if you have already created sites, fyi

        1c) Just to make sure: if you've been using the Softaculous script installer to install WP and have been using the 'Multisite' option, you should be aware that this creates a WPMS using subdirectories; for a subdomain setup you must install WP as a single site and then activate the network setup manually as per codex. http://codex.wordpress.org/Create_A_Network

        2) Good move on the IP address, you should be able to enter your IP in your browser bar and have it resolve to your primary site.

        Good Luck, I'm sure you'll get this working :slight_smile:

        Cheers, Max

          • Greg

            @TiViSM

            I believe I have it working now...

            I was still getting and DNS error before (it would create the site for the subdomain but there would be a DNS error upon browsing to the site or to the WP admin area...would not load), but tried the below and it seems to be working for the moment...

            I previously had "sunrise" just below the "debug" line...I moved it per below to see if that would help. It appears as though it worked after doing that...unless it was just a coincidence with a final propagation that finished with the dedicated ip that was recently setup...smile.

            define('WP_DEBUG', false);
            
            /* Multisite */
            define( 'WP_ALLOW_MULTISITE', true );
            define('MULTISITE', true);
            define('SUBDOMAIN_INSTALL', true);
            define('DOMAIN_CURRENT_SITE', 'mydomain.com');
            define('PATH_CURRENT_SITE', '/');
            define('SITE_ID_CURRENT_SITE', 1);
            define('BLOG_ID_CURRENT_SITE', 1); 
            
            define( 'SUNRISE', 'on' );
            
            /* That's all, stop editing! Happy blogging. */

            Hopefully others may find this iteration helpful (hope that is the final solution)...

            :slight_smile:

  • Ash

    Hello @Greg

    I hope you are well today.

    Hope you wouldn't mind me chiming in :slight_smile:

    Let's fix the multisite first. You said your multisite is running now. So, did you create a new site? For example, if your main site is network.com and subsite is site.network.com then can you access http://site.network.com and http://site.network.com/wp-admin ?

    If yes, then all good so far. If not, then you need to fix the wp-config.php and htaccess from Network Dashboard > Settings > Network Setup.

    Once you fix this, then move to next stop. You have got a dedicated IP, that's great. Not your IP needs to be pointed to the network site. For example, if your IP is 111.111.111.111 then if you enter http://111.111.111.111 in the browser, http://network.com site should be loaded. if it does, then your IP is pointed correctly.

    Now your subsite is site.network.com and you want to map this subsite with the domain mapped.com site. You need to go to mapped.com domain panel, and set a A record pointing to 111.111.111.111. If it is done correctly. then if you enter http://mapped.com in the browser, you will see http://network.com site.

    Now, you need to login at http://site.network.com/wp-admin and navigate to Tools > Domain Mapping and add the domin http://mapped.com in there.

    Once you do that, you are done :slight_smile:

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.