Setting up WordPress in a subdomain after successfully installing WordPress Multisite for the parent

Hi there,

I've come a long way since last Friday when I joined WPMU DEV as a newbie ...

I have successfully installed WordPress Multisite for my primary domain causeinternational.com but don't know how to get WordPress up and running for subdomain australia.causeinternational.com.

I've looked through the WPMU DEV manuals, etc., but I just can't see how to get australia.causeinternational.com linked into my WordPress setup which is working wonderfully for causeinternational.com.

Maybe I need to read "WordPress Multisite for Dummies" ...

Thanks ... Michael

  • PC

    Hello Michael,

    Greetings and thanks for posting on the forums.

    I have successfully installed WordPress Multisite for my primary domain causeinternational.com but don't know how to get WordPress up and running for subdomain australia.causeinternational.com.

    What kind of Multisite have you setup ?

    Sub domain or Sub directory?

    If you have setup subdomain then you just need to go to Network Admin >> Sites and create a new site as australia.causeinternational.com and you are done.

    You do not need to separately install WordPress to get a subdomain site working. It uses the same install of WordPress and you can run 1000's of sites off it.

    Please advise if that helps.

    Maybe I need to read "WordPress Multisite for Dummies" ...

    No, you don't need that book. You just need to read "The book of PC" lol :slight_smile:

    I will be around in case you have any questions.

    Cheers, PC

  • Jack Kitterhing

    Hi there Michael (@MichaelScott)

    I hope you are well today.

    Congrats on getting your Multisite installed :slight_smile:

    To set up your sub domain, if you go to network admin > sites > add new site and put the domain you want so in your case australia, you'd then have a site on your network with the domain of australia.causeinternational.com and a you visit the dashboard of the site and set it all up :slight_smile:

    Thank you for being a WPMU DEV member!

    Kind Regards
    Jack.

  • MichaelScott

    Hi PC and Jack,

    Thanks for your responses.

    When I installed Multisite I selected subdomain rather than subdirectory, but when I try Add New Site under Network Admin I'm being asked to enter a site name that follows the causeinternational.com/ domain which looks more like a subdifrectory setup than a subdomain.

    I expected that I'd be asked to enter a full subdomain name (ie. "australia.causeinternational.com") or a prefix to causeinternational.com (ie. "australia").

    Is there any way to see if I made a mistake in my selection of subdomain vs. subdirectory?

    Thanks for your help.

  • MichaelScott

    Hi Jack,

    I'll check out the wp-config.php file when I get access to a PC with FileZilla ... I'm not on my own PC at the moment.

    It looks like all I'll need to do is make that change ... define( 'SUBDOMAIN_INSTALL', true ); ... is that the case?

    As I won't be able to make the change, should I check the MARK AS RESOLVED box and close the conversation (remember that I'm a newbie here)?

    Thanks again, and best regards ... Michael

  • Jack Kitterhing

    Hi Michael,

    No problem, you'll also need to change your .htaccess file to this

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ wp/$1 [L]
    RewriteRule . index.php [L]

    That's the .htaccess file for a sub-domain setup.

    For a sub-domain install you should also have this in there.

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

    As I won't be able to make the change, should I check the MARK AS RESOLVED box and close the conversation (remember that I'm a newbie here)?

    No problem :slight_smile: I'll leave this open if you decide to change your install, so you can come back here and post in this thread if your having problems :slight_smile:

    Make sure you take a backup of your current site before trying to change install types in case anything goes wrong :slight_smile:

    Thank you for being a WPMU DEV member!

    Kind Regards
    Jack.

  • MichaelScott

    Hi Jack,

    I don't know if you're still online, but I made the change to my primary wp-config.php file and was able to create the subdomain site in WP Admin (see the first screen shot below).

    But, I can't access the newly created australia site in WP Admin - I just get a HTTP 404 error.

    I looked at what I could see in the /public_html/australia/ directory via FileZilla and notice that the directory has no wp-config.php or .htaccess files (see second screen shot).

    So, I've created the site successfully but can't actually access it. Any clues?

    Thanks ... Michael

  • PC

    Hey Micheal,

    Greetings and thanks for posting back.

    Sorry for the delay here as this thread got marked read in my feed by mistake.

    But, I can't access the newly created australia site in WP Admin - I just get a HTTP 404 error.

    I looked at what I could see in the /public_html/australia/ directory via FileZilla and notice that the directory has no wp-config.php or .htaccess files (see second screen shot).

    That is not how it works. It does not create any directory in public_html.

    Can you please send me your wordpress admin details, FTP and cpanel info etc to our contact form marking it to my attention after selecting I have other question in the contact form and include a link to this thread ?

    Please advise.

    Cheers, PC