TMCO
560
6
Servers

WordPress Multisite with Valet

Posted 1 year ago by TMCO

I always use Valet for local WP development. It's amazing.

One of the projects I'm working on at the moment requires me to set up a multisite network and during the process asks me to add the following to my htaccess file:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Obviously, I cannot do this as Valet doesn't use Apache.

Any suggestions on a way around this?

:)

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.