• ResolvedModerator Bet Hannon

    (@bethannon1)


    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?

Viewing 15 replies - 16 through 30 (of 41 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Is there an entry in wp_sitemeta for ms_files_rewriting ?

    Moderator Bet Hannon

    (@bethannon1)

    Nope. Should there be?

    I thought that got handled in the .htaccess with a RewriteRule…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    No, it only gets set if you’re starting from WP 3.5 and up.

    Moderator Bet Hannon

    (@bethannon1)

    So it sounds like we have ruled out those two tables as the source of the problem.

    Got my hopes up that we might have found it. :/

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yeah, I’m trying to think of what else to do, except manually force everything …

    Moderator Bet Hannon

    (@bethannon1)

    How would I manually force those newer sites when they don’t have an option for “upload path” in the site settings?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You could create the option in the database, directly. Just edit the table and add that in.

    Moderator Bet Hannon

    (@bethannon1)

    oohh! I’ve never done that, and it sounds like living on the edge! (for me, at least!)

    Two questions:
    1.) I will definitely backup, but is this something that could break the network, or would I just undo the edit to the table and be ok?

    2.) Does this go in wp_sitemeta or wp-options, or does it go in the options for only the subsites that need it? If in the subsite, which table? And I assume I’m adding “upload_path” and then what would be the correct syntax?

    Ok, that’s really more than two questions. I’m game to try it, I just don’t want to create even bigger problems!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    1. It shouldn’t break the network, but … well. Anything can happen.

    2. You would put it in wp_x_options

    Looks like this: https://cl.ly/image/0M39313P2139

    So there I have it blank, but if you just make it you’ll be able to edit it.

    Moderator Bet Hannon

    (@bethannon1)

    Thanks, Mika! I’ll try this over the weekend!

    Moderator Bet Hannon

    (@bethannon1)

    Yaayy! I didn’t break anything! ?? And I learned my way around the database a little.

    I added upload_path to the couple of sites that didn’t have it, and they now seem to have uploads going to the right blog.dir/[site#]/.

    What I discovered though, in trying to add upload_path to another couple of sites having issues is that they already had an options_name for upload_path, and usually the option_value was to the correct blogs.dir directory, but that the option_id was some random number. None of them were the same. In looking through several other wp_x_options tables, some of the ones with random option_id’s had issues, some didn’t.

    I wasn’t sure at first about changing that option_id, but I did notice that in most of the sites NOT having issues, that option_id was 56. So I made sure all the sites have option_id 56, and upload_path and the correct site# for the upload path.

    In this network, I do have one site (“newsite”) that I use as a time-saving template when creating new sites. I clone it by exporting that single site with BackupBuddy, and importing it as a new site. I’ve done this for quite a while, and most sites have no issues with uploads. But a couple of them had upload paths that were to the blogs.dir/[newsite id#]. Solved that mystery, and corrected their upload paths.

    Now to untangle all the old uploads to wrong directories…

    Thanks for your help, Mika!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That’s… weird. 56? What on earth does that mean. Well hey, now we know more!

    Moderator Bet Hannon

    (@bethannon1)

    I thought the 56 as an option_id was somehow tied to “upload_path”, although I couldn’t find any documentation about this in the codex. The sites that were missing upload_path as an options_name, did not have any option_id for 56– they just skipped from 55 to 57 (although as mentioned above, some of them had weird IDs like 2116 or 23145 for the ID on upload_path. And other option_names seemed to always have the same option_id number.

    I’ve never forced a database to do my will before, and it was kind of fun. ?? I do realize (since I am a parent) that forcing it too often will create more problems than it solves, but nice to know that I can get in there to tidy up when needed. Thanks again.

    I’m still tidying, but think it’s worth getting some help and migrating the network away from ms-files? That doing that would mean fewer problems down the line?

    Moderator Bet Hannon

    (@bethannon1)

    Just in case anyone comes along later with a similar issue, I’ll share that I figured out how I got into this mess:

    To create new sites in the network, I had been using BackupBuddy to export a template site, complete with some base themes, content I wanted all new users to see, and some settings that are the same on all network sites. This was a huge time-saver. And, it worked just fine for more almost 40 sites, up until WP 3.5 and the shift to “uploads/sites”.

    Starting after I upgraded to 3.5, those cloned sites have very funky upload issues. Some have no upload_path at all, some have an upload-path with the wrong option_id, some use wp-content/uploads (shared with the main site), some were uploading the same file to multiple directories (for example, “uploads/2013/09” AND “blogs.dir/60/files/2013/09”).

    I tested with creating new site through the network admin panel. No issues. Created a new BUB clone: more issues.

    I’ve reported the issue to iThemes. They show multisite support for BUB as beta, and have hinted that they will not continue to develop it, so I’m not sure if it will get fixed or not.

    BTW, it wasn’t until I started to sort this out that I realized that when WP uploads, it creates the date directories based on the original publication date of the post/page. THAT finally explains why a cloned site I created last month has upload directories for 2012!

    Hi, I just stumbled across this conversation as I am having the same problem of my images not appearing when I upload through the media library or using the add media button on a page or post. I just recently converted to a multisite set up and on my original site, the images were uploading to the wp-content/uploads/ folder, but now the new sites are uploading the the wp-content/blogs.dir/3/files/ folder. I finally figured out finding the database and the different wp_x_options files in phpMyAdmin. Right now the upload_path is set to wp-content/blogs.dir/3/files and the upload_url_path is blank. What do I need to change to make sure the images are going to the correct location so they will actually appear on my site?

    I have gone round and round with my theme’s support team and a change they had me make on the image.php file broke my site for almost a whole day and created major headaches in trying to get it back in running order. I really don’t want to break it again ??

    Any help will be greatly appreciated.

Viewing 15 replies - 16 through 30 (of 41 total)
  • The topic ‘upload path missing?’ is closed to new replies.