Title: Image location hell
Last modified: August 21, 2016

---

# Image location hell

 *  Resolved [OceanWind](https://wordpress.org/support/users/oceanwind/)
 * (@oceanwind)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/image-location-hell/)
 * 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:
    – [http://mydomain.com/wp-content/uploads/2013/04/image.png](http://mydomain.com/wp-content/uploads/2013/04/image.png)–
   [http://mydomain.com/%5Bsubsite%5D/files/2013/06/image.jpeg](http://mydomain.com/%5Bsubsite%5D/files/2013/06/image.jpeg)–
   [http://mydomain.com/%5Bsubsite%5D/wp-content/blogs.dir/3/files/2013/12/image.jpg](http://mydomain.com/%5Bsubsite%5D/wp-content/blogs.dir/3/files/2013/12/image.jpg)
 * 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.
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [12 years, 4 months ago](https://wordpress.org/support/topic/image-location-hell/#post-4529626)
 * 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/#/
 * So.
 * 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 … 
   [http://halfelf.org/2012/dumping-ms-files/](http://halfelf.org/2012/dumping-ms-files/))
 *  Thread Starter [OceanWind](https://wordpress.org/support/users/oceanwind/)
 * (@oceanwind)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/image-location-hell/#post-4529628)
 * 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:
 * [http://mysite.com/wp-content/blogs.dir/2/files/2014/01](http://mysite.com/wp-content/blogs.dir/2/files/2014/01)
 * 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)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [12 years, 4 months ago](https://wordpress.org/support/topic/image-location-hell/#post-4529663)
 * You can’t just transfer the files over, though. That’s why [http://halfelf.org/2012/dumping-ms-files/](http://halfelf.org/2012/dumping-ms-files/)
   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:
   > [http://mysite.com/wp-content/blogs.dir/2/files/2014/01](http://mysite.com/wp-content/blogs.dir/2/files/2014/01)
 * That’s actually where your files are. the domain.com/files/ URL redirects to 
   that, so if you deleted those files, you’d have no images.
 *  [alvarezcyberx](https://wordpress.org/support/users/alvarezcyberx/)
 * (@alvarezcyberx)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/image-location-hell/#post-4529809)
 * 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?
 *  [alvarezcyberx](https://wordpress.org/support/users/alvarezcyberx/)
 * (@alvarezcyberx)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/image-location-hell/#post-4529810)
 * 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.

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 5 replies
 * 3 participants
 * Last reply from: [alvarezcyberx](https://wordpress.org/support/users/alvarezcyberx/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/image-location-hell/#post-4529810)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
