Hi @whitebuffalomarketing ,
Thanks for reaching out.
This file is created within the /wp-content/uploads directory as an additional security measure to prevent any foreign scripts from running within that folder. The .htaccess file adds restrictions so that no PHP and Python script files can be run within this folder. It is completely fine for you to remove this though and won’t cause any issues other than removing that security measure. As long as you don’t allow anyone to upload PHP or Python files using the upload field, it should be fine to remove. Interestingly, the .htaccess file should be writeable by your server and this would normally indicate a permissions issue.
However, we are checking this with the team and I will update you as soon as I’ve more details on this.
Thanks!
Hello @whitebuffalomarketing ,
Thanks for being patient while we checked this with our devs.
After further checking it seems to be related to hosting settings. They restrict the creation of new .htaccess files and to make these files unworkable they add the .cpmh3129 suffix for them.
You can safely remove the .htaccess.cpmh3129 file it has zero value.
When you get some time, could you please share me the below info?-
1. Please check and let me know if you are seeing two files: .htaccess and .htaccess.cpmh3129 or only the second one?
2. Check if these directories have .htaccess files directories:
/wp-content/uploads/wpforms directory
/wp-content/uploads/wpforms/cache directory
3. Check if the file isn’t recreated again. The easiest way to check is with /wp-content/uploads/wpforms/cache directory:
- Remove the directory
- Visit
WPForms -> Addons page.
- Check if the
.htaccess file exists in the directory.
Disable .htaccess file creation
If you are have a situation when you remove the htaccess.(sometext) file but it’s recreated again, we can disable these files creation since they have zero value with the following snippet:
add_filter( 'wpforms_create_upload_dir_htaccess_file', '__return_false' ); add_filter( 'wpforms_create_cache_dir_htaccess_file', '__return_false' );
In case it helps, here’s our tutorial with the most common ways to add custom code like this.
Last but not least, please confirm when you open the https://yourdomain.com/wp-content/uploads/wpforms/ URL (change the domain as per your site URL) do you see files and folders inside it? If you can see it, this is a security problem and in that case, you need to ask your hosting provider to make the directory unavailable to see by direct URL visitors, but files should be available.
I hope this helps.
Let me know how it goes. Thanks 🙂
Hi @whitebuffalomarketing ,
We haven’t heard back from you in a few days, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!