How To

Customize WordPress Uploads Directory

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.

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.

John Darrel

Change Database Prefix in WordPress

Because hackers often use bots to search for security flaws in your website, it is…

1 year

WP Ghost and WP Rocket Cache

To hide all CSS and JS you need to follow the steps to Combine the…

1 year

Why is website security important?

https://youtu.be/6ylhojSi-_E In this video, we’ll explore why website security matters and what can happen if…

1 year

Is WordPress Website Easily Hacked?

The security of your WordPress site depends on multiple factors, such as the strength of…

1 year

Setting up Two-Factor Authentication (2FA) for WordPress Using Mobile Apps

When you enable two-factor authentication (2FA) for your WordPress website, it adds an extra layer…

1 year

7G Firewall for WordPress

One of the benefits of using the 7G Firewall is that it's highly customizable with…

1 year