WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Images not showing on site, in media library, in post editor (5 posts)

  1. TanjaPetro
    Member
    Posted 1 year ago #

    I have set up a subdomain installation at http://www.learningmadeeasy.org

    Everything is fine on the main site. However, on all the other sites, images are not showing - in the media library, in the post/page editor, or on the site. After reading another thread, I have checked the following:

    1. http://www.learningmadeeasy.org/wp-content/blogs.dir/32/files/2012/10/02749_bubblicular_1920x1080-150x150.jpg - images shows
    2. http://learningmadeeasy.org/wp-includes/ms-files.php?file=/02749_bubblicular_1920x1080.jpg - redirects to the Error 404 page of the first site
    3. http://learningmadeeasy.org/files/02749_bubblicular_1920x1080.jpg - redirects to the Error 404 page of the first site

    I imported an xml file with 'dummy content' on each sub-site. The images from the xml file show up (they are being pulled from another site). However, the following folder has been created on some of the sub-sites: blogs.dir/site#/files/2008/09 (I'm guessing when the xml file was created?). The images I added today are in this folder instead of the 2012/10 folder.

    I just added a new site and imported the WordPress theme unit testing xml file. The images from the xml file are not showing up e.g. http://tutimg.learningmadeeasy.org/2008/09/03/images-test/
    The image shows up here: http://www.learningmadeeasy.org/wp-content/blogs.dir/34/files/2010/08/boat.jpg

    I'm seeking any suggestion that might rectify this issue. Thanks in advance.

  2. TanjaPetro
    Member
    Posted 1 year ago #

    I created another new site (without importing an xml file) and added a post, but the images don't show up there either: http://plain.learningmadeeasy.org/2012/10/05/plain-with-image/

    I forgot to mention that I have several .htaccess files as follows:

    1. Root .htaccess:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    
    Options All -Indexes

    2. wp-content and wp-includes .htaccess:

    Order Allow,Deny
    Deny from all
    <Files ~ ".(css|jpe?g|png|gif|js)$">
    Allow from all
    </Files>

    I have also tried with both pretty and default permalinks and still no images.

  3. TanjaPetro
    Member
    Posted 1 year ago #

    This is likely becuase your server's httpd.conf isn't set to AllowOverride All.

    I have no idea what that means but I'm very grateful that I have somewhere to start.

  4. TanjaPetro
    Member
    Posted 1 year ago #

    I spent an hour in Live Chat with my host and the images are showing now. I asked if AllowOverride All could be changed in .htaccess (based on a comment from you in another thread) and they said yes. They had me replace my original root .htaccess code with this:

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

    I don't see any AllowOverride in there so I have no idea how they fixed the issue.

    I just want to say a huge thank you to you for pointing me in the right direction. I am very grateful for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.