[resolved] (Brand New VPS & Multisite) Problem with blogs.dir (6 posts)

  1. s.fox
    Posted 2 years ago #

    I have a brand new VPS & WordPress Multisite Installation. (Sub-Domains) As a test, I created my first site on my network. I uploaded an image to a page, and expected the file to be saved underneath the blogs.dir path.

    Instead, the file is saved under a path like this "wp-content/uploads/sites/2"

    As a result, the paths for all images or any other files hosted on the site looks like this (sub.domain.com/wp-content/uploads/sites/2/...).

    I recently installed multisite on an nginx server. There all images and files from a given site were correctly placed into the blogs.dir folder as wp-content/blogs.dir/2/files/...). The root of a given site, essentially began at the blog id. So their paths resembled (sub.domain.com/files/...) This is what I want, but the tutorials I've been using for apache make no mention of any rewrite rules to make this happen. Instead, the blogs.dir remains empty, and I am left to wonder why I created the folder.

    What am I doing wrong? Any help would be greatly appreciated.

  2. This is not wrong.

    The site with /uploads/sites/2 started Multisite on WP 3.5

    The site with /blogs.dir/2/files started Multisite pre 3.5

    You did nothing wrong, and you're okay to carry on with /uploads/

    It's mentioned here: http://codex.wordpress.org/Multisite_Network_Administration#Uploaded_File_Path

  3. s.fox
    Posted 2 years ago #

    Oh, wow. Thank you! I need to take a closer look at the new developments it seems.

    Well, then is there a way to get the file paths to be changed from this:

    <a href="http://my.domain.com/wp-content/uploads/sites/2/2013/01/slide01.jpg">

    To this:

    <a href="http://my.domain.com/2013/01/slide01.jpg">

    or this:

    <a href="http://my.domain.com/files/2013/01/slide01.jpg">

    I don't really like having wp-content/uploads/sites/[blog_id] in any path?

    I'm thinking rule from the older 3.4 config may be a clue to get this done. Could you share with me any insights on this?

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
  4. Funny enough, most people want to go the other way (since your path isn;t a secret, and the /files/ stuff is a hassle).

    How deep into the new install are you? The easiest way would be to start over on 3.4, make the site, and then upgrade to 3.5 ;)

  5. s.fox
    Posted 2 years ago #

    I'm not deep into it at all, but you're right though. It does look like a hassle. My team and I we'll keep it as is, for now.

    Thanks for all your help!

  6. terjunbebas
    Posted 2 years ago #

    hai, sorry. path i site folder. and i have image for my posting. but in post thumbnail just 150x15px image display. may i resize my thumbnail for my home page? how?

    and i have create code for post thumbnail in functions.php

    if( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
    	add_theme_support( 'homepostthumbnails' ); 
      add_image_size( 'thumbone', 55, 45, true );
      add_image_size( 'thumbtwo', 418, 215, true );

    but in my fornt page thumbnail display 150x150px
    anyone can help me?

Topic Closed

This topic has been closed to new replies.

About this Topic