[resolved] [closed] Images not appearing (87 posts)

  1. memitch08
    Posted 6 years ago #

    @ toutsursam -

    1. In FTP change blogs.dir/#/files to blogs.dir/#/uploads realizing that "#" would be the number of the site.

    2. In .htaccess change this line from:

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]


    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?uploads/(.+) wp-includes/ms-files.php?file=$2 [L]

    Re-upload .htaccess

    3. Go to SuperAdmin - Sites - And Edit - url should be:

    4. Look for Fileupload Url and change the word "files" to "uploads"

    5. Look for Upload Url Path and change the word "files" to "uploads"

    6. Save settings

    Hope it works for you - but if not - just remember to backtrack all the steps above and undo your changes!

  2. toutsursam
    Posted 6 years ago #

    thank you for your help memitch08 but it doesn't work for me. I give up for the moment :(

  3. memitch08
    Posted 6 years ago #

    I just uploaded a new file - and it works - the file is accessible. I'm thinking that the old file urls probably have to be updated in the database.

  4. toutsursam
    Posted 6 years ago #

    I think it's a issue with rewrite and my host. So I re-install wpmu 2...

  5. memitch08
    Posted 6 years ago #

    Well - it still doesn't work for any sites other than site #1?

    When I try to upload media to blogs.dir/4/uploads - it creates a new directory entitled blogs.dir/4/files - which is inaccessible!

    This is driving me nuts!

  6. memitch08
    Posted 6 years ago #


    Look at this in ms-functions.php

    if (! is_subdomain_install() )
    		$illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ) );

    I have a subdiretory install which would explain why the term "files" is being discriminated against. Now the question is "how do I get a filter to fix it?" Anyone - someone?

  7. This woudl make total sense if everyone else was also have the same problem when running a subfolder install. But they are not.

    that banned named list is so you don't make a yourdomain.com/files/ blog.

    I really really think it's something to do specifically with your server.

  8. memitch08
    Posted 6 years ago #

    :( That makes me sad.

    By the way- I just upgraded another site to 3.0 - and did not run any betas or RC's - and that site has the same issue.

    I've had the exact same issue on 5 of my WPMU installs/upgrades.

    I don't know what I could be doing any differently than anyone else - on all 5 of my installs/upgrades?

    I generally don't personally use the media library anyway, but now need it for other users.


  9. Okay, let's get you sorted out as this tread is muddied by everyone else with the "exact" same issue that really isn't. ;)

    - are your upgraded sites all on the same server?

    - when you upgraded from MU, did you remove the blogs.php file from the wp-content folder AND update the htaccess file?

    - can you visit any of the pretty permalinks?

  10. memitch08
    Posted 6 years ago #

    Ok - thanks -

    1. Yes all on the same server
    2. Yes - removed the blogs.php
    3. Yes - updated the .htaccess file as directed
    4. I don't know of any other pretty permalinks. I do know that when I changed the "files" directory to "uploads" directory - and changed all of the urls and updated the .htaccess file - then I could visit uploads/2010/06/file - but only on the root site - not on any others.

  11. 4. I don't know of any other pretty permalinks.

    ding ding ding! :D

    Permalinks - the URLs of your entires in a readable format, like mysite.com/2010/06/hello-world/.

    Go to the main site. Click on a link, like hello world or about. Does it work?

  12. memitch08
    Posted 6 years ago #

    yes - those all work. I thought you were talking about the magically re-written ones.

    I don't know if I said I have the *exact* same problem. :) When I say I have the same problem I mean the outcome - not the cause. I don't know code, and have been desperately trying to find an answer.

    So here is my problem as I know it in the simplest form:

    I noticed a problem after upgrading to 3.0 when all of my images disappeared. I've discovered that any directory named "files" returns a 404 page. Whether that directory is in the root folder - or in blogs.dir/#/files. The word "files" is being discriminated against - and that directory is inaccessible.

  13. Can we get a link to your site?

    In all the other upgrades I've done, I can't reproduce this issue. Yes, I understand the *outcome* you're experiencing.

    I'm looking at it from a *code* perspective.

    On a working-as-expected upgraded site running 3.0 with the network enabled, trying to access the /files/ folder directly will always result in a 404. But the images will show.
    (need a link? I can give you several.)

    So, testing that part specifically won't help.

    Sometimes even though mod_rewrite is enabled and permalinks aren't working, images fail to show because in fact the htaccess file is being ignored.

    Please check and make sure Apache is forced to read it. :) Ask your webhost if you can't get in there, or add
    AllowOverride FileInfo Options
    to the vhost entry for that web account.

    99% of the time, this has fixed the issue.

  14. kayelless
    Posted 6 years ago #

    I think I'm having a similar problem. With my main site I have no issues with my images, but when I create a new sub-site no images show up anywhere. Not in themes preview. Not in custom headers. Even the header image in 2010 is missing. None of my blog posts have images associated with them. This problem is related only to the new site created.


  15. @kayless can you start a new thread? Your issue is slightly different. make sure you link to your blog.

  16. memitch08
    Posted 6 years ago #

    Ok - Andrea - Don't Shoot Me!

    But I fixed the problem -

    I thought I read that the file was to be called .htaccess.dist - so that is what I had it named.

    But in fact - it is supposed to be .htaccess

    In my FTP program - the .htaccess file is hidden - so when I uploaded the new .htaccess.dist - it just sat there and did nothing.

    So - I had to delete the hidden .htaccess - and upload the new one - and presto! Amazing I can't believe my eyes - all of my images are back!

    Thanks for your patience and help! :))

  17. You so totally owe me a large tea. :P

  18. memitch08
    Posted 6 years ago #


    :)) Thanks! It was actually your last post that helped me find the problem!

  19. ToreGu
    Posted 5 years ago #

    I think that my .htaccess is the culprit also. I'll see what my webhost (hostgator) says.

  20. Phil
    Posted 5 years ago #


    First I would like to say a great big thank you to everyone, those who are reading, those who will read and those who have helped and moved on.

    My website is: http://www.tandooricookingexpert.com

    I have the same problem. Images will not show. I have done the following:
    1. cleared cache- no difference
    2. deactivate all plugins- no difference
    3. installed "WordPress to WordPress plugin"- no difference

    My problem is that external images will show. For example:

    But any internal images will not show even when using the plugin. For example:

    I have google maps also and the map inmages will not show. Example:

    I have read through the post and am a little afraid to mess with the .htaccess file in case i mess everything up.

    Any help would be much appreciated.

  21. Some quick troubleshooting shows as soon as I try to get to http://www.tandooricookingexpert.com/wp-content/blogs.dir/1/files/, which is the full server path to where the images are stored, then I get an error.

    Check and see if there are any other folders above that level named "files". Like http://www.tandooricookingexpert.com/wp-content/blogs.dir/1/files/http://www.tandooricookingexpert.com/files/ - look via cpanel or ftp.

    If there *is* a folder there called that, it's interfering.

    Also check your htaccess file and make sure it has this line in it:

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
  22. Phil
    Posted 5 years ago #

    Thank you for the quick reply.

    I can find no files or folders with the names "files" above that heir achy. I looked via cPanel.

    I can find no .htaccess file. I have looked using cPenel. There is no .htaccess file in the root directory. This is strange because my site redirects to wwww from non-www. It should not be hidden in cPanel.

    Where does it normally be?

  23. Phil
    Posted 5 years ago #

    Sorry my fault in Cpanel it is not there. So i tried FileZilla FTP and it shows the htaccess file in the root directory of tandooricookingexpert.com.

    There is already some code it is:
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    I have put the new code below this. Do i delete the old code or leave all of it? (Dont have a clue what it means).

    There is no directory:

    But this is the file path it show in the uploader? Very strange.

    The file path of the file go.jpeg is:

    This is no 404 error but just goes back to the home page.

    Any help much appreciated.

  24. Phil
    Posted 5 years ago #

    Sorry forgot to say.

    The exact file path in the uploader shows:

  25. I can find no files or folders with the names "files" above that heir achy. I looked via cPanel.

    Good, that's what we want.

    I can find no .htaccess file. I have looked using cPenel.

    CPanel's file manager can be set to NOT show hidden files. Considering you did see it via ftp, then it was a cpanel setting.

    I have put the new code below this. Do i delete the old code or leave all of it? (Dont have a clue what it means).

    The instructions stated to *replace* all the code in the htaccess file with the new rewrite rules it gave you. that's your problem.

  26. Phil
    Posted 5 years ago #

    You have done it in. Your are a genius.

    From my heart "may you prosper".

  27. Trevor Lloyd-Jones
    Posted 5 years ago #

    In my case I had attempted to switch to WordPress multi-site and then gone back to single site. All my images in my case had moved to the main root directory in a file uploads in the wp-content file. Once I moved the uploads to where they was supposed to be (in my case domainname.com/wp) then my images showed up.

Topic Closed

This topic has been closed to new replies.

About this Topic