andrewminion/wordpress-multisite-subdirectory-valet-driver

A custom driver for Laravel Valet that adds compatibility for WordPress multisite installs that use the subdirectory configuration.

2.1.0 2023-03-16 16:46 UTC

This package is auto-updated.

Last update: 2024-04-16 19:23:09 UTC


README

A custom driver for Laravel Valet that adds compatibility for WordPress multisite installs that use the subdirectory configuration.

Compatibility

Valet Version Driver Version
3.x 1.x
4.x 2.x

Installation (Composer)

  1. composer global require andrewminion/wordpress-multisite-subdirectory-valet-driver
  2. cp $(composer global config home)/vendor/andrewminion/wordpress-multisite-subdirectory-valet-driver/WordPressMultisiteSubdirectoryValetDriver.php ~/.config/valet/Drivers
  3. Make sure your wp-config.php file has at least one of WP_ALLOW_MULTISITE or MULTISITE constants defined.
  4. Celebrate the pain you just avoided!

Installation (Manual)

  1. Clone this repo
  2. cp WordPressMultisiteSubdirectoryValetDriver.php ~/.config/valet/Drivers
  3. Make sure your wp-config.php file has at least one of WP_ALLOW_MULTISITE or MULTISITE constants defined.
  4. Celebrate the pain you just avoided!

Installs with WordPress root files in a subdirectory

If your install has WordPress root files in a subdirectory (such as a submodule), simply change the class property $wp_root from false to the root directory name.