How To Change The Default WordPress Media Uploads Folder

How To Change The Default WordPress Media Uploads Folder

This disappointed many bloggers. Mostly because using a custom media uploads directory made it easier to browse media files in one place rather than having to browse in multiple folders by month and year. It also had a small SEO benefit, especially when you host multimedia files such as PDFs.

Luckily, there is a way you can get around this problem and customize the default media uploads path of your website. Here’s how you can do it.

Note: Following strategies involve customizing your website’s core files and editing code. Make sure to fully backup your website and files before trying out any of these methods.

Method #1 – Use A Plugin

The easiest way to change the default media uploads path is to use the WP Original Media Path plugin.

Once installed, this plugin will allow you to easily change the default media directory into any path you like.

For example, your current media uploads path may look like this: You can customize it to a more professional path like using this plugin.

Keep in mind that this plugin will only change the uploads folder for your future uploads. You’ll have to manually move the media files to the new folder if you want them to appear in the new and updated media path.

If you decided to move the media files, you can then use the Search & Replace plugin to modify MySQL to make sure your previously published articles find the media files from the new uploads folder.

Method #2 – Customize WP-Config.php

The other method is also simple, but it involves editing a core WordPress file.

First, access the root directory of your WordPress installation using the File Explorer in your web hosting CPanel or using an FTP client. Then find a file named wp-config.php and open the file to edit.

Then add the following line in the wp-config file:

define( ‘UPLOADS’, ‘wp-content/’.’media’ );

This will make all your media uploads go in a folder named “media”. But it will still be inside the “wp-content” folder.

If you want the uploads to go in a direct folder, like, then use the following code instead:

define( ‘UPLOADS’, ”.’media’ );

Also, make sure to add the following code right before the line as well:


This will automatically create a folder in the WordPress directly if it doesn’t exist. Or, you can manually create the folder in the right path using the FTP client.

The post How To Change The Default WordPress Media Uploads Folder appeared first on WPRecipes.

What’s My SEO Score?

Enter the URL of any landing page or blog article and see how optimized it is for one keyword or phrase.

Wordpress Expert

Leave a Reply