[wp-trac] [WordPress Trac] #23750: Uploads go into subdirectory install of WordPress

WordPress Trac noreply at wordpress.org
Tue Mar 12 22:11:00 UTC 2013


#23750: Uploads go into subdirectory install of WordPress
-----------------------------+--------------------------
 Reporter:  jondavidjohn     |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Upload
  Version:  3.5.1            |   Severity:  normal
 Keywords:  needs-patch      |
-----------------------------+--------------------------
 In upgrading a few sites to WordPress 3.5 and then giving WordPress its
 own directory (`wp/`), we continually see the uploads end up in `wp/wp-
 content/blogs.dir` instead of `wp-content/blogs.dir`.

 For the time being as a work around we have enabled a network wide plugin
 that consists of

 {{{

 function ms_upload_fix($uploads) {
         $uploads['path'] = str_replace('/wp/', '/', $uploads['path']);
         $uploads['basedir'] = str_replace('/wp/', '/',
 $uploads['basedir']);
         return $uploads;
 }
 add_filter('upload_dir', 'ms_upload_fix');

 }}}

 We do have `WP_CONTENT_DIR` defined and assume it should use this if set.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23750>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list