WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP upgrade 3.0.5 -> 3.1.1 broke site (34 posts)

  1. jkhongusc
    Member
    Posted 3 years ago #

    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 );

  2. jkhongusc
    Member
    Posted 3 years ago #

    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.

  3. Tim Moore
    Moderator
    Posted 3 years ago #

    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?

  4. jkhongusc
    Member
    Posted 3 years ago #

    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' );

  5. Tim Moore
    Moderator
    Posted 3 years ago #

    Yes, DOMAIN CURRENT SITE should be:

    define( 'DOMAIN_CURRENT_SITE', 'hostname.usc.edu' );

  6. jkhongusc
    Member
    Posted 3 years ago #

    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/

  7. Tim Moore
    Moderator
    Posted 3 years ago #

    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.

  8. 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?

  9. jkhongusc
    Member
    Posted 3 years ago #

    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!

  10. 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 :/ )

  11. 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.

  12. jkhongusc
    Member
    Posted 3 years ago #

    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 =)

  13. Eric Mann
    Member
    Posted 3 years ago #

    @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 the DOMAIN_CURRENT_SITE constant.
    • All other sites are domain1.site.url and domain2.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 the DOMAIN_CURRENT_SITE constant.
    • All other sites are site.url/sub-site1 and site.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 been http://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 to http://hostname.usc.edu/wp-admin/network, WordPress will always try to redirect you back to http://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.

  14. jkhongusc
    Member
    Posted 3 years ago #

    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.

  15. Ron Rennick
    MultiSite Guru
    Posted 3 years ago #

    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 site

    From 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

    http://commons.gc.cuny.edu/

    which is a subdomain install and has subsites like http://mysite.commons.gc.cuny.edu/

  16. Eric Mann
    Member
    Posted 3 years ago #

    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.

  17. Ron Rennick
    MultiSite Guru
    Posted 3 years ago #

    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.

  18. jkhongusc
    Member
    Posted 3 years ago #

    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 =(

  19. Eric Mann
    Member
    Posted 3 years ago #

    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.

  20. Eric Mann
    Member
    Posted 3 years ago #

    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.

  21. Tim Moore
    Moderator
    Posted 3 years ago #

    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.

  22. @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.

  23. Eric Mann
    Member
    Posted 3 years ago #

    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.

  24. jkhongusc
    Member
    Posted 3 years ago #

    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.

  25. jkhongusc
    Member
    Posted 3 years ago #

    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.

  26. Tim Moore
    Moderator
    Posted 3 years ago #

    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).

  27. Eric Mann
    Member
    Posted 3 years ago #

    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.

  28. jkhongusc
    Member
    Posted 3 years ago #

    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.

  29. I thought you could make wildcard SSL certs.

    Now I have to go bother my guy at work again!

  30. Tim Moore
    Moderator
    Posted 3 years ago #

    I thought you could make wildcard SSL certs.

    You can; that's what I've got at my university.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.