WordPress Multisite subdirectory network: subsite URL generation when core is installed in a subdirectory
0 reputation · 17 Mar 2020, 09:12 UTC
0 reputation · 17 Mar 2020, 09:12 UTC
Determine how WordPress Multisite subdirectory network generates site URLs when the WordPress core installation resides in a domain subdirectory rather than the domain root, assuming WordPress core version 6.6 and later behavior where the root is expected at the domain level. The goal is to establish whether URL generation for new subsites produces consistent, predictable patterns that support repeatable development environments.
Constraints and uncertainty: Core functions such as get_blog_permalink() and network_home_url() assume the WordPress root maps to the domain root. When the installation path is a subdirectory, these functions can produce URLs that duplicate the subdirectory segment or omit the network path entirely. The official documentation for Multisite does not address this configuration, and no formal migration or adjustment path is listed in the current core changelog. This gap affects automated deployment scripts that rely on fixed URL schemas for testing and staging workflows. Practical verification can be achieved by installing WordPress in a subdirectory, enabling a subdirectory network, and comparing generated subsite URLs against the expected pattern, though outcomes may vary based on specific option interactions.
Specific questions: What URL pattern does a newly created subsite receive when the network is configured as subdirectory and the core is installed in a subdirectory? Does the siteurl option interaction with home account for a non‑root WordPress path? How can URL generation be standardized across environments without manual path correction?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.