Site icon Experience Wordpress Developer Online – Design Develop and Maintenance Support

How to Change the Default Media Uploads Folder in WordPress

For some reasons if you or your client recommended to save all uploaded pictures through WordPress Media store in location directory instead of WordPress default wp-content/uploads than it is easy to do.

Prior to WordPress 3.5 version, it was allow to change the upload directory path from the Settings in the wordpress backend, but this is no longer possible with new version.

How to Change Default Media uploads Folder

Go to your wordpress website setup Root level directory, Open wp-config.php file, and add the following single line code:

#
define('UPLOADS', 'wp-content/yourfolder');

Here you need to confirm you added code before below line:

#
require_once(ABSPATH.’wp-settings.php’);

If the folder you set in your 1st code snippet not already exist, WordPress will automatically create it if your wp-content folder is writeable. if for security purpose wp-content folder write permission off than you have to create the folder yourself via FTP, cPanel > File Manager etc.

Save all files inside same Folder instead of month and year-based folders

in WordPress, By default uploaded all images store inside wp-content/uploads with sort through month and year base directories.
if you want to change it to store all media in single folder so URLs become simpler and easier to see all media files in one place instead of sorted into years.
To save all Media in same folder
Go to Wp-admin > Settings > Media and uncheck “Organize my uploads into month- and year-based folders.”

Exit mobile version