• Resolved Gioxx

    (@gioxx)


    Hello.

    This is the third week in a row that I have been forced to use the backup (fortunately always available) files to retrieve htaccess and wp-config, which turn out to be completely empty, effectively rendering the website unusable (were it not for Cloudflare’s cached pages, which at least do not present me with 404s). There is no shortage of disk space (so what is reported in this thread cannot happen: https://wordpress.org/support/topic/fatal-error-empty-wp-config-php-and-htaccess-files-when-disk-is-full/).

    This problem is relatively new, I have been using the plugin for several years and this had never happened in the past. Is there a possible explanation or do we have to give up the option that goes to independently update those two files?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hello @gioxx,

    Glad you reached out to us! That definitely sounds frustrating, and we’re here to help.

    Solid Security has a feature called Write to Files, which controls the plugin’s ability to update your wp-config.php and .htaccess files. It is enabled by default and when it does, it runs an hourly task to regenerate and write security rules to those files.

    In some cases, if the scheduled process gets interrupted (ex. permission issues, server-level caching, I/O issues, disk storage problems), it can leave those files incomplete or empty.

    To prevent this from happening again, we recommend disabling this setting and manually writing the rules to your files instead. Please review the steps here on how to do that: https://solidwp.com/documentation/security/how-it-works/security-settings/#h-write-to-files (see Best Practices)

    This stops the automated rewrite process while keeping your existing security rules intact. Don’t worry, Solid Security will continue working normally.

    Hope this helps, and let us know how it goes.

    Thread Starter Gioxx

    (@gioxx)

    That (to disable the option) had already done that in the meantime, because it happened this morning as well, and of course I’m a little tired of always having to go and restore the backup of the two files involved.

    That said, I don’t understand then where the comfort lies and – more importantly – what has changed. This behavior is relatively new, I have been using the plugin for many years but only recently has it started to behave this way. I do not understand what has changed.

    tsuo

    (@tsuo)

    I have the same problem (to disable the option)

    How do I manually write the rules to the file?

    https://solidwp.com/documentation/security/how-it-works/security-settings/#h-write-to-files

    No explanation provided.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @gioxx,

    Thanks for getting back to us! I understand how concerning this behavior is, as it’s causing your site to crash.

    There haven’t been any recent changes to this module, and from what we’ve seen, this behavior typically occurs under certain hosting conditions for example, on shared servers or when there are file permission or disk space issues that interrupt the write process.

    We’ve had a hard time catching this behavior ourselves, as we haven’t been able to reproduce it in our test environments.

    For now, the best workaround to prevent it from happening again is to keep “Write to Files” disabled. If the issue persists, I recommend asking your host to review the server’s file system and I/O logs for any write or permission errors, as well as testing on a fresh install or different server.

    Hi @tsuo,

    Thanks for the flag about our doc! I’ll make sure to get it updated.

    In the meantime, in your Security > Tools page, you’ll find the Server Config Rules and wp-config.php Rules sections containing the Solid Security rules that need to be added to the config files.

    The code from the Server Config Rules will be added to the .htaccess file (Apache config file) while the code from wp-config.php Rules will be added to the wp-config.php file (WordPress config file).

    Hope this helps!

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi there,

    Just checking back in to make sure everything’s working for you now. Since we haven’t heard back, I’ll assume things are resolved and close this thread.

    If you run into any more issues, please feel free to open a new thread and we’ll be glad to help.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.