• I’ve encountered this issue a few times now. I recently launched a WordPress site and everything was working fine until today, when all pages except the homepage started returning 404 server errors.

    After some investigation, I found that the .htaccess file had been modified. Specifically, the default WordPress rewrite rules had been removed. This appears to have been caused by the Solid Security plugin.

    Here’s a snippet from the WP_DEBUG log just before the issue occurred:

    [01-Jun-2025 10:41:30 UTC] Cron reschedule event error for hook: itsec_cron, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {“schedule”:”daily”,”args”:[“identify-server-ips”],”interval”:86400}
    [01-Jun-2025 10:41:31 UTC] Cron reschedule event error for hook: itsec_cron, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {“schedule”:”daily”,”args”:[“clear-locks”],”interval”:86400}
    [01-Jun-2025 17:26:36 UTC] Automatic updates starting…
    [01-Jun-2025 17:26:36 UTC] Automatic plugin updates starting…
    [01-Jun-2025 17:26:36 UTC] Automatic plugin updates complete.
    [01-Jun-2025 17:26:36 UTC] Automatic updates complete.
    [02-Jun-2025 05:27:31 UTC] Automatic updates starting…
    [02-Jun-2025 05:27:31 UTC] Automatic plugin updates starting…
    [02-Jun-2025 05:27:31 UTC] Automatic plugin updates complete.
    [02-Jun-2025 05:27:31 UTC] Automatic updates complete.

    It seems like the same issue described here: https://wordpress.org/support/topic/htaccess-becomes-corrupt/

    For now, I’ve disabled the Write to File option to prevent any further changes…

Viewing 1 replies (of 1 total)
  • Plugin Support kmarusek

    (@kmarusek)

    Hi there,

    You’re right — this does sound like the same .htaccess overwrite issue discussed in the thread you linked. This usually happens when multiple plugins or tools are writing to .htaccess, and the Solid Security rules get overwritten.

    To resolve this going forward:

    1. Restore a clean .htaccess by going to WP Admin > Settings > Permalinks and clicking “Save.”
    2. Manually re-add any missing Solid Security rules if needed. You can regenerate them by toggling the related features off and on, or copy them directly from this guide:
      👉 What rules are enforced by the .htaccess file in Solid Security Pro?
    3. If you’re using a tool like cPanel, LiteSpeed, or a redirect plugin, double-check for any automatic .htaccess changes that might be overwriting rules.
    4. To avoid repeat issues, try to limit how many tools or plugins are modifying .htaccess dynamically.

    That should give you everything you need to bypass and prevent this in the future.

    I know this issue is still elusive and we’ve yet to replicate it on our side, but I’ll go ahead and flag it with the team tomorrow so we can take another look internally.

Viewing 1 replies (of 1 total)

The topic ‘404 server error and corrupted htaccess file’ is closed to new replies.