A custom driver for Laravel Valet that adds compatibility for WordPress multisite installs that use the subdirectory configuration.
Valet Version | Driver Version |
---|---|
3.x | 1.x |
4.x | 2.x |
composer global require andrewminion/wordpress-multisite-subdirectory-valet-driver
cp $(composer global config home)/vendor/andrewminion/wordpress-multisite-subdirectory-valet-driver/WordPressMultisiteSubdirectoryValetDriver.php ~/.config/valet/Drivers
- Make sure your wp-config.php file has at least one of
WP_ALLOW_MULTISITE
orMULTISITE
constants defined. - Celebrate the pain you just avoided!
- Clone this repo
cp WordPressMultisiteSubdirectoryValetDriver.php ~/.config/valet/Drivers
- Make sure your wp-config.php file has at least one of
WP_ALLOW_MULTISITE
orMULTISITE
constants defined. - Celebrate the pain you just avoided!
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.