URL Issues when using Bedrock with Multisite

I have recently set up my first multisite with Bedrock, and I have encountered several issues where the URLs are not correct. After some investigation, I figured that the issues are a result of a problem in WordPress Core - in some places it does not honor the site URL setting. This is no problem with a regular WP install, but when WordPress is installed in a subdirectory as it is in Bedrock, the site URL is different from the home URL. The most significant problem is that some areas in the network admin will direct me to /wp-admin instead of /wp/wp-admin, for example when you’re on the My Sites section and click on “Edit Site”.

I have fixed this problem now by adding some filters, but I’m just curious if we could integrate a fix for this into Bedrock. To be clear, it is not a Bedrock bug, but since Bedrock relies on WP Core being in a subdirectory, it would be great to have it supported out of the box, maybe in a must-use plugin. I would be glad to share my approach.

2 Likes