Viewing 3 replies - 1 through 3 (of 3 total)
  • You can easily change the uploads folder (or even the entire wp-content folder) by defining the custom location in the wp-config.php file: https://developer.www.ads-software.com/advanced-administration/wordpress/wp-config/#moving-uploads-folder

    Of course, the new location has to be publicly accessible.

    If wp-config.php alone fails to meet your requirements due to path limitations, you can utilize hooks and filters in your theme’s functions.php file or a custom plugin.

    Add this code to your theme’s functions.php file or a custom plugin:

    function custom_upload_dir($dirs) {
    $dirs['path'] = '/yourfile_path/uploads1';
    $dirs['url'] = 'https://examplesite.com/uploads1';
    return $dirs;
    }
    add_filter('upload_dir', 'custom_upload_dir');

    Another Solution

    Use a plugin: There are plugins that let you change upload paths. You might need to look into plugin options like:

    Check to see if the WP Uploads Directory Manager allows you to set paths outside of the default folders.

    Make sure that any plugins or custom code you employ have been thoroughly tested to avoid potential file management and security risks.

    Thanks

    Thread Starter user459785

    (@user459785)

    Thank you for your tips!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.