WordPress media directory is the location of the folder on a web-host where media files like images are uploaded. By default, files are uploaded to /wp-content/uploads/ folder. The uploaded files are also organized into month and year based folders. That means when we upload an image.jpg in the month of May 2015, it is placed in the folder, /wp-content/uploads/2015/05/image.jpg.

To change the said upload folder, we just need to add one line in the file wp-config.php. To remove the year and month based folder arrangement, there’s a simple option in WordPress admin settings.

Removing Year/Month Based Folder Organization

Uploading Files Settings

Changing WordPress Media Upload Folder

Access your wp-config.php file using FTP or a file manager, edit it and add one of the following lines:

To upload the files within a sub-directory of /wp-content/

[php light=”true”]define( ‘UPLOADS’, ‘wp-content/images’ );[/php]

To upload the files in a directory that is not placed inside /wp-content/

[php light=”true”]define( ‘UPLOADS’, ‘images’ );[/php]

Future images will be uploaded to /images/

Notes:

Leave a Reply

Your email address will not be published. Required fields are marked *