• Resolved Joanna

    (@joannacraig)


    I have started with a new install of WP 5.8.1, and Woo 5.7.1 and checked on standard WP theme and it shows this alert message at the top of the dashboard:

    Your store’s uploads directory is browsable via the web. We strongly recommend configuring your web server to prevent directory indexing.

    I contacted my host who says the directory isn’t browsable. I have IThemes Security plugin which also stops directory browsing.

    If I disable every plugin except Woocommerce, the message still shows up. And even clicking on the ‘Dismiss’ at the end of the alert doesn’t get rid of it.

    It appears to be a false positive but won’t look good to my client. Please advise.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mirko P.

    (@rainfallnixfig)

    Hello @joannacraig,

    I searched around and found a similar thread on the same issue:

    https://www.ads-software.com/support/topic/your-stores-uploads-directory-is-browsable-via-the-web-we/

    It looks like you can use this snippet to remove the notice permanently:

    function filter_woocommerce_show_admin_notice( $true, $notice ) {
        if ( $notice === 'uploads_directory_is_unprotected' )
            return false;
        // Default
        return $true;
    }
    add_filter( 'woocommerce_show_admin_notice', 'filter_woocommerce_show_admin_notice', 10, 2 );

    As a side note, I would recommend using a plugin like Code Snippets to add custom PHP code into your site without directly accessing the functions.php file.

    Hope this helps.

    Thread Starter Joanna

    (@joannacraig)

    I had seen that linked earlier post also but I was wondering why it has triggered? The link with info suggested that Woocommerce had corrected it in a later update so I was wondering why it was showing in the first place? And shouldn’t that be something for Woocommerce to resolve?

    Thanks for your help @rainfallnixfig !

    Thread Starter Joanna

    (@joannacraig)

    Interestingly – I have downgraded the PHP to 7.4 and don’t seem to have an issue now?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Your store’s uploads directory is browsable notice’ is closed to new replies.