Wanted to add, that I saw the Network Admin link on the top right. But the url is wrong. Instead of seeing http://hostname.usc.edu/network/ I see http://usc.edu/network/
Changing this
define( ‘DOMAIN_CURRENT_SITE’, ‘usc.edu’ );
to
define( ‘DOMAIN_CURRENT_SITE’, ‘hostname.usc.edu’ );
was what you needed to do to fix the issue. In 3.0, having that wrong should not have adversely affected you because it was the parent domain to your install.
Your safest bet here would be to back everything up, create a new multisite installation using sub-directories and re-import your content. Then set up domain mapping to point your separate domains at the new sites.
Unfortunately this is not possible. We need to use hostnames – hence sub-domains. Some of these are large sites. Can you imagine USC’s public web server url to be http://wordpress.usc.edu/www ? I cannot. Similar situation, some of our blog sites which we are hosting on another blog system are public and large volume. We do intend to also use sub-directories but for a separate project.
Obviously WP was not designed to be used as we currently have setup. Now we have to seriously re-consider our use of WP =(
You can install a subdomain install in a subdomain just fine as long as wildcard subdomains are enabled on the DNS and web server.
Since the site’s on a university server, I jumped to the assumption that wildcard sub-domains were out of the question. I doubted the USC would want anyone to be able to create any sub-domain of usc.edu and was trying to recommend a safer course of action.
Unfortunately this is not possible. We need to use hostnames – hence sub-domains. Some of these are large sites. Can you imagine USC’s public web server url to be http://wordpress.usc.edu/www ? I cannot. Similar situation, some of our blog sites which we are hosting on another blog system are public and large volume. We do intend to also use sub-directories but for a separate project.
Obviously WP was not designed to be used as we currently have setup. Now we have to seriously re-consider our use of WP =(
You can still use hostnames for the public URL. I don’t think you’re understanding my repeated suggestion to use domain mapping. If you install a site to http://hostname.usc.edu/subdomain
and then map http://subdomain.usc.edu
to that site, the public will only ever see http://subdomain.usc.edu
. All pages, posts, images, etc will use that as the domain.
Or you can set up 4-level subdomains (http://subdomain.hostname.usc.edu
) and map them to the appropriate real, public domain (http://subdomain.usc.edu
). It’s up to you.
I’ll second Eric: I do something like this at my university and it works pretty well. The plugin is http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/, in case you want to look at it.
@jkhongusc Eric is right – with your correct setup you will still have to use the domain mapping plugin to get the subdomains showing up properly. For new sites anyway. And there’s no need to switch over to subfolders.
for the rest you’re fine right now. Go with what Ron said.
Another live example:
All of these sites are part of the same multisite installation that lives at http://ghmedicalhome.org, but they’re installed as sub-directories because of the way the server is set up. For example, http://drnohle.org was originally installed and configured as http://ghmedicalhome.org/drnohle-org/ until it was ready to launch. Then the correct domain was mapped to the site so the public only ever sees http://drnohle.org.
This is one of the reasons WordPress allows you to use sub-directories for multisite rather than sub-domains. The only major consequence of using sub-directories instead is that your site slugs need to be unique (so they don’t conflict with page slugs on the main site). This can be solved by calling them “site-whatever” and “site-anothersite” because you likely won’t have pages with those slugs. Then use a domain mapping plugin to route traffic …
I saw your post after I posted my comments about sub-directories. Yes, this is a possible work-around. But it wont work for https which is another requirement, unless we have a separate IP address for each host =( Because each hostname has to be mapped to a directory. The other major implication is that it is not as manageable. Every time we create a new site, it would require apache configuration. Just need to think this out more.
Thanks again.
Wow, you guys respond so quickly.
It sounds like I have two options?
1) Sub-domain – Reconfigure WP for sub domain. Main site – hostname.usc.edu and subdomain.hostname.usc.edu. Use domain mapping plugin. Where to map subdomain.hostname.usc.edu to subdomain.usc.edu – in WP/domain mapping plugin?
2) Sub-directory – Reconfigure WP for sub directory. Map hostnames to directories.
I see #1 as the clear winner. Even if I had to start over again. #2 would require httpd configuration changes for every site; and if we require ssl, an IP address for every secure site.
Correct, domain mapping is the way to go in either case.
I’m unclear why you’d need an IP address per site. My server is configured such that no matter how many sub domains or sub directories (we have a mix) there are, only one IP address is needed. This may just be a difference in server config (we set up a wildcard entry in Apache and also have a wildcard SSL cert).
Where to map subdomain.hostname.usc.edu to subdomain.usc.edu – in WP/domain mapping plugin?
There’s a step-by-step tutorial that should help here: http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/ A few of the options have changed in 3.1, but it’s mostly the same.
I’m unclear why you’d need an IP address per site.
It is an ssl requirement. You cannot bind to hostnames only IP address. If you have multiple secure (https) sites server on the same web server, you will need a separate IP address for each one OR your traffic will possibly go to the wrong server. For example from above, go to this url –
http://drnohle.org/
Now try this
https://drnohle.org/
This tells me that drnohle.org (http, port 80) is configured in Apache but (https, port 443) is not. FYI, another server from another domain is responding to the https request and redirecting to a different (non-https) url.
We have quite a few blogs with https requirement. It is always a (necessary) hassle to configure https services due to all the things that need to be configured.
I thought you could make wildcard SSL certs.
Now I have to go bother my guy at work again!
I thought you could make wildcard SSL certs.
You can; that’s what I’ve got at my university.
I thought you could make wildcard SSL certs.
I was not referring to the ssl cert, yes there are wildcard certs which can be used for multiple site. We use them too. I was referring to the listener. You need a unique IP address (port) for each https listener. For example:
<VirtualHost subdomain.usc.edu:80>
DocumentRoot /path/subdomain
</VirtualHost>
<VirtualHost subdomain2.usc.edu:80>
DocumentRoot /path/subdomain2
</VirtualHost>
The above situation is fine for http traffic even if subdomain.usc.edu and subdomain2.usc.edu are the same IP addresses. In fact you can have many hostnames/aliases resolve to the same IP address and have separate VirtualHosts for them.
SSL example-
<VirtualHost subdomain.usc.edu:443>
DocumentRoot /path/subdomain
SSLCertificateFile /path/wildcard.cert
</VirtualHost>
<VirtualHost subdomain2.usc.edu:443>
DocumentRoot /path/subdomain2
SSLCertificateFile /path/wildcard.cert
</VirtualHost>
The above SSL configuration will not work if subdomain and subdomain2 resolve to the same IP Addresses. So each SSL listener essentially needs its own IP address. Side note – if subdomain and subdomain2 were using the same IP address, my guess is that Apache would pick up the first configuration; and the subdomain2 configuration would be ignored. This is not a problem except when you are hosting dozens of SSL sites, becomes cumbersome to manage.