• So my site was flagged for using too many resources by the web host.

    As a result I have done a lot of optimising and it’s looking great performance-wise.

    However, the big issue now is that something (I’m guessing, a plugin) is altering my htaccess file on pretty much a daily basis and is crashing the site, causing a 500 error.

    Now the advice is to shut off all plugins and turn them on one by one to see what the problem is. However, I have a fair few plugins and it seems to take around 24 hours for the site to crash.

    Without many of the plugins, my site would be vulnerable for attack and would probably use more resources (my web host is on the verge of kicking me). So does anyone have another way to remedy the problem without spending two weeks turning pugins on one by one, one a day?

    Specifically, the error seems to be caused by something writing the following numerous times over and over in the htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you are using so many plugins that your webhost is on the verge of booting you, that is a big problem. You either need to use fewer plugins or upgrade to a VPS or dedicated hosting. I’m not sure what your server setup is, but you may have something funky going on there.

    Without many of the plugins, my site would be vulnerable for attack and would probably use more resources

    Fewer plugins = fewer resources.

    FYI: All sites are vulnerable to attack. It makes sense to harden WordPress, but having multiple plugins that do the same or similar things can (i.e., generally does) lead to problems. Using plugins from sources other than www.remarpro.com can also cause issues (since they don’t get checked over by the WordPress team).

    If you feel that you really need all those plugins, you can always temporarily disable just half of them. If the problem goes away, it was most likely one of the deactivated plugins that was the issue. Reactivate half of those plugins. If the problem does not recur, it’s in the one-fourth of the plugins that is still deactivated. If it comes back, it’s in one of the plugins that you reactivated. You can continue to winnow out your plugins until you find the one that is (may be) causing the issue. Since your error takes 24 hours to show up, this may be a faster method to narrow it down.

    Hope this helps.

    This is not a solution but a quick fix. Change the permission of the .htaccess file and only allow the user write access, make group and public have only read access. This should technically stop whatever is going on from writing to the file.

    Not to scare you but from what you are describing your site may have some kind of malware infection. I would reinstall the core files and all plugins. You can use something like Wordfence or Sucuri to scan for potential infections. Sucuri can also do a mass re-install of all plugins.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP or plugns breaking htaccess file.’ is closed to new replies.