Knowledge Base

How can I change the wp-content/uploads/ folder?

If you already use Real Physical Media, all your media are already well organized in the wp-content/uploads/ folder. But in some cases or special configurations you may also want to change the name of the default wp-content/uploads/ folder. We will explain how to do that!

Change the name of the default folder

The following instructions are technical and will affect your entire WordPress system. Therefore, we recommend changing the folder name only if you are a technician who can estimate the consequences in the respective WordPress configuration.

The name of the wp-content/uploads/ folder cannot be changed directly from the Real Physical Media plugin because the wp-config.php file must be adjusted, which the plugin does not have access to. Therefore, the following steps are necessary:

  1. Open your FTP client and connect to your WordPress installation
  2. Open the wp-config.php in an editor to change its code
  3. Put the following line to the file (after all the other define commands):
    define('UPLOADS', '/wp-content/storage');
  4. Create the defined folder in the file system and make sure that the user of your web server has read and write permissions for the folder

Now the name of the folder is changed globally for your WordPress installation. Newly uploaded files are automatically placed in the new folder. Files from the previously used folder are still accessible, but will not be moved automatically.

Move existing files to new folder

If you want to move existing files from the old folder, e.g. wp-content/uploads/, to the new folder, you should not do it manually. WordPress will not recognize the manual move, so it will continue to assume the old folder. As a result, the files are displayed in the media library, but can no longer be loaded. The same way, for example, images that you have embedded in pages will no longer be displayed.

As a solution Real Physical Media offers instead a mechanism to move all files within WordPress, so that these errors do not occur. You can move the files as follows:

  1. In your WordPress backend, navigate to Settings > Media > Tab “Real Physical Media”
  2. Click on “Add * files to queue for moving

WordPress Plugins by devowl.io

Find helpful articles

Topics