Opened 12 years ago
Closed 11 years ago
#22701 closed enhancement (wontfix)
Allow the use of SITEURL and HOME constants for Multisite Installations
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Multisite | Keywords: | |
Focuses: | Cc: |
Description
This is a proposal to allow the use of the SITEURL and HOME constants, as we do with single site installations.
My proposal would be to follow the naming conventions put forward by the database schema for multisite installations.
Example for a constant override of the siteurl and home option for blog_id 3.
define('WP_3_SITEURL', 'http://example.com');
define('WP_3_HOME', 'http://example.com/wp');
Change History (7)
#2
follow-up:
↓ 3
@
12 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
- Version trunk deleted
#3
in reply to:
↑ 2
@
12 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Replying to markoheijnen:
This is why you have a admin network panel. It doesn't make sense to have it in your wp-config.php file.
Also a dynamic constant is ugly way to develop and the admin network panel is the better way to deal with this
You can't get to the Network Admin UI if you are importing a database from an existing site... You have to manually update the database.
The use case here would be mainly for development purposes, and clean database interop between environments.
You have a local database where you do local development, a staging environment, and a production environment. Most likely all of these environments will differ on these options and the only alternative is to manually update the database if you want to set up a new environment. A way to override (just like we do with single site installs) with a config file would make this process a lot less painful.
#5
@
12 years ago
I'd be open to seeing a patch, though this sounds like the job of the option_home and option_siteurl filters.
#6
@
12 years ago
I still think you doing it wrong. You should not move databases this way. If you do try to use a plugin that does this for you.
Also it seems so much easier to use some magic sql queries to change the urls. In the rare cases I need something like that I used that.
Also in my way of thinking the constants are used to make sure the url's can't be changed through the interface. What makes sense when not experienced users have that access.
#7
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from reopened to closed
This doesn't seem to be an approach that belongs in core. For specific dev situations, this is probably best handled through filters or custom routing in sunrise.php
.
Closing as wontfix. Feel free to reopen with a patch or more discussion.
This is why you have a admin network panel. It doesn't make sense to have it in your wp-config.php file.
Also a dynamic constant is ugly way to develop and the admin network panel is the better way to deal with this