Skip to content

Backgrounds

How-to Guides

Technical References

Multisites /

Subdomains & subdirectories

By default the VIP Platform provisions WordPress multisites with a subdirectory structure. However, after a subsite is created with the subdirectory structure the URL for the subsite can be edited and replaced with an entirely new URL. This allows for many different URL structures for subsites within a single multisite such as:

  • A pure subdirectory multisite, with site addresses, e.g., example.com/one and example.com/two
  • A multisite using custom domains and subdomains, with site addresses, e.g., another.example.com and further-example.com
  • A multisite using a mix of both, with site addresses, e.g., example.com, example.com/oneanother.example.com, and example-another.com/two

To achieve the same effect as a subdomain multisite, custom domains and subdomains can be mapped to subsites, e.g. one.example.com, two.example.com, etc.

Subdirectories

By default the VIP Platform supports a subdirectory site with a single segment path, e.g. example.com/one.

To enable a subdirectory site path with two segments, e.g. example.com/one/two (both one and two segment paths, as well as a custom domain), a filter must be added to /vip-config/client-sunrise.php:

function my_filter_site_by_path_segments_count( $num_segments ) {
        $num_segments = 3;
        return $num_segments;
}
add_filter( 'site_by_path_segments_count', 'my_filter_site_by_path_segments_count', 99 );

Last updated: September 06, 2021