Family Encyclopedia >> Electronics

How to change the default media upload location in WordPress 3.5

The new Media Uploader in WordPress 3.5 is probably the biggest change in this version. Another important but less commented change is the disappearance of the option to change the upload directory path from Settings . The reason for removing this option from the user interface is that it is not as commonly used as other options. It also has the potential to create chaos if the user accidentally changes it. The removal will simplify the UI with just a checkbox for year/month folder organization. In this post, we will show you how to change the default media upload location in WordPress 3.5.

Note:This tutorial is not for beginners. Use it only if you know what you're doing..

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 to upload the directory wp-contenido / archivos then you should put the following code in wp-config.php

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

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

 define ('CARGAS', ". 'archivos'); 

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

How to change the default media upload location in WordPress 3.5

We hope you have found this article useful. If you have any questions, feel free to leave a comment below.

Source:

Function Reference / wp_upload_dir - WordPress Codex

WordPressTrac#21720