https://github.com/objectivco/wordpressmultisitesubdirectoryvaletdriver
A Laravel Valet Driver for WordPress Multisite (with subdirectory configuration)
https://github.com/objectivco/wordpressmultisitesubdirectoryvaletdriver
Last synced: 11 months ago
JSON representation
A Laravel Valet Driver for WordPress Multisite (with subdirectory configuration)
- Host: GitHub
- URL: https://github.com/objectivco/wordpressmultisitesubdirectoryvaletdriver
- Owner: Objectivco
- License: gpl-3.0
- Created: 2017-01-10T17:41:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T14:42:04.000Z (about 7 years ago)
- Last Synced: 2025-07-06T14:07:34.476Z (12 months ago)
- Language: PHP
- Homepage: https://objectiv.co
- Size: 15.6 KB
- Stars: 65
- Watchers: 2
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress Multisite Subdirectory Valet Driver
A custom driver for [Laravel Valet](https://laravel.com/docs/master/valet) that adds compatibility for WordPress multisite installs that use the subdirectory configuration.
## Installation
1. `git clone https://github.com/Objectivco/WordPressMultisiteSubdirectoryValetDriver.git`
2. `cd WordPressMultisiteSubdirectoryValetDriver`
3. `cp WordPressMultisiteSubdirectoryValetDriver.php ~/.config/valet/Drivers`
4. Make sure your wp-config.php file has at least one of WP_ALLOW_MULTISITE or MULTISITE constants defined.
5. 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.
## Caveats
This only works with the subdirectory URL scheme. If you have a subdomain site setup with Valet, this driver will probably break it. You'll need to modify the `serves()` function to prevent this driver from handling the request.