WordPress.org

Ready to get started?Download WordPress

Forums

Trouble with Multi Site Nested subdirectory sunrise.php solution (2 posts)

  1. ryHollingsworth
    Member
    Posted 7 months ago #

    After bashing my head on the keyboard for a few days of tweaking and attempting to figure this out on my own I figured I'd see if someone else already has.

    I've done the tutorial below, along with a few variations of it. From what i can tell, this is the original not copied version.

    As you probably know, you cannot do nested subdirectories in a wordpress multisite out of the box. I need to do this (without multiple installs) to meet the needs of this project. I need site.com/blurb/subsite. This work around uses a quick fix to htaccess and the sunrise.php drop in and boasts it can get it to work. I cannot. It may be due to a 3.8 change, but I'm at a loss.

    (note, there's some html encoding in the first line that should be &&)
    http://www.paulund.co.uk/wordpress-multisite-nested-paths

    here's what i'm getting output in the wp-admin
    (sunrise.php called after the "happy blogging" bit in wp-config.php)

    Warning: Creating default object from empty value in /home/dev55/public_html/wp-content/sunrise.php on line 3 
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/dev55/public_html/wp-content/sunrise.php:3) in /home/dev55/public_html/wp-includes/option.php on line 563 
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/dev55/public_html/wp-content/sunrise.php:3) in /home/dev55/public_html/wp-includes/option.php on line 56
  2. mhawksey
    Member
    Posted 1 month ago #

    In case anyone else is coming to this post the tutorial referenced appears to work. My only variation was to instead of using the rewrite

    RewriteRule ^(.+)?/(wp-.*) /$2 [L]

    to switch to a modification that mirrors the current recommended rewrite of

    RewriteRule ^(.+)?/(wp-(content|admin|includes).*) /$2 [L]

    The only other thing that might catch people out from the tutorial is to include <?php and the function in your sunrise.php file. The file I created is in this gist

Reply

You must log in to post.

About this Topic