$wpdb->base_prefix
gets the original prefix (ie, the ‘root’ site in a Multisite installation). It was added in Version 3.0.0, right when Multisite became a part of WordPress core.
$wpdb->prefix
will get the prefix for the current site in a Multisite installation.
Per the documentation for the wpdb
class:
$prefix
The assigned WordPress table prefix for the site.$base_prefix
The original prefix as defined inwp-config.php
. For multi-site: Use if you want to get the prefix without the blog number appended.
(emphasis added)
Related Posts:
- Multisite on Windows with wildcard subdomains
- WordPress Multisite – When a user signs-up on main site, how to add the user to a subsite
- create /blog subsite on WordPress multisite
- Post and Page Inheritance to subsites in a WordPress Network
- Roles other than Super admin accessing manage_network_themes
- How would I compare and remove hacks to core?
- Memory needed to host 200 wordpress sites?
- How to manage hundreds of WordPress sites?
- Multisite – Retrieve the same theme option from all sites of the network
- At MultiSite Network Update “Can’t Resolve host”, override and continue updating
- Creating multiple blogs
- Multisite Login Issues
- Multisite Conditional (if blog_id?) in a page template?
- WPMU vs WordPress MultiSite is there a difference anymore?
- Can I install a theme on only one site of a multi-site network install?
- Creating a Dev box from an existing production machine?
- Force Network Admin Dashboard to 1 column on wordpress multisite
- Can I run a second wordpress site as a subdomain without using multisite?
- Shared upload folder in wordpress multisite
- What are the differences in capabilities between the super-administrator and administrator?
- WordPress multisite with different domain
- Rewrite rules in multisite
- Emailing only the users of a MultiSites Sub-Sites
- wp_logout_url isn’t forwarding to correct link
- Delete options from all blogs on plugin uninstall from a network/multisite
- Clone a wordpress website with same functionality, but different content
- Stuck with WordPress Multisite Custom signup page without .htaccess modification
- wp-admin redirect loop with ssl
- wordpress multisite, https for whole site or just admin?
- Multisite network admin – URL / redirect error
- WPMU – new users are automatically subscribed to the main blog – how to prevent that?
- WordPress MU and nested sites addresses?
- Removing “Sub-menus” from My Sites Drop-down in Admin Bar
- Multi-site vs seperate installs for just 3 blogs?
- Installing WP twice in same Directory?
- wp_signon( $creds, false ); not working
- How deactivate the http-api
- MultiSite Move conjures duplicate URL
- How to query WP Multisite primary site link
- WordPress multisite in subdirectory, not root, and remove base folder from url
- No My Sites link after installing Multisite
- Buddypress on Multisite – Member List
- Create batch of sites WordPress MultiSite
- Call to undefined function wp_get_sites()
- Pushing stored procedure to a multisite database in WordPress
- Child Theme activates, but nothing from parent theme displays (MAMP, Multisite)
- How do you disable account activation in WPMU and then log the user in right away?
- Error uploading files bigger than 58 MB
- Can you install / activate the multisite when the install is in a subfolder?
- In multisite environment which is the most Popular blog?
- Share reusable blocks between network sites
- WordPress rewrite multisite blog url
- How to transfer existing WordPress website to new multisite wordpress domain?
- Can Multisite run without domain name in WordPress?
- Copying media from multisite subsites to main website
- Link structure, WordPress IIS
- Going multisite with www prefix
- WordPress sub-domain multisite 505 error
- WordPress Multisite blogs not working after domain swap
- How to create multisite roles with predefined themes
- Can I safely remove banned names from WordPress?
- Multisite install w/ Sub domains on a subdomain
- WordPress front end posting to multiple blog in multisite with advanced custom field
- Simplest way to query with blog_id?
- WordPress Multisite – Load users using custom query
- Detach site from multisite (turn off multisite)
- How to wordpress multi site [closed]
- Is it possible to load wp-content/uploads from another server?
- Domain Mapping subsites of an Add-on Mulsite Domain
- Trying to change active theme on all sites in Multisite
- Multi-Site / Single Site Decisions
- Multi-site site nav, wpdb->prepare missing argument
- What’s the best way to get posts from one multisite blog into another?
- Publish all network posts to the primary site
- query multisite blog for post by tag
- WordPress Multisite on multiple sub-domains
- How to migrate post media from stand-alone to multisite build
- Multisite network admin login redirect
- Seeking solution to sync wordpress sites with Server
- Multisite with Different URLs on Local Server
- All Multisites are working as one site
- How to add WordPress site to multisite network when both are addon domains
- Get posts by user role in a Multisite
- WPLANG option not available in localhost
- How can I make my existing VIP theme to multisite
- how to make a cronjob run, when user needs to be logged in
- After cloning my WordPress database to another server, I cannot log in
- All Subsites of a WordPress Multisite install 302 redirects to the main site
- How to find the site ID on a single site and then add new post with “`multipart/form-data” enctype?
- WordPress Domain Mapping shows new domain in place but takes me to the sub domain
- How can I have different langauges in wp-admin on a multisite installation?
- Problem in viewing recent posts from network site to main site
- Send data using GET method not work correctly
- How to create Network of websites with separate database in WordPress
- WordPress multidomains and subfolders
- WordPress shows death white screen on multisite
- Create service similar to wordpress.com [closed]
- External rewrite rules missing in htaccess – Multisite
- 404 error in dashboard of subdomain of multisite
- WordPress Multisites