The MU forums have moved to

Manually change upload directory (6 posts)

  1. dhadiall
    Posted 15 years ago #

    When I "save changes" on the oprtions-misc.php page to revert back to default for upload folder location (wp-content/uploads) from (wp-content/blog.dir/1/files), it won't register the change. Same with unticking the organize by month/date.

    I'd like to make this change manually -- perhaps in the SQL database? Can anyone tell me how to do this? I'm not sure why the form isn't working, but I need to make this change.

    Thank you

  2. andrea_r
    Posted 15 years ago #

    Read the wp-config.php file, the answer lies in there within some commented items. :)

  3. mjjinvincible
    Posted 14 years ago #

    I would like to put the uploads folder outside of wp-content. Is it possible? When I change the options in the admin panel to "uploads" and also

    define( "UPLOADBLOGSDIR", "uploads" );

    it doesn't work.

    I upload a picture and I get this URL:


  4. mjjinvincible
    Posted 14 years ago #

    I just saw that when I upload avatar images (with BuddyPress) they are actually inside the folder "uploads" folder, but when I post a picture in a post it is still being stored at the /blogs.dir folder. Why does that happen? Is there any way to fix or change that?

  5. gazouteast
    Posted 14 years ago #

    mjinvincible - I'd guess your blog image uploads are going into /blogs.dir/... because of the requirement to set a user maximum disk space - a blind guess would say that there's a code routine for measuring what' held under /blog.dir/(blog#)/.... but not for under /uploads/

    Your post above that about the long path - my guess is it's a rewrite rule coming into play there - where acting logically or incorrectly is another matter - check your "pretty URLs" and resave the settings, it might fix any issue in the .htaccess file rewrite conditions - the /files/ part of the path is below /blog.dir/ in a default install as shown in your long url's second half - for some reason it's writing both the search-friendly path and the exact server bath and joining them.

    @ Andrea
    Andrea - could you shed some light on this for me please? Pretty please?
    ... in my active-under-construction (default configured) install, the wp-config.php still has this exact piece of content ...

    // uncomment to move wp-content/blogs.dir to another relative path
    // remember to change WP_CONTENT too.
    // define( "UPLOADBLOGSDIR", "fileserver" );

    If I'm reading that correctly, with a root installed WPMU, I could move blogs.dir to root and rename it "userdata" or similar so that blogs' contents would have a path of -
    - home/public_html/userdata/(blog#)/files/year/month/....

    Would I be correct in assuming that?

    If so, it might be a way to clear all the issues related to the " . " in the folder name for /blogs.dir/ which I am sure is causing a lot of issues that appear frequently in the forums.

    Where is WP_CONTENT to be changed? Is it in wp-settings.php ?

    Would it cause any grief with future upgrades do you think?

    Thanks in advance

  6. gazouteast
    Posted 14 years ago #


    Looking again at your extra long file path ....

    Your bit should only refer to your site home blog (blog number 1) because in the url ...

    is exactly the same as
    -- home/content/username/html/wordpress/wp-content/blogs.dir/1/files/
    in terms of location in your hosting space

    this means your rewrite rule somewhere is "joining" the two paths, instead of "rewriting" the longer one to replace it with the shorter one.

    In effect, it is using "" in place of "http:" - notice the double "//" in the middle of your url?

    What it should be doing is using "" in place of "home/content/username/html/wordpress/wp-content/blogs.dir/1/files/"

    Even that is not 100% accurate, but will give you a starting point to hunt it down ... what it should be doing depends on whether it is the site home blog, or a user blog.

    For example with blog_ID=2 (call it lostsoul) ...
    should become, either -
    ... depending on if you use subdomain or subfolder user-blogs

    The same file in your site's home blog would be ...

    The /files/ folder should not be necessary in your path at all if it's set up correctly / efficiently ... unless you want it there because of using something like .../files/avatar.jpg outside of and above the year and month folder heirarchy?

    losing the /files/ folder as part of the path would be my preference - just have to check if doing it would break anything though :-D


About this Topic

  • Started 15 years ago by dhadiall
  • Latest reply from gazouteast