For some reason, some of the newer subsites created on my multisite are all saving their images to wp-content/uploads, instead of wp-content/blogs.dir/(site#) like other subsites in the install. (I haven’t figured out why, but one of them was an imported site, migrated with BackupBuddy…)
So I opened network edit sites, and while I can find “Upload Url Path” and “Fileupload Url”, I can’t find an option for “Upload Path” on one of the subsites.
Why would I be missing this, and where can I find it to fix the upload path?
Are they in /uploads/sites/#/ or in plain /uploads/ out of curiosity?
(Sigh) They were are in /uploads/.
But here’s the really weird thing:
So the whole issue came to light when after an update (I’m thinking 3.6.1), some sites in the network were missing image headers, then I discovered some sites were missing other images too. At first, I thought it was an iThemes’ Builder issue, but then two non-Builder themed sites were affected.
So this afternoon, after thinking that it’s an upload path issue, I started trying to tracking down the missing image files in backups. The missing images were still listed in the affected site media library, and in the media library, individual file urls showed that the file in blogs.dir/#/files, but weren’t there!
I found these files all in /uploads/. They have been there in all my oldest backups. Out of curiosity, I copied the files into the correct blogs.dir folder, and voila– all the images on the site were back!
Up until Aug 4 (I’m thinking that’s when I updated to 3.6), all the media files in /uploads/ were only for the main site. After that, there are files for a number of other sites mixed in there. For instance, the image header for one site shows it’s URL in the media library as: http://subsite.mainsite.com/wp-content/blogs.dir/66/files/2013/07/imageheader.jpg, BUT that file is actually located now at wp-content/uploads/2013/08.
But I KNOW that this site was functioning normally and displaying this image header correctly about 10 days ago. When I copy the image file to the blogs.dir location, the issue is resolved.
So I’m thinking that the uploads issue from the 3.6 update might have started this. Here is my original post: http://wordpress.org/support/topic/media-files-not-uploading-to-correct-dir-after-wp36?replies=10
What I can’t figure out is why the update to 3.6.1 triggered this all over again!
I will get all the images in /uploads/ that don’t belong there moved back to their folders, and check the uploads path for the affected sites to double check. [But I also know I have at least one subsite without an option for setting “uploads path”. Not sure what to do about that one!]
What I can’t figure out is why those image files from Aug 4 onward that were in /uploads/ (they appear there in all my backups), with file urls to blogs.dir, suddenly stopped working with a WP update.
Think if the files keep going to /uploads/ that they will keep having this issue every WP update?
And making sure the upload path is blogs.dir/#/ should keep them from going to /uploads/, right?
Apparently, some of the newer sites don’t have an “Upload Path” option. Is that because of the newer way of uploading media? Because this is an older install with blogs.dir, shouldn’t all the sites stay that way? Or is there a way to set them to stay that way?
And if they can’t, and the newer sites have to use /uploads/, how come they aren’t going to uploads/sites/? All uploads from all the affected sites are comingling in the uploads/2013/month folders.
Wont’ that create issues if I need to export a single site for a client later?
The upload path overrides the default, so in THEORY you never need it unless you’ve moved stuff or (as in your case) you need to force it.
I would think if you force it in the options, that would take care of this.
As for why the update did this, I would speculate it was a plugin gone wild, but I bit the bullet and moved all my uploads to the new format to ditch ms-files.php, which caused me headaches.
I suspect that somehow, iThemes Builder was involved in the triggering of this problem. I did a Builder update to 5.0 on one multisite network, but not another–which also had a few sites with this problem in August, but don’t have the issues on the un-updated network. I’m going to test that theory by updating Builder in a bit to see if it triggers issues in that network.
The files seemed to be uploading to /uploads/, but have file urls in blogs.dir, and seemed to display just fine, until somehow, the update rendered them not found. When I manually moved the uploads to blogs.dir, they reappeared. Weird.
Here are remaining questions:
1.) The sites that are uploading to /uploads/ are all uploading into the same directories — they are uploading into /uploads/2013/09 this month– all the media from all the sites co-mingling.
If I bite the bullet to move to the new format, shouldn’t the format be /uploads/sites/#/2013/09? And how do I make that happen? (I suspect from your first question above, that you have seen this problem before…)
2.) Some of the newer sites don’t have an “Upload Path” option to change on their site settings. How can I change the upload path for these sites?
3) Can you point me toward some guidance about biting the bullet and shifting to the new format? (I’ve searched, but I’m not finding anything) Especially when I have domain mapping on all the subsites going. There are 60 sites, and while they are not generally media-intensive, I want to minimize doing this by hand, if possible. I’m assuming that I have to do it all at one time, and it’s not something that can be staged over time…
Ok. This upload path stuff just gets weirder and weirder:
One of the affected sites (http://berkeleychineseucc.churchwebsiteprogram.com/) was created on 2013/06/24, it’s missing serveral images off the home page, but all of them have urls “wp-content/uploads/2011/05/”!
And, I can’t find those images on the server or in my backups! They are no longer in the site media library either.
In the uploads/2011/05/ directory, I find images for another subsite that was created 2013/08/23.
in wp-content/upoads/2013, all months except 09 were missing! I found them in my backup, FTP’ed them in, and images returned to sites.
Starting with /uploads/2013/08, and in 2013/09, there are media files from the main site, plus at least four subsites, all comingled.
I’m thinking that means that the funkiness started with WP 3.6…
Is there some way that 3.6 changed or dropped support for blogs.dir upload paths?
I’ve searched quite a bit, and I’m not finding out much to help sort this out. I’m still hoping that Ipstenu or someone with more knowledge about this will eventually find time to respond with a suggestion about how to fix my image upload issue.
I have a multisite install that seems to be trying to use both blogs.dir and uploads. The main site files are in uploads, and I’m ok to leave them there. But:
1.) the newer sites in the install (created since WP3.6) do not have an option on the network admin edit site settings page to set the upload path. These sites are uploading to uploads/2013 along with the main site. There is no uploads/sites/ directory.
While this “works” for now– the images display properly– if I needed to export one of these sites, the BackupBuddy export of the single site includes all the files in wp-content/uploads/– which includes all the main site files, plus all the other sites created since WP3.6. That’s not too many right now, but it will keep growing!
I tested the export function of WP, and it fails to import any of the media files.
So clearly, I want to get this worked out! Is there a way to globally set the upload path for all the sites in the network to blogs.dir?
OR, how can I get the newer sites to use uploads/sites/[year]/?
2.) I’ve also discovered image files for site ID=40 in blogs.dir/70/, and a few other sites are similarly uploading their files to the wrong site ID directory in blogs.dir/#/. Any ideas about what might need to get looked at or reset to keep that from happening?
Has anyone tried using this plugin to migrate from ms-files.php?
I did it manually. http://halfelf.org/2012/dumping-ms-files/
I think Kailey may have scripted some? http://trepmal.com/2013/03/24/removing-ms-files-php-dependency/
Thanks for the reply, Mika.
(sigh) I was naïvely hoping that perhaps this weirdness was something you had seen before that a simple settings change could fix.
I understand enough of the manual move & scripts posts to know that I need to hire someone to do it before I really mess it up. 🙂
And, that they will probably need to figure out some of what’s going on with the flakey sites before the move away from ms-files.php.
One more question: I just saw this from Ipstenu posted in: http://wordpress.org/support/topic/wordpress-35-upgrade-multisite-issues?replies=31
As of 3.5, all new installs are in /wp-content/uploads/sites/#/ (except for the main site, which is still in /wp-content/uploads/
Of note: Nothing changed for existing Multisite instances. They’re still in blogs.dir, using /files/ as a redirect via ms-files.php – nothing was moved. The only way WP knows to use uploads instead of blogs.dir is if a new field was added to your database’s wp_options table (that is, the absence of the field means you still use /blogs.dir).
If I have some newer sites using uploads (not uploads/sites/#, but just /uploads/), would it mean that somehow that new field in wp-options got created, and that if I remove it, that will fix my issue? That all the sites will go back to using blogs.dir?
It’s a possibility :/ The thing is? It should NEVER change.
Would I be able to tell if it HAD been by looking at the wp-options in the dateabase through myPHPAdmin? What would I be looking for?
- The topic ‘upload path missing?’ is closed to new replies.