WordPress.org

Ready to get started?Download WordPress

Forums

WP3.0 Multi-site fundamentals (10 posts)

  1. Acedafunk
    Member
    Posted 4 years ago #

    Hello,
    I'm trying to setup mutiple sites on the same installation using WordPress3.0. I haven't gotten it to work properly but I think it will fall together if I can get a better understanding of some of the fundamentals.

    So far I've setup a WP network, installed WordPress MU Domain Mapping plugin, set up a wildcard subdomain and my .htaccess file looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    
    </IfModule>
    # END WordPress

    I can set up new sites from superadmin and recieve emails comfirming this, but when I go to view the site I get "internal server error 500".

    Questions:

    1. Does the subdomain that I want to use for my additional WP blog need to exist on the server? (e.g. site1.mysite.com)
    2. Does the subdirectory that I want to use for my additional WP blog need to exist on the server? (e.g. mysite.com/site1)
    3. Do I need to create, copy, or install any files for new sites to work?
    4. If I have a directory for a specified subdomain that I'm using for a new site, does anything go in that directory? (e.g. .htaccess, config.php, WP install???
    5. )

    6. If I create a subdomain called *.mydomain.com, does Apache use the file .htaccess to locate the proper directory containing rules on where to direct the request?

    If anyone can help me with these questions it would be greatly appreciated. Thanks,
    -A

  2. Going to take a stab at this one.

    1. Does the subdomain that I want to use for my additional WP blog need to exist on the server? (e.g. site1.mysite.com)

    Yes, but only if you are using the subdomain multi-site install.

    If you setup a ServerAlias on your existing Apache2 configuration, then that will work.

    ServerName mysite.com
            ServerAlias *.mysite.com
            ServerAlias othername.com
            ServerAlias you-get-the-idea.com

    2. Does the subdirectory that I want to use for my additional WP blog need to exist on the server? (e.g. mysite.com/site1)

    It shouldn't (here's hoping Andrea_r pipes in :) as I only spent 5 minutes on that type of install). The mysite.com/blog1/ mysite.com/blog2/ etc. should be handled by the rewrite rules.

    3. Do I need to create, copy, or install any files for new sites to work?

    Nope! That's a huge point of multi-site installation. Only one set of WordPress files to maintain.

    4. If I have a directory for a specified subdomain that I'm using for a new site, does anything go in that directory? (e.g. .htaccess, config.php, WP install???)

    I think that's covered by #2.

    5. If I create a subdomain called *.mydomain.com, does Apache use the file .htaccess to locate the proper directory containing rules on where to direct the request?

    There are no directories. The .htaccess file helps get the request to the index.php file via RewriteRule . index.php [L]. You will need to add a server alias for *.mydomain.com in your apache configuration (see #1) but the index.php file that the request goes to will handle the multi-site'ness.

  3. Awesome answers Jan! :D

    to Acedafunk - the subdomains that are used by the network do not and will not exist on the server.

    You need a wildcard subdomain record in Apache (as noted above) and *also* in your DNS records.

    in A * your.ip.com

    (something like that)

    Here's what happens - someone visits your site funkalicious.iamsocool.com. Funkalicious exists purely in the database.

    Apache gets the requests, says, "Hey! I don't see a specific record for this, but I have instructions to send it over here" to the WordPress install. The htaccess file says "Dude, serve up the page like this and let 'em on thru." Then WordPress says "I got it, man." looks it up in the db and spits out the content.

    Make sense? :D

  4. Awesome answers Jan! :D

    Totally. :)

  5. Acedafunk
    Member
    Posted 4 years ago #

    Thanks guys! This is very helpful. The shroud of mystery is lifting :)

    I'm using GoDaddy to host my site and their support says, "You can add Wildcard subdomains. However, these must be set as A Records, as CNAME wildcards are not supported".

    I feel like I should be preparing myself for a period of grief. The way I understand it is that CNAME records and aliases are synonymous, and the Apache record is different and controlled outside of the DNS Control Panel. Does that sound right?

    Right now I only have the A record wildcard. Can I still make it work with this webhost?

  6. davidajr
    Member
    Posted 4 years ago #

    I just set this up through GoDaddy as well. I had a single install of WP 2.9.2 for my blog, and when I upgraded to 3.0, i enabled the multisite so that I could add a blog for my wife and my cousin without paying for anymore hosting space or stuff (I am on the economy hosting package with GoDaddy).

    My DNS record for my primary domain already had a wildcard setup. Because I couldn't access Apache, I had to set up my WP multisite with blog directories, not subdomains (i.e., instead of mywifesblog.myblog.com I had myblog.com/mywifesblog) At first this seemed bad, but with the domain mapping plugin, I was able to map my wife's new domain through the wordpress install so you never see the directory structure.

    On the server side, with GoDaddy, I did nothing with my primary domain (because it already had the wildcard A record). For my domains to be mapped, I simply exported the DNS settings from my primary domain and imported them to the domains to be mapped, so that they pointed to the same (shared) IP address, nameservers, etc. Everything else was taken care of in WordPress.

    I'm totally in uncharted waters with this myself, so I was pretty amazed that I could even get it to work. I have noticed my blog has slown down significantly though. Maybe that won't be a problem with you. Keep us posted!

  7. The way I understand it is that CNAME records and aliases are synonymous, and the Apache record is different and controlled outside of the DNS Control Panel. Does that sound right?

    Right now I only have the A record wildcard. Can I still make it work with this webhost?

    Yes. :) An A records is still in your DNS control panel, it doesn't stand for Apache. ;) godaddy has done that part for you.

    Just go in the domain manager, and under the total DNS area, that's where it will be listed. Add a new one with the value of * and pointing to your IP.

    @david awesome you charted the godaddy waters & domain mapping. :D Still dunno why you're getting that slow down.

  8. Acedafunk
    Member
    Posted 4 years ago #

    I was unsuccessful setting up the wildcard from total DNS Control. I called godaddy again and they told me that I need to have a dedicated IP for this type of action. Ugg, how's that for fundamental?

    I can try to set this up with David's method but that would require reconfiguring the install. Not sure what that includes but it sounds complicated. I think I'm going to look into a higher end webhost before I break my back (or spend more money) to make it work with godaddy.

    Again, thanks for everyones help on this!

  9. Yeah, Godaddy makes you get a higher package. :-/ (multisite or networks themselves don't *require* a dedicated IP, that just makes it easier for the webhost)

    Just look for a host that support the wildcard subdomain.

  10. reg288
    Member
    Posted 4 years ago #

    I am having the same issue......

Topic Closed

This topic has been closed to new replies.

About this Topic