WP upgrade 3.0.5 -> 3.1.1 broke site
-
We have a working WP 3.0.5 configured with multi-site. We have about 15 different hosts; and all is working well!
I created a replication of our production site on a test system. I used the automatic upgrade to upgrade to 3.1.1. The upgrade went smoothly. After the update, I noticed differences in the wp-admin interface. I lost the “Super Admin” menu on the left and no longer see the Network configuration. To me it looks like we lost multi-site capability (network is turned off). I can still access my other sites by directly going to their admin url http://<site>/wp-admin but now I cannot create or manage new ones.
Any ideas? Here are some of the settings I use in wp-config.php
define( ‘NOBLOGREDIRECT’, ‘https://<myhost>/error.html’ );
define( ‘WP_ALLOW_MULTISITE’, true);
define( ‘MULTISITE’, true );
define( ‘SUBDOMAIN_INSTALL’, true);
$base = ‘/’;
define( ‘DOMAIN_CURRENT_SITE’, ‘usc.edu’ );
define( ‘PATH_CURRENT_SITE’, ‘/’ );
define( ‘SITE_ID_CURRENT_SITE’, 1 );
define( ‘BLOG_ID_CURRENT_SITE’, 1 );
-
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/
It is missing the hostname.
Even if I try to use the proper url I get redirected to the wrong one.
The URL usc.edu/wp-admin/network is correct. The Network Admin is available from the root of your install (usc.edu), not from each individual blog.
Does the URL not work at all? If not, what’s the error?
The URL usc.edu/wp-admin/network is correct. The Network Admin is available from the root of your install (usc.edu), not from each individual blog.
Our root install is on http://hostname.usc.edu/ I installed WP on hostname.usc.edu usc.edu is a completely separate server (nothing to do with WP) – http://usc.edu/ is incorrect. When I access http://hostname.usc.edu/network/ WP will redirect me to http://usc.edu/network/ (which again is another server)
This behavior is different than 3.0.5. We never had that problem. Must be some configuration issue. Could it be the –
define( ‘DOMAIN_CURRENT_SITE’, ‘usc.edu’ );Yes, DOMAIN CURRENT SITE should be:
define( 'DOMAIN_CURRENT_SITE', 'hostname.usc.edu' );
Yes, DOMAIN CURRENT SITE should be:
define( ‘DOMAIN_CURRENT_SITE’, ‘hostname.usc.edu’ );
FYI – Setting the above configuration our 3.0.5 WP installation not work properly! I forget the exact behavior, but the other hosts/virtual hosts on the systems would redirect to hostname.usc.edu (from wp-admin) and we would not be able to configure the blog site. Plus ‘usc.edu’ is our domain. It seemed odd to use a hostname. So maybe DOMAIN_CURRENT_SITE is behaving differently than the previous WP installation.
Our configuration is like (changed hostnames).
Main site – http://hostname.usc.edu/
Virtual host 1 – http://vh1.usc.edu/
Virtual host 2 – http://vh2.usc.edu/
Virtual host 3 – http://vh3.usc.edu/Yeah, you aren’t doing things the standard way. To get virtual hosts like http://vh1.usc.edu, your main site should be http://usc.edu/. To use http://hostname.usc.edu/ as your maine site, you’d get http://vh1.hostname.usc.edu/ for virtual hosts.
If this was working before, it was likely a Core file hack and that Core file has been changed back to the WordPress default. I’m not sure how you’d go about fixing it.
FWIW, WordPress doesn’t really work right for subdomains if you have it installed in a non-root folder.
Though you CAN’T in your case and that means we really don’t know how you set it up :/
Are you domain mapping the virtual subdomains or something?
USC WP multi-site setup
Main site – http://hostname.usc.edu/
Virtual host 1 – http://vh1.usc.edu/
Virtual host 2 – http://vh2.usc.edu/
Virtual host 3 – http://vh3.usc.edu/I can assure you that our WP 3.0.5 setup had no core file modifications and worked with the virtual hosts outlined above. There was no documentation on the design (use-case) for multi-site that I read. USC (U. of Southern California) is a large institution. We do not have access to usc.edu which is really http://www.usc.edu – that is our public site. Our requirement was that we needed to make blogs for depts or other various events; and we could only have a 3 level hostname (myblogsite.usc.edu). A 4 level hostname (mysite.blogs.usc.edu) is not
adequate.I assure you that I followed the multi-site setup almost exactly as outlined in documentation to get it working. The only thing that I did differently was the DOMAIN_CURRENT_SITE setting. There are NO non-root folders (there is only 1 WP installation – dir/files). All virtual mapping is configured in Apache to go to WP. For example (httpd.conf):
<VirtualHost *:80>
ServerName hostname.usc.edu
DocumentRoot /wp/path
.
.
.
</VirtualHost>BTW, thanks for your prompt responses!
What you did is called ‘domain mapping’ actually ๐ Virtual hosting is kinda the same thing. The PROBLEM is that … well, as you’re finding out, it doesn’t really work right… (and no, you don’t need to hack core!)
I’m pinging the experts on domain stuff, because in my experience, what you did never worked!
(I know what USC is, I went to USCS – BANANA SLUGS! – and I actually remember the insane naming conventions for domains :/ )
Yeah, whatever you had working before woudl have been using an explout or loop hole, which is probably “fixed” now. Near as I can guess.
When I access http://hostname.usc.edu/network/ WP will redirect me to http://usc.edu/network/ (which again is another server)
This behavior is different than 3.0.5. We never had that problem. Must be some configuration issue. Could it be the –
define( ‘DOMAIN_CURRENT_SITE’, ‘usc.edu’ );Only in the sense you’ve configured you site differently that the normal setup.
What you did was something we consistently (and repeatedly) tell people is not possible nor recommended, for these reasons. And yeah, it;s documented.
For not being able to access network admin – it *will* redirect to the home site. This is new for 3.1. If you’ve mucked up your home site, there ya go.
Not being able to even see the admin menu? Well, it check for is_super_admin.
I’m just doing a brain dump right now though, with initial thoughts.
Sorry if I use the wrong terms. Those arent really virtual hosts, they are really aliases that resolve to the main sites hostname. But it is within a ‘VirtualHost’ directive =) Specifically it could be called ‘domain mapping’ but the thing is that our domain does not go through this server. This server serves the entire domain, but we have a load balancer (and DNS) than controls what hostnames are routed to it.
I might add that it worked out really well! http and https to the main or other sites resolved perfectly… even if it was not intended to work that way.
If you were on the East coast, there is another ‘USC’ U. of South Carolina =)
@jkhongusc: First let me clarify a couple of things for how multisite is “supposed” to work (as in, working any other way is likely the cause of a bug or a server configuration error).
With Sub-domains
- Your main site is
site.url
. This is also the entry in the wp-config.php file for theDOMAIN_CURRENT_SITE
constant. - All other sites are
domain1.site.url
anddomain2.site.url
and so on. - Your network admin is at
site.url/wp-admin/network/
With Sub-directories
- Your main site is at
site.url
. This is also the entry in the wp-config file for theDOMAIN_CURRENT_SITE
constant. - All other sites are
site.url/sub-site1
andsite.url/sub-site2
and so on. - Your network admin is at
site.url/wp-admin/network/
Normally, you shouldn’t be using a subdomain as your root WordPress installation for a multisite setup if you’re going to try to use subdomains … this would lead to strange behavior requiring new sites to be
domain1.subdomain.site.url
and probably won’t work with your DNS setup unless you’re doing it all on your own and have things set up already.For a new installation on a
.edu
site with a sudomain, I would have actually recommended you use subfolders instead. Then your sites would have beenhttp://hostname.usc.edu/site1
and so on. Now that your sites are set up, though, you can’t go back to that … well, you can, it’s just tricky.Once you have your sites living in virtual subfolders, you would use a domain mapping plugin to map your virtual hosts to the right place. So in Apache you’d keep the virtual host setup you have, but you’d install something like MU Domain Mapping in WordPress and tell WordPress which domain belongs to which site. It will handle the rest for you.
As it stands, your installation is very seriously damaged. The network dashboard URL is taken directly from the
DOMAIN_CURRENT_SITE
constant in wp-config.php … so even if you try to manually navigate tohttp://hostname.usc.edu/wp-admin/network
, WordPress will always try to redirect you back tohttp://usc.edu/wp-admin/network
.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.
Not being able to even see the admin menu? Well, it check for is_super_admin.
I was logging in as the Super Admin. After the upgrade to 3.1.1, the Network Admin url did not work because it was redirecting me to usc.edu/wp-admin/network which is on another server. Changing
define( ‘DOMAIN_CURRENT_SITE’, ‘usc.edu’ );
to
define( ‘DOMAIN_CURRENT_SITE’, ‘hostname.usc.edu’ );That fixed the Network Admin redirect. But now I am concerned that our setup, which is non-standard and could break (not work) at any point in this release (3.1.1) or future ones.
Are we the only ones with that type of hostname requirements – where the blog sites are not a subdomain of the main site? I can assure you the sponsors of our blogs and the public do not like 4 level hostnames. Our team builds a large number of sites (over 100). We are hoping that WP would fit our needs. We are trying to transition away from MT. Also looking at Expression Engine. So far though our team likes WP.
you shouldn’t be using a subdomain as your root WordPress installation for a multisite setup if you’re going to try to use subdomains … this would lead to strange behavior requiring new sites to be domain1.subdomain.site.url and probably won’t work with your DNS setup unless you’re doing it all on your own and have things set up already.
Actually, that’s not the case. You can install a subdomain install in a subdomain just fine as long as wildcard subdomains are neabled on the DNS and web server.
subd.domain.com <– main site
subsubd.subd.domain.com <– sub siteFrom a DNS and wildcard subdomains in your vhost config subsubd.subd is a valid subdomain as is subsubsubd.subsubd,subd. A live working example of that is
which is a subdomain install and has subsites like http://mysite.commons.gc.cuny.edu/
I can assure you the sponsors of our blogs and the public do not like 4 level hostnames. Our team builds a large number of sites (over 100). We are hoping that WP would fit our needs. We are trying to transition away from MT. Also looking at Expression Engine. So far though our team likes WP.
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 …
A live example …
http://thepeoplebuilders.com is the main site of a multisite installation. The blog (http://thepeoplebuildersblog.com) is mapped to a sub-directory of the main site because the host doesn’t allow subdomains. - Your main site is
- The topic ‘WP upgrade 3.0.5 -> 3.1.1 broke site’ is closed to new replies.