I’m trying to figure out a way of making it so that each blog gets its own table prefix instead of just getting the standard wp_2_*, wp_3_*, etc.
For example, when you create a new blog in the Add Site section of the Sites page, it asks for a “Site Address”. If you create two blogs, one at
/blogs/<strong>personal</strong>, and one at
/blogs/<strong>school</strong>, then they would use personal_* and school_* for their tables in the database.
(Yes, I know that this does not help with security, but it certainly does help with maintenance.)
It looks like the primary place to make a change would be in the function
get_blog_prefix in wp-db.php. It seems as though all that’s necessary is to change
$this->base_prefix . $blog_id. (Yes, existing tables would need to be renamed, etc., but I’m just interested in the coding changes for the moment.)
Would that work? Is that sufficient to correctly handle newly created blogs? How can I get the site address that was entered in the Add Site form to replace
Thanks a lot.