Support » Networking WordPress » Image location hell

  • Resolved OceanWind


    Hi all,

    I’ve got a WordPress multisite installation that has been running since pre-WP 3.0 times. In the most recent upgrade, the images have gone totally wonky on the subsites. The media libraries have disappeared on the backend, and within subsites, featured images are not being found.

    Looking in the database I see 3 distinct types of storage conventions stored in guid for images and other uploads:

    I desperately need to sort this out and want to move all files to the most current format. Questions:

    1) Which file format is the most current?

    2) Is there any reason I can’t do a search/replace on the DB to align these all with the same directory structure, and then move all the images to the new location?

    3) Is the slightly modified .htaccess file code the only difference between multisite stored after WP v3.5 and earlier versions?

    I’m willing and able to do deep work to make this function again. Any help is appreciated.


Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Take a deep breath, tis confusing.

    Back in WP Multisite 3.0 (i.e. when it first became part of WP core), it worked by using /files/ in the URL for all sites on the network. The files folder was a FAKE folder, tweaked into existence by the .htaccess file. Your images were ACTUALLY in wp-content/blogs.dir/# etc….

    As of WP 3.5, the /files/ trick was removed for all NEW networks. if you had one, it kept using /files/, but all newly minted multisites put their files in /wp-content/uploads/sites/#/


    1) The location of the files for a pre-3.0 WPMU install, upgraded to 3.8, would be /wp-content/blogs.dir… however the URL that shows in the browser would be /files/

    2) Yeeeeees, but you have to do it per site and you would search wp_3_posts and change /files/ to /wp-content/uploads/sites/3/ and so on.

    3) When you say disappeared, do you mean the media library is EMPTY, or that the images don’t show? If they aren’t showing, what’s in your .htaccess?

    (FWIW, you can switch a site to us /uploads/ which I find generally easier … )

    Thanks, Ipstenu! This is the first explanation I’ve found that got to the heart of the issue.

    So, do you see any problems with this approach:

    1) Transfer all files from blogs.dir/2/ to uploads/sites/2/
    2) Replace the guid’s with /[subsite name]/blogs.dir to /uploads

    QUESTION: Is there any reason to keep /[subsite name]/ in the guid since it’s redundant with having the subsite id in the path?

    For some reason (perhaps my not fully informed mind when I created this site), I have ‘files’ in the physical directory structure:

    I can get rid of that, right?

    And yes, no image files are displaying in the media gallery. I’m hoping they reappear when I build up from a fresh multisite install, and getting all the guid’s and the physical locations in line with 3.8 standards.

    Thanks so much for your help.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    You can’t just transfer the files over, though. That’s why is as long as it is :/

    For some reason (perhaps my not fully informed mind when I created this site), I have ‘files’ in the physical directory structure:

    That’s actually where your files are. the URL redirects to that, so if you deleted those files, you’d have no images.

    ok so I think lots of others are having this same issue. My multi site was working just FINE until, it auto updated to 3.8 and now all subsites have non working images.

    OceanWind, did you ever figure out how to fix this?

    Ipstenu, there has to be something we can change to easily fix this right? I mean, it updates wordpress and now images don’t show, so what do we do to fix it?

    Ok I think I fixed it, somehow the code in the .htaccess file had changed, and no longer had the code for the files redirect. Added the correct code and it now seems to be working.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image location hell’ is closed to new replies.