How to Change Default Media Upload Folder Location For WordPress 3.5 and Above
By default WordPress stores its media content such as images, videos and audio files in /wp-content/uploads/year/month folder hierarchy. To manage the media files using default hierarchy bit tricky and need to navigate year and month folders to manage them. Due to various technical reasons such as hosting media files in sub domain and CDN services needs custom media location to handle them smoothly.
Change the Default Media Upload Directory in WordPress 3.5
The new Media Uploader in WordPress 3.5 is probably the most important change of this release. Another important but less talked about change is the disappearance of the option to change the upload directory path from Settings. In this tip I will show you how to change the default media upload location in WordPress 3.5.
How To Change Media Upload Folder upto WordPress 3.5
Now, if you want to change media uploads folder then you need to add just a small line of code to your wp-config.php file located at your website’s root directory. If you want upload directory to be wp-content/files then you need to add this code in wp-config.php:
define( ‘UPLOADS’, ‘wp-content/’.’files’ );
and if you want to set a custom folder, say http://www.yourdomain.com/files/ then you need to add this code to your wp-config.php file:
define( ‘UPLOADS’, ”.’files’ );
However, WordPress didn’t remove the option of “organize my uploads into month-and-year” based folder so, you can still choose whether you want your WordPress media folder to be arranged by month-and-year or not.
Latest Computer Tutorials Tips Tricks & Windows Xp-7-8 Hacks
The new Media Uploader in WordPress 3.5 is probably the most important change of this release. Another important but less talked about change is the disappearance of the option to change the upload directory path from Settings. The reason for removing this option from the UI was that it is not as commonly used as other options. It also has the potential of creating chaos if the user accidentally changes it. Removing it will simplify the UI with just a check box for year/month folder organization. In this post we will show you 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 Customize Media Upload Directory in WordPress
If you are too afraid that you will screw things up when editing wp-config.php, you can install this plugin called Upload URL and Path Enabler by Gregory Viguier, which will bring the option back into the Setting > Media page. Note that although this plugin hasn’t been updated for more than 3 years, the plugin is still working well in WordPress latest version as there isn’t much of change in this area in WordPress.