forrey
forrey

Reputation: 31

Changes to .htaccess file keep crashing my Wordpress site

A while ago, I started having a problem where every few days, my Wordpress site would crash. Instead of loading, the site would just download the contents of index.php.

After some investigation, I found that commenting out the following line in the .htaccess file solved the issue:

AddHandler application/php-70 .php

However, my comment on that line keeps getting over-written somehow.

So here are my questions:

Additional info: Wordpress 5.4.2 on SiteGround hosting

Upvotes: 0

Views: 823

Answers (1)

Salman
Salman

Reputation: 122

Seems like some plugin is overwriting your changes in .htaccess, check this link https://wordpress.org/support/topic/php-version-change-can-break-htaccess which addresses a similar problem.

Also, you can follow the instructions here https://www.siteground.com/kb/how_to_have_different_php_versions/ and you should (if you can) change/upgrade your php version to the required version.

Alternately, you can chmod 655 .htaccess file to disable any plugins writing to it.

Upvotes: 1

Related Questions