Hi @leitner, glad you reached out!
If Solid Security’s automatic writing to the .htaccess file keeps crashing, we recommend manually adding the plugin rules to your config files (which you can grab from the Security > Tools page) instead. The code from the Server Config Rules will be added to the .htaccess file, while the code from wp-config.php Rules will be added to the wp-config.php file.
Then, disable the “Write to Files” setting in Security > Settings > Global Settings, which is responsible for the writing of rules. Don’t worry, the block and ban lists will still be enforced by the plugin even if this setting is disabled. You can find in this article what features are enforced by .htaccess.
We have a recent finding from one of our users that this usually happens when a site’s server is low on disk space, so it might help if you can check if there’s sufficient server storage.
Let me know if this helps!
Hi @chandelierrr,
thanks for your help.
I’m not able to save the settings after uncheck “Write to Files”. Error Message: licensed_hostname_prompt is not of type boolean.
I have 80GB free space left. I don’t thing this can be the problem.
Best Regards
Patrick
Hi Patrick,
I see, and thanks for checking the info on storage space!
For that specific error, the instructions from this thread provided by nlpro should help resolve it. Can you please try it on your end and then confirm if you can save the Global Settings after?
Hi @shanedelierrr,
this fixed the issue with the global settings.
I could see, that your linked thread treated exactly the same issue as mine.
Is there any general fix? Disabling “Write to Files” is only a workaround.
What else I could determine: when the issue happens, my .htaccess file has always 400 lines. And the last line (line 400) is only written half.
I couldn’t found PHP-Errors at the time where the .htaccess file was written.
Hi @leitner,
Glad to hear that fixed it!
There is no general fix for this at the moment frankly because it’s not replicable and so far only several people out of 900,000+ have experienced the issue. All of our efforts so far have been unsuccessful, but the moment we can replicate a problem, we can go about fixing it.
Some web hosts and/or third-party plugins take measures to prevent or improve security by trying to stop the writing to key files (such as wp-config.php and .htaccess), and our best guess at this point is that some setting on the host or within a third-party plugin is interfering with the expected writing to that file. However, we are currently unable to replicate this behavior, so we’re stuck.
For now, that workaround is our best suggestion to resolve the issue.
I hope this helps!
@shanedelierrr
Since I’ve set licensed_hostname_prompt to false, all works fine now.
“Write to Files” is still enabled and no more crash could be noticed.
I think the empty licensed_hostname_prompt causing this error.
Hi @leitner, I see. We’ll be looking into this. Thank you for the update!