How to Change the Default Media Upload Location in WordPress 3.5+

Changes to Media Uploader in WordPress 3.5 were perhaps the most significant changes in that release. Another important change was the removal of Settings » Miscellaneous section where there was an option to change the default upload directory and an option “check box for year/month folder organization”, in the admin end. In fact there were quite few other options which were moved to other Settings screens but we wont talk about them here. The other concerned option “check box for year/month folder organization” was moved to Settings » Media.

How to Change the Default Media Upload Location in WordPress 3.5+

In order to change the default media upload location, you need to edit the wp-config.php file located in the root directory of your WordPress installation. If you want upload directory to be wp-content/files then you will need to place the following code in wp-config.php.

define( 'UPLOADS', 'wp-content/'.'files' );

If you want the upload directory to be outside wp-content, like http://mysite.com/files/ then you need to set upload path in wp-config.php like this:

define( 'UPLOADS', ''.'files' );

You can still choose whether or not you want uploaded files to be organized in month/year folders in Settings » Media.

Leave a Reply