Change uploads Path Using Code

This solution is simple, but it involves editing a core WordPress file.

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

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

define( "UPLOADS", "wp-content/storage" );

This will make all your media uploads go into a folder named “storage”, but they will still be inside the “wp-content” folder.

If you want the uploads to go in a direct folder, like https://domain.com/storage, then use the following code instead:

define( "UPLOADS", "storage" );

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

require_once ABSPATH . 'wp-settings.php';

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

Change uploads Path Using WP Ghost

The easiest way to change the default media uploads path is to use the WP Ghost plugin.

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

For example, your current media uploads path may look like this: https://domain.com/wp-content/uploads. Using this plugin, you can customize it to https://domain.com/storage.

Custom uploads directory

Note! This plugin will not physically change the uploads directory, but it will use rewrite rules. You don’t have to move the images and everything goes back to what it was if you deactivate the plugin.