[wpmu-trac] [WordPress MU Trac] #641: blog URLs redundantly defined
and hardcoded in DB - headache
WordPress MU Trac
wpmu-trac at lists.automattic.com
Sat May 24 00:21:03 GMT 2008
#641: blog URLs redundantly defined and hardcoded in DB - headache
--------------------------+-------------------------------------------------
Reporter: jeremyclarke | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: component1 | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
While testing an upgrade to 1.5 and moving servers (I used an alternate
domain to set up a staging version on the new server) I noticed that the
SITEURL and HOME options are sometimes used to create links to parts of mu
blogs while other times the information in the 'wp_site' table (for the
root blog) and the 'wp_blogs' table (for root blog and children) is used.
Specifically, it seems that the general existence of the children blogs is
dependent on the wp_blogs table ( 'domain' + 'path' ), while lots of parts
of the admin (the admin blog list, the link to 'view site') depend on the
values stored in the 'wp_options' tables of each individual blog (i.e.
SITEURL and HOME).
Overall, this creates a pretty big annoying mess. It makes it insanely
tedious to set up a working stage backup of site on a new domain because
so many DB values need to be modified, especially considering the fact
that really you should only have to change it in one place, the single row
in 'wp_site'.
Has this come up before? It seems like MU should choose one source for
each blog url and stick to it, at least on a blog by blog basis. Given
what i've seen of the DB structure, the 'wp_blogs' table seems like the
best overarching resource. Could MU just ignore the settings in wp_options
of individual blogs in favor of the values stored in 'wp_blogs'? It seems
like it wouldn't be too hard to override the behavior (or fill the holes
where the old values are still used, seeing as at least some parts of the
system (the MU parts) are already usign the wp_blogs values, because many
thigns worked after i only changed those but hadn't altered the
'wp_options' versions).
Also: using the HOME and SITEURL wp-config.php defines in wp-config.php as
one would with Wordpress.org causes ALL the sites to have their urls
overridden, breaking everything but the root blog.
I.e.
{{{
//define('WP_SITEURL', 'http://siteurl');
//define('WP_HOME', 'http://siteurl');
}}}
Ideally that probably shouldn't happen as there is no reason for someone
to want that behavior (but I can't help thinking other people will try the
same thing and get burnt worse than careful me). If the HOME and SITEURL
constants were changed for the reasons above then ideally they might also
fix this.
In a perfect world you would be able to override the value in 'wp_site' in
wp-config.php and have it affect all the blogs in MU, but that's just me
dreaming (and I can imagine reasons why being ABLE to have multiple
domains on one MU install is useful). Making an option for having multiple
domains (with the default being to use one authoritative domain) could be
a good solution for this.
Thoughts? I'm more familiar with the WP.org world than MU so let me know
if I'm missing something important. I think this would be really useful
for anyone who tends to keep staging and dev servers (which we all should,
right?)
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/641>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list