Organize uploaded media files

I have a blog with all media stored in a folder called upload (organize media was disabled), I’ve activate it to organize new uploads by date. But how can i organize old files?

I want this because i need to migrate the site to a WordPress MU site, and i need to have files organizated.

Related posts

Leave a Reply

3 comments

  1. Thans but I’ve found the solution, what it need to do is to edit the site (Network -> Sites -> Edit -> Settings ) and change the following parameters:

    Uploads Use Yearmonth Folders   0
    Upload Path                     wp-content/blogs.dir/1/uploads
    Fileupload Url                  http://www.mydomain.com/myblog/uploads
    
  2. You can hard-code this change for all your sites like this:
    1. Create a new php file with a path like this: wp-content/mu-plugins/no_date_assets.php
    If the wp-content/mu-plugins folder does not already exist, you will have to manually create it.
    2. In that file paste the following:

    <?php
    
    $uploads_use_yearmonth_folders = get_option( 'uploads_use_yearmonth_folders', 1 );
    
    if ( $uploads_use_yearmonth_folders ) {
        update_option( 'uploads_use_yearmonth_folders', 0 );
    }
    

    That’s all!
    This will make all future uploads not use the year/month folders.