Changes to Wordpress htaccess file

Avatar
  • updated
  • Answered

About every 2 to 3 weeks the following code is automatically added to my htaccess file and I cannot access or login to my website:

# php -- BEGIN cPanel-generated handler, do not edit

# Set the “ea-php70” package as the default “PHP” programming language.

<IfModule mime_module>

AddHandler application/x-httpd-ea-php70 .php .php7 .phtml

</IfModule>

# php -- END cPanel-generated handler, do not edit

Any ideas why and how this occurs and what I can do to stop it or keep it from preventing access to my website?

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

The addhandler directive you posted is going to be changing the site's PHP version from whatever you had previously it set as to the version listed. Please check your PHP configuration settings in cPanel using either the PHP Configuration Tool or the MultiPHP Manager. It is possible that those are set to PHP 7 and are replacing the addhandler directives every time you remove them from .htaccess.

If that does not appear to be the issue, I would suggest getting in touch with our 24/7 Technical Support team to see if something else is causing it. 

Avatar
anonymous
  • Answer
  • Answered

The addhandler directive you posted is going to be changing the site's PHP version from whatever you had previously it set as to the version listed. Please check your PHP configuration settings in cPanel using either the PHP Configuration Tool or the MultiPHP Manager. It is possible that those are set to PHP 7 and are replacing the addhandler directives every time you remove them from .htaccess.

If that does not appear to be the issue, I would suggest getting in touch with our 24/7 Technical Support team to see if something else is causing it.