• Resolved dbeltramo

    (@dbeltramo)


    I am setting up a multisite installation using subfolders on our corporate intranet. The problem is that we can’t upload media to subfolder sites (uploading media to the main root site works fine). In the admin dashboard for a subsite, if I navigate to Media and try to add a new .jpg file, WP seems to think it’s added, but the thumbnail has a broken image icon, and if I try to edit the image, WP tells me the image data does not exist.

    Troubleshooting steps so far: I’ve added what I think are the appropriate directives to .htaccess (pasted below), I’ve manually created the blogs.dir directory structure, made sure the directories are owned by the same owner and group as the Apache web process and are all 777’d. I’ve verified that mod_rewrite is working (pretty URLs are operating just fine). For the subsites, I’ve verified that the Upload Path is “wp-content/blogs.dir/2/files” (where the “2” varies depending on the subsite) and the Fileupload Url is “https://10.19.203.200/resource/files” (this is a POC box, so we only have it set up with an IP address, no entry yet in our corporate DNS). I’ve made sure every entry in httpd.conf for “AllowOverride” is set to “All.” And now… I’m stumped, out of ideas.

    One potential clue, perhaps: If I go to the dashboard for one of the subsites, and then mouse over the “My Sites” menu in the WP header, the WP icons show up as broken images. This doesn’t happen from the dashboard of the root site. I have no idea if that’s relevant or not.

    At this point, I’ve Googled all that I can, and am stumped for an answer. If anyone has any leads, I’d really appreciate it. If it’s relevant, this is running on a Fedora 17 box.

    Thanks for any help,
    Dustin

    .htaccess:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

Viewing 16 replies (of 16 total)
  • Congrats for the solving the problem! ?? Here I found useful information and URLs for myself. Thanks for all!

Viewing 16 replies (of 16 total)
  • The topic ‘Can't Add Media to Subfolder Sites’ is closed to new replies.