Skip to content

A Laravel Valet (v4+) Driver for WordPress Multisite (with subdirectory configuration)

License

Notifications You must be signed in to change notification settings

lushkant/wordpress-multisite-subdirectory-valet-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

WordPress Multisite Subdirectory Valet Driver (Latest/Updated For Valet v4+)

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

This is a fork of a Valet Driver made by Objectivco. But that driver got outdated and didn't work for the latest Valet, so I fixed it and thought why not publish it for anyone else who is looking for the same, without needing to look into the What and Whys of Laravel Valet.

Installation

  1. git clone https://github.com/lushkant/wordpress-multisite-subdirectory-valet-driver.git
  2. cd wordpress-multisite-subdirectory-valet-driver
  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.

About

A Laravel Valet (v4+) Driver for WordPress Multisite (with subdirectory configuration)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages