WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] multisite subdirectories only leaves me with empty directories. (15 posts)

  1. drrota
    Member
    Posted 1 year ago #

    I'm using WP 3.5. I installed, and got it working under https://mysvr/blog
    I created the subdirectories (mkdir) under the blog directory to correspond to the new subdirectories I wanted to make.
    I enabled access to everything in httpd.conf (I have a working production server with wordpress, so everything looks like the working version I have now.)

    I enabled multisitedness in wp-config.php

    I installed the tukod-multisite-site-names so I could use upperCase letters in the subdir names, etc.

    Then I went to:
    https://mysvr/blog/wp-admin/network/sites.php
    Clicked Add to create my new multisite subdirectories.
    https://mysvr/blog/wp-admin/network/site-new.php
    It showed up just fine in the Network Admin GUI.
    But when I click 'Visit' any of the new subdirs, I only see an empty directory:

    Index of /blog/newName
    Icon Name Last modified Size Description[PARENTDIR] Parent Directory

    When I click 'Dashboard' for them, I see:

    Not Found
    The requested URL /wp-admin/ was not found on this server.

    Based on this last error, I'm thinking that I need to copy all the php files from my current working /blog/ directory to the subdirs?
    and .htaccess files too?
    How do multisite directories work actually?
    (right now all of my subdirs are completely empty...)

    In short, the 'multisite Add' button is not doing all that it is supposed to do. (And there are no errors when you click on it to make any new subdirs.) It just looks like it worked, but obviously there's something that is not working.

    HELP!
    ...Don...

  2. drrota
    Member
    Posted 1 year ago #

    Am I going to have to manually copy all the wp-*php, index.php and .htaccess files from /blog/* to /blog/mydir? (really?) I'm expecting thats what the multisite install should do, but its not doing...

  3. No, don't move anything yet!

    But when I click 'Visit' any of the new subdirs, I only see an empty directory:

    Index of /blog/newName
    Icon Name Last modified Size Description[PARENTDIR] Parent Directory

    What's in your .htaccess file?

  4. drrota
    Member
    Posted 1 year ago #

    Thank you for your quick reply

    In: /opt/stage/http/blog/.htaccess

    # BEGIN WordPress
    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).*) wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
    RewriteRule . index.php [L]
    # END WordPress

    (none of the other subdirs under blog/ have .htaccess files in them. (completely empty)

  5. drrota
    Member
    Posted 1 year ago #

    I've since uninstalled tukod-multisite-site-names, among other things, and restarted the server about 50 times, no luck on anything

  6. drrota
    Member
    Posted 1 year ago #

    I'll be on vacation this week, but I'll check in from time to time.

  7. creativepublishing
    Member
    Posted 1 year ago #

    drrota your problem is this.

    If you look in your htaccess file it has the lines:

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d

    These mean that in order to rewrite the code, there file and directory cannot exist. This keeps the rule from redirecting files in other folders that DO exist.

    The problem? If a directory DOES exist, then it doesn't get rewritten. In a subfolder multisite install, the folders that display in the address bar DON'T actually exist. They are imaginary. Your htaccess file checks if the folder exists, finds out is does, and sends you there.

    The solution?
    Delete the folders you made with mkdir. If the server check for the folder, find out it doesn't exist, then it will redirect to the core wordpress install and work for you. Hope this helps :)

  8. drrota
    Member
    Posted 1 year ago #

    Thanks for your help!

    I removed the directories I had created, restarted the webserver, and reran Site Add to add 'newdir', (no errors), but when I 'Visit Dashboard': https://server/blog/newdir/wp-admin/
    I get:
    Not Found
    The requested URL /wp/wp-admin/ was not found on this server.

    If I try to go to https://server/blog/newdir, I get
    Not Found
    The requested URL /index.php was not found on this server

    Where else can I look for error/log output? I'll try with LogLevel verbose in apache. If I can't find anything, I think its time to uninstall and start over, unless you have any other options?

  9. /opt/stage/http/blog/

    Wait. Where is WP installed and where are you running it out of?

    domain.com/blog?

  10. drrota
    Member
    Posted 1 year ago #

    DocumentRoot "/data/http"
    # wp root = /data/http/blog

    ########### WORDPRESS BLOG ###########
    #
    alias /blog /data/http/blog

    <Directory /data/http/blog/wp-admin>
    Include conf/permissions.conf
    </Directory>

    <Directory "/data/http/blog">
    AllowOverride All
    Options FollowSymLinks
    </Directory>

    #
    ########### WORDPRESS BLOG ###########

    I think I'm at the point where a reinstall is in order. I'm not sure where its picking up the wp/wp-admin reference from. Any last options before I do a do-over.

  11. wp root = /data/http/blog

    And you're running WP out of domain/blog?

    Yes, I'd start over too, to be honest. Something got confused in the middle. I would take care on the re-build to make sure everything works okay as a single site before activating Multisite.

  12. drrota
    Member
    Posted 1 year ago #

    thanks, /blog and /blog/subdir Are both working but any attempt to add /subdir at the context root level of the website does not work. I'll have to see if there are any plugins that can help.

  13. /blog and /blog/subdir Are both working but any attempt to add /subdir at the context root level of the website does not work

    Well ... yeah :)

    If you want to have WP installed in domain.com/blog but LOOK like it's running from domain.com, you have to do that before you set up Multisite.

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

  14. drrota
    Member
    Posted 1 year ago #

    I figured it out....

    The problem is that during the install process these two lines need special attention:

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wp/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]

    'wp/' didn't exist on my server, period.

    after I got rid of that, everything worked

    thanks for the help

  15. Oooh right, because of this:

    I'm using WP 3.5. I installed, and got it working under https://mysvr/blog

    BAH! Can't believe we all missed that!

Topic Closed

This topic has been closed to new replies.

About this Topic