WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Define the same upload folder for all multisite blogs (25 posts)

  1. calutateo
    Member
    Posted 3 years ago #

    Hi,

    I would like all blogs (including the main blog) to store media uploads in the same folder.
    I tried to edit the blogs:
    http://mydomain.com/wp-admin/ms-sites.php?action=editblog&id=1
    http://mydomain.com/wp-admin/ms-sites.php?action=editblog&id=2
    http://mydomain.com/wp-admin/ms-sites.php?action=editblog&id=etc
    - Upload Path
    - Upload Url Path
    - Fileupload Url
    The desired folder for all files is http://mydomain.com/files

    1. What values should the fields "Upload Path", "Upload Url Path", and "Fileupload Url" contain?
    2. Do I have to change or add a RewriteRule in .htaccess? If so, how?

    Thanks in advance,
    Carsten

  2. Using the domain.com/files URL is fine, just change the path to where you want to store it.

    1. DO NOT try and store it in domain.com/files on your server. Use that as an alias. If you make a files folder, things will get a bit hanky.
    2. Even if you do this, you won't be able to cross-use images. They will remain per site.
    3. Why?

    I'm asking why because ... Even though your images are stored in domain.com/wp-content/blogs.dir/1/files their URL will still be domain.com/files and that's what people on the font end will see. Basically ... If you leave it as default, it will LOOK like it's in files and no one will be the wiser.

  3. You know, a couple of years ago I had a client who was using Dean's FCK Editor in an mu install, and the image upload button it had completely disregarded the mu part. And stuffed all the images in one folder that everyone could access. Now, you didn't get any thumbnails, but it *was* a global dumping ground... ;)

    Wonder if it still works like that...

  4. calutateo
    Member
    Posted 3 years ago #

    Thanks for the reply, ipstenu!

    I am still not quite sure what values these field should contain:
    - Upload Path
    - Upload Url Path
    - Fileupload Url

    My idea is that all blogs should use the same folder (from an admin point of view). I would like to have one single media library that is shared by all blogs. I that possible?

    Waht people in the front end will see it not that important.

  5. I would like to have one single media library that is shared by all blogs.

    THAT you will not get by having them all dumped in one folder. All you'll get is ... the files in one folder.

    You could try Dean's FCK Editor but a quick google for 'wpmu shared media library' comes up empty.

    Why do you want them to share a folder, from an admin point of view?

    Anyway:
    Upload Path - The PATH to where your files are located on the server. Default is /wp-content/blogs.dir/#/files/
    Upload Url Path - The URL where your files are called from. Default is http://domain.com/files
    Fileupload Url - The URL where your files are called from. Default is http://domain.com/files

    One of the two last ones is deprecated, but basically if they match, you're golden.

    Now again, to warn you, WordPress Multisite does a LOT of redirecting with regards to images. You point to them at http://domain.com/files/YYYY/MM/image.jpg which passes that to http://domain.com/wp-includes/ms-files.php?file=/YYYY/MM/image.jpg which passes THAT to http://domain.com/wp-content/blogs.dir/#/files/YYYY/MM/image.jpg

    So you see there's a LOT going on in there, and if you change it around, you can shoot yourself in the foot.

    Even if you changed every site's Upload Path to /wp-content/files (which I strongly recommend over /files/ for many reasons), you will not get all the images showing up in your media libraries for all sites. Just doesn't work like that :/

    Now, that said, a shared media library would be pretty cool. But no one's made it yet :/

  6. calutateo
    Member
    Posted 3 years ago #

    Thank you sooo much. That answer really made everything clear. I was on the wrong track. So I will just drive back start again from the default.

    I learned a lot. Thanks.

  7. Arson B
    Member
    Posted 3 years ago #

    Hello calutateo,

    i am having the same problem, did you solve it?
    It would be very nice, if you could post your solution -
    Or just give me an hint how to share the files (images) for all blogs.

    this does not work on my site:

    Upload Url Path - The URL where your files are called from. Default is http://domain.com/files
    Fileupload Url - The URL where your files are called from. Default is http://domain.com/files

    And i tried this too:

    http://domain.de/wp-content/uploads
    http://domain.de/wp-content/uploads

    Or is this completly the wrong way?

  8. Or just give me an hint how to share the files (images) for all blogs.

    You don't.

    Multisite is like running WordPress.com on your server. It's intended to have separate, NOT related, sites on a network.

    You can cross post images by copying in the full image path/location from Blog A to Blog B, but you cannot have them show up in a shared media tool. Just doesn't work, unless someone's crafted a plugin I don't know about.

  9. Arson B
    Member
    Posted 3 years ago #

    oh!(
    and i thought that this is one of the main parts of wp-multisite:
    Easy use of posts and contents from other Blogs of the network.

    Maybe Someone else know about a Plugin for this?

  10. calutateo
    Member
    Posted 3 years ago #

    Hi Arson,

    WP is working exactly contrary to what I want it to do. It makes sense though.
    There might be a way to create symlinks on the file systems. Well, then you will have to know how to create symlinks and you need access to the web server's operating system. I did someting similar with another software (Moodle). In most cases you don't have access to the file system so...
    I don't use the blogging feature in WP. All of my blogs are identical they just show a different language. That's not a very typical way of using WP but it really works fine for me.
    The workaround was to put the standards images into a subfolder of the theme. All blogs use the same theme so they can access the images using the same path.
    This does not work for an upload path. I uploaded these image manually.

    HTH,
    Carsten

  11. rsgrone
    Member
    Posted 3 years ago #

    I posted a similiar question...

    I have domain.com and domain.co.uk and wanted them to share the same images both from a file location and with the database so that the images would be shared from blog to blog that is, if domain.com uploaded image1.gif then, domain.co.uk could see the same image within the media library...

    It would be nice is some programming genius could come up with something like that and/or a way to create a single database two separate databases could share from an image stand-point... it would really save on disk space...

  12. No one's come up with it yet because, for the most part, people are using MultiSite to run separate, unconnected sites, or ones that use differeing media libraries.

    If you have shared images, they should be probably be uploaded via FTP or in some other static way.

  13. rsgrone
    Member
    Posted 3 years ago #

    Thanks... I definitely need a database solution...

  14. Then I would consider using custom post types or categories to organize, within one blog, your posts, instead of multisite.

  15. rsgrone
    Member
    Posted 3 years ago #

    Ah, that is just it, we are not using multisite although we are running 3.04

    That is to say, we have for instance one domain as domain.com and another as domain.co.uk

    If that is of any value...

  16. If you're not using MultiSite, then this subform (i.e. the multisite subforum) is not right for you :)

    That is to say, we have for instance one domain as domain.com and another as domain.co.uk

    You actually CAN manage two sites like that with MultiSite and domain mapping plugins, but if they're totally separate, you're outside multisite's abilities :) And even if you did, MultiSite would treat them as separate.

  17. you *can* define the uploads folder in wp-config.

    Given that you can host multisite files off-server in places liek Amazon S3, it's not that it can't be done, it's that nobody whpo has done it has written up the step by step yet.

  18. Yeah, but if you change it, the images from Site1 don't show up in the media manager for Site2, do they?

  19. Hadn't gone all the way thru it yet.

  20. rsgrone
    Member
    Posted 3 years ago #

    So what your saying is, I should use multisite, a domain manager plugin which would give me the ability to use both the .com and .co.uk in "one install" thereby allowing both sites to share the same media files (embedded in one database)?

    I can work with that... I am using 3.04 multisite on one installation, the .com however, both sites are using wp-super-cache... will there be any adverse effect? I set them up separately due to the use of super-cache along with, they have different domain extensions...

    Any advise would be greatly appreciated...

  21. To the best of my knowledge, there is no plugin that can allow multiple WordPress sites, be they separate or MultiSite, use one media upload folder AND have the images show in the media manager.

    Given how media is listed in the database (I.e. As posts), I can't see this being an easy fix.

    You can host the files anywhere, its the database tables that'll kill ya.

  22. lameian
    Member
    Posted 3 years ago #

    im having the same problem.

    i use the same theme for different blogs. and with the plugin 'WordPress MU Sitewide Tags Pages', entries of different blogs are shown on one main blog. however images cant be shown.

    no solution?

  23. lameian - NOT the same problem :) Also I think the trunk version of the plugin can pull in the featured image.

  24. lameian
    Member
    Posted 3 years ago #

    lpstenu,

    it cant pull the feature image....
    main site: http://blog.do-did-done.com/
    sub site: http://blog.do-did-done.com/lameian

    do i have to define the upload path or what?

    thanks

  25. lameian - Please make a NEW post for this, as it's not the same problem.

Topic Closed

This topic has been closed to new replies.

About this Topic