Note: Doesn't support subdirectory multisite install
To add Multisite support to LaraPress, register the MultisiteServiceProvider in your app.php config file.
LaraPress\Multisite\MultisiteServiceProvider::class,
Found the instructions from WordPress.
-
Open your wp-config file.
-
Change the line with:
define('DB_TABLE_PREFIX', $table_prefix = env('DB_TABLE_PREFIX', 'wp_'));
to:
$table_prefix = 'wp_';
- Below
require_once(ABSPATH . 'wp-settings.php');
, add the following. This adds the correct prefix for LaraPress queries.
// define table prefix for larapress
global $wpdb;
define('DB_TABLE_PREFIX', $wpdb->prefix);