Hello @svadr!
Yes, every time you update/activate the WooCommerce plugin, the .htaccess file will be automatically created in the ‘Woocommerce_Uploads’ folder (on the Apache servers). So, this is expected behavior. However, this file is generated and updated according to the preferences set in the “WooCommerce > Settings > Products > Downloadable products” section and there is no need to manually delete it.
1. If you have “File download method” set to “Redirect only (Insecure)”; in addition to the secure links (mentioned below), your downloadable files will also become available via the direct file URLs, i.e. in the format: https://example.site/wp-content/uploads/woocommerce_uploads/2022/10/filename.pdf
This means that anyone with this link can access and download your file(s); so this is an insecure link. Your ‘Woocommerce_Uploads’ directory won’t have any access restrictions, WooCommerce itself will make the necessary changes in the .htaccess file to ensure this.
2. But, if you set this option to “Force downloads”; your ‘Woocommerce_Uploads’ directory will be locked (using the .htaccess rules automatically created by WooCommerce), and the downloadable files will be served via auto-generated URL(s).
Path format of such files would be something like: https://example.site/?download_file=%5BID%5D&order=wc_order_EIhqnfCFqnyes&uid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&key=xxx-xxx-xxx-xxx-xxxxxxx
If ‘force downloads’ is enabled, direct file URLs will return a ‘403 forbidden’ error.
3. So, if you want your files to be accessible via their direct links, **”File download method”** should be set to “Redirect only (Insecure)”. Also, there is no need to delete .htaccess file; this should be automatically handled.
Please make sure that your settings are saved accordingly; if you still face problems, please paste your site’s status report back here so we can take a closer look.
Also, paste here a screenshot of your “WooCommerce > Settings > Products > Downloadable products” page. Make sure that you blur/cut the portions with sensitive information; we only need to check your settings.
Best!