This WP-CLI plugin makes the process of moving sites from single WordPress sites to a Multisite instance (or vice-versa) much easier. It exports everything into a zip package which can be used to automatically import it within the desired Multisite installation.
MIT License
329
stars
47
forks
source link
Use base_prefix rather than prefix when fetching db prefix for subsite #44
Very small change -- use $wpdb->base_prefix instead of $wpdb->prefix when fetching database prefix for a subsite.
I found this when I was importing to a site where $wpdb->prefix returned wp_1_ instead of wp_ (on the main site). This may not be a common thing, but it still seems like slightly better practice to use base_prefix, since that's really what we're looking to concatenate with $blog_id . _
Very small change -- use
$wpdb->base_prefix
instead of$wpdb->prefix
when fetching database prefix for a subsite.I found this when I was importing to a site where
$wpdb->prefix
returnedwp_1_
instead ofwp_
(on the main site). This may not be a common thing, but it still seems like slightly better practice to usebase_prefix
, since that's really what we're looking to concatenate with$blog_id . _