Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 985 Bytes

multisite.md

File metadata and controls

43 lines (27 loc) · 985 Bytes

Multisite

Note: Doesn't support subdirectory multisite install

Register Service Provider

To add Multisite support to LaraPress, register the MultisiteServiceProvider in your app.php config file.

    LaraPress\Multisite\MultisiteServiceProvider::class,

Follow WordPress Instructions

Found the instructions from WordPress.

Define DB_TABLE PREFIX for LaraPress multisite

  1. Open your wp-config file.

  2. Change the line with:

define('DB_TABLE_PREFIX', $table_prefix = env('DB_TABLE_PREFIX', 'wp_'));

to:

$table_prefix = 'wp_';
  1. 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);