-
Notifications
You must be signed in to change notification settings - Fork 84
0. Installation
LudicrousDB is a WordPress database drop-in. Activating it as a normal plugin is not enough because WordPress creates its database object before ordinary plugins load.
Place one copy of the ludicrousdb directory in one of these locations:
wp-content/plugins/ludicrousdb/wp-content/mu-plugins/ludicrousdb/wp-content/db-plugins/ludicrousdb/
The directory must be named ludicrousdb unless LDB_DIRNAME explicitly names
a different directory. GitHub source archives add a branch or version suffix;
rename the extracted directory before continuing.
Do not keep duplicate copies in several plugin directories. The db.php loader
uses the first matching location.
Copy these files from ludicrousdb/drop-ins/:
| Source | Destination | Purpose |
|---|---|---|
db.php |
wp-content/db.php |
Loads LudicrousDB before WordPress creates $wpdb. |
db-error.php |
wp-content/db-error.php |
Handles fatal database connection errors. |
db-config.php |
db-config.php beside wp-config.php
|
Defines databases, datasets, and callbacks. |
The configuration file may instead live at wp-content/db-config.php, one
directory above the WordPress root when that directory is not another WordPress
installation, or at a path defined by DB_CONFIG_FILE.
Do not manually require wp-content/db.php from wp-config.php. WordPress loads
that drop-in automatically during require_wp_db().
With WP-CLI available, run:
wp eval 'echo get_class( $GLOBALS["wpdb"] );'The result should be LudicrousDB. If it is wpdb, see
Troubleshooting.
Before editing production routing, back up every affected database and test the same configuration against staging data.
LudicrousDB documentation · Repository · Support