After installing WordPress on shared hosting with 1&1 or OVH, you may encounter a 500 error when accessing your site. This happens because the wrong PHP version is used by default.
To fix this, add the following lines to your .htaccess file:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
# END WordPress
To prevent anyone from modifying this file, revoke write permissions (chmod 444). After this change, the 500 error should be gone.
Do you have a question or a suggestion about this post? Contact me!