You’ll want to include the wp-load.php
, not the wp-config.php
.
Depending on how you’re doing it, you may also have to set $_SERVER
variables if they aren’t already set to prevent WordPress from trying to redirect you. For example:
$_SERVER = array(
"HTTP_HOST" => "http://example.com",
"SERVER_NAME" => "http://example.com",
"REQUEST_URI" => "https://wordpress.stackexchange.com/",
"REQUEST_METHOD" => "GET"
);
Related Posts:
- find a random blogid across my multisite network that has at least one post published
- Use WordPress MultiSite (WPMS) with a remote database for each created site
- WP DB Location for “Next Post to Create” Index Value
- How can I trust switch_to_blog()?
- DB connection error after copying a WordPress Multisite instance to a second location
- Add WordPress MU Network Admin via Database
- How to tell which database tables belongs to which multisite site
- what are pmxi tables? [closed]
- Shared table across network
- Multisite posts in categories on network
- Multisite: How to store global options vs. site options?
- Uploading/Deploying a Multi Site Install
- Multisite database upgrade SSL error
- Configure WordPress to read from database only, never write
- WPDB Multiple site’s posts and get featured images
- Multiple Domains and Subdomains Using Multisite Installation
- Is it possible to fix/repair all Index, Primary Key, Unique (and all other) structure of a WordPress MS Database
- Migrating WPMS from apache to IIS7 causes Database Error
- Synchronizing Two WordPress Sites Content
- How to clone and locally run a network for testing
- Two WordPress sites sharing the same database
- Creating a Post form outside of the Admin
- Using $wpdb Class to Pull Recent Comments Across a Network
- Is it possible to import a wordpress backup from a single site in to a multi-site configuration?
- Split a database will improve performance?
- How to Move Local Singlesite Database to Remote Multsite Database?
- Multisite Subdomain Using More Resources Than Others?
- How to change the database prefix in multisite (WPMU) install
- How to order by blog ID in this multisite ‘List Blogs’ custom function
- Importing Multiple DB to one MU database
- Make WordPress Search for Both Main Domain and Subdomain
- Does WordPress MultiSite use separate MySql databases?
- Multisite setup creating custom table
- Is there a way to run upgrade.php for one blog?
- Within the database, where is the flag which says that a user has Super Admin rights?
- Bulk activate a theme on multisite
- Migrating Multisite – Database error, missing wp_blogs table
- How to store custom user data on the database?
- WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file! [closed]
- Retrieving multisite blog IDs, somehow failing to foreach them properly
- Network Plugin Creating Pages for Different Subdomains
- Database Tables Lost Indexes? How to Recover?
- Optimizing Query used for a Shortcode
- Installed domain-based Multisite but can’t access wp-admin (redirect loop)
- Multiple multisite instances connecting to the same database
- WordPress Multisite – can I somehow merge the tables?
- Multisite with subfolders- can’t access main site- Error establishing a database connection
- Create a database for each site created in multisite?
- Will changing the folder name two directories above a fresh wordpress installation break the site?
- WordPress Multisite blogs not working after domain swap
- Least expensive way to get table prefix in multisite installation
- 2 website 1 database… Local to online
- new multisite, old db
- Removing Mutlisite lines stop DB connection
- how to migrate wpmu from one host to the other?
- How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]
- Share DB tables between two blogs on the same WP Multisite installation
- How can I create blog specific database table in multisite?
- How many databases do I need?
- Locking one blog of many in a multi user/blog WordPress installation
- WordPress Multisites or Multiple WP Single sites?
- $wpdb->update prefixes database name to table when executing query
- WP MultiSite: Can’t select database error after changing to new domain
- Update WP install to WP network & it broke the DB connection
- Check if current site ID and value exist in WPDB
- Sharing users across multiple sites, each on their own database
- importing data into wordpress db
- How to share User Database between Two Multisite Installations + More
- Multi-site site nav, wpdb->prepare missing argument
- WP MS: How to query over the network
- How long is “as long as possible” in wp_cache_set()?
- WPMU on MySQL limited to 1GB of space?
- Questions about MU database schema and how to list all blogs
- How does WP decide how to evaluate database integrity
- How to use the same users table on multiple wordpress sites
- A database for each category?
- Problems with WordPress multisite directories/url structures and admin access after migration
- allow multisite in the installation process
- How to have differents sites share the same tables of DB?
- Error establishing a database connection after moving local wordpressmultisite from one directory to another
- Will resetting my database affect other sites on my multisite WordPress install?
- WordPress Database Cleanup
- Optimal setup for Multi Domain WordPress with Woocommerce
- WordPress automatic Login on other page?
- How to reconnect database to existing wordpress multisite setup after changing site name
- Multi-site database upgrade claims success, but db_version not updated
- Get multisite count without php?
- Multiple domain with one database
- Problem in adding new site on WP multisite
- WordPress and SQL – Update and Insert from another table if column value doesn’t exist
- Shared Custom post type between WP network sites
- MySql Database In WordPress Multisite
- Error establishing a database connection – Multi-site with subsite don’t exisit [duplicate]
- Plugin data shared in Multisite
- Run “get_the_post_thumbnail” with a different table prefix?
- Merging versions of wp_posts based on post_title
- WordPress multisite and one database
- WordPress Multisite platform for different city for single db
- Is there a full explanation on how to share a database with two WordPress sites on same server?
- HyperDB, Multisite – on new site creation put site’s tables to specific database