• Hi everyone,

    I’m working on high scalability with wordpress.And I know linux file system ext3 have 32k folder issue.
    So I can change default upload directory,

    For example:
    When I define this

    define( "UPLOADS", "wp-content/blogs.dir" . strrev(chunk_split (strrev(md5($wpdb->blogid)), 2,'/')) . "/files/" );

    I get 404 error for media files,but uploaded succesfully.
    How can I fix this error.Probably, will edit some default value but which file?

    Is there any suggestion/advice?

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    And I know linux file system ext3 have 32k folder issue.

    How many files do you think you’ll be uploading per blog per month anyway?

    Multisite segregates your files into wp-content/blogs.dir/#/files/2011/08/

    That is SEPARATE for each blog.

    Thread Starter Mustafa Uysal

    (@m_uysl)

    How many files do you think you’ll be uploading per blog per month anyway?

    blogs.dir/blogid/files/….

    When we have 32k blog this will be critical,So I’m searching now.

    I can change upload directory but I couldn’t solve media urls 404 yet.

    You’ll be scaling to database long before you need to scale the machine itself.

    start with

    Thread Starter Mustafa Uysal

    (@m_uysl)

    Hi Andrea,

    Thanks for suggestion.I will watch.
    We are using multi-db class for database scaling.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    32768 separate sites … Well. I know WordPress must be able to do it, since WordPress.com has about 30,000,000 (see https://en.wordpress.com/stats/) and they’re using MultiSite.

    Thread Starter Mustafa Uysal

    (@m_uysl)

    Yep,I’m sure.
    I wonder how can we store so much data?

    Thread Starter Mustafa Uysal

    (@m_uysl)

    in wp-includes/functions.php line 2251

    $url = str_replace( UPLOADS, 'files', $url );

    when remove this line,files get direct link:
    example: subsite.sitename.com/blogs.dir/d4/1d/8c/d9/8f/00/b2/04/e9/80/09/98/ec/f8/42/7e/files/2011/08/myupload.png

    And working successfully

    But I’m not sure is this secure way?
    What are you think about this?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That’s how MediaWiki does it.

    Thread Starter Mustafa Uysal

    (@m_uysl)

    I’m not sure,but Is it about WP_Rewrite ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Changed upload directory but Media Link url not’ is closed to new replies.