I am a great fan of using WordPress not only to run blogs, but also as a Content Management System. The team behind WordPress ensure that the software is updated regularly, adding new features and bug fixes. When I came recently to updating this blog to version 3 of WordPress, I encountered an issue that I hadn’t seen before with WordPress and in particular on the 1and1 hosting that it uses. To be more precise it is the way 1and1 (oneandone) handles or parses php files
Error 500 – Internal server error An internal server error has occurred! Please try again later.
It didn’t take long to track the problem down to the way 1and1 hosting parses php files. By default 1and1 will use PHP version 4 to parse scripts. It seems that WordPress 3 requires part of its program to run through PHP5. To tell 1and1 hosting that you want php files parsed with version 5 of PHP, follow the steps below by creating an htaccess file with some special commands
- Create a new text file, using Notepad
- Add the following code to the top of the file, save it, and name it as htaccess.txt
AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php
- Upload your modified htaccess.txt file into your wordpress root folder using FTP
- Rename the htaccess file, using your FTP program, from htaccess.txt to .htaccess (notice the dot before htaccess, that is important)
- Go back to WordPress and test
- Note that you may already have an .htaccess file sitting in your WordPress root folder, if so, FTP the file from your 1and1 hosting to your computer and add the two lines above to the end of the htaccess file, then upload again, overwriting the original htaccess file. (you may want to rename the original htaccess file before overwriting, just in case)
From now on any php scripts that are served out of your WordPress root folder will be processed by PHP5.
This is a common problem with 1and1 hosting, but one which is easily solved and not only works for wordpress but for any other script, such as content management systems, social networking scripts (elgg) etc. Note that I am now moving my sites away from 1and1 to a more traditional hosting provider that uses cPanel and offers far superior support, I just can’t get on with the new 1and1 control panel look.

No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
Tags: 1and1, php4, php5, wordpress3












didn’t work
Sorry barty, without any more information from you I cannot help. Check your error log for more info.
Thanks for the detective work, clear explanation, and solution!
I encountered exactly the same problem after activating a particular plug-in under WP 3.0 on 1and1, and your fix seems to have solved it for me.
Thanks again…
…Bill
No problem. This situation is not just applicable to wordpress, but to any script (such as content management) that runs on PHP5.
Thanks very much , i’d struggled for days with this and its now sorted. All down to 1and1 as you suggest, but this fix worked for me. Cheers
Thanks so much for sharing this… worked for me!
it didn’t worked for me!
but thank u at all.
Thanks a ton! Worked perfect for me, this is what I have in my .htaccess file now for anyone curious:
# BEGIN WordPress
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Thanks for the help – your advice worked like a charm
much appreciated.
Thank you so much! This worked for me!
Thank you very much for posting this! Worked great – I have been looking for a solution to this for a while now. Thanks!
Thank you, thank you, thank you. I was almost considering moving all my domains to a new host to solve this problem, but this worked. HUGELY appreciated.
-Mike
[...] my site stopped working. Fortunately, the solution was pretty simple, and best explained over at Berkhamsted, which I found through a simple Google search. And that’s great, because I was seriously [...]
I can’t thank you enough!!! I was having other problems with WP, not just the Internal Server Error 500. And they all went away when I did this!!
I will list the other problems here, just in case somebody else does a search for those problems and might find the solution here:
- Plugins and Incoming Links on the Dashboard would not load.
- Cannot install themes from the “Install Themes” tab. When I tried to install a theme that way, it would lead to a page that said “downloading…” but would not make any more progress beyond that.
Great. Thanks. Solved my problem.
Since this post, I am slowly moving my sites off of 1and1 and onto some superior hosting provided by clook.net
You’re my hero for posting this. I’ve been running into that same error with a Magento site that I’m working on that’s hosted by 1and1. I’m hoping that this helps that too!
Thanks so much.
Dude…..I have been fighting this issue for months and months! You solved it.
Can’t say thank you enough for documenting this.
[...] The issue is how 1&1 handles or parses php files. A simple fix and WordPress is as stable as everyone has said it was for years now. I owe the solution and you can find it at This Blog. [...]
Thank you thank you thank you!
Been struggling with this for a while, your instructions worked perfectly!
Thank you works perfectly, very simple solution to a very common problem with 1and1
Thanks man, there are a lot of sites explaining this, but only your was clear and working.
Awesome! I try to tell clients to run away from 1and1, but they’re cheap and won’t do it. So when somebody surprises me with “my host is at 1and1″ I’m never happy. Right now, I got somebody who’s site would not work… until I tried this fix. It’s chugging along smoothly. Thanks!
Hi Sara, no problem! 1and1 may be cheap but there are tons of better hosting options out there. Have you seen the new 1and1 control panel? It’s horrible and even worse to move around than the previous incarnation
worked like a charm…. thanks so much. I have spent the better part of the past couple of days trying to get this corrected.
peace!
[...] Check if your web-host is running any version 5 of PHP or MySQL. If they are you can enable PHP5 by using this handy htaccess trick [...]
Thank you for this. You’re a god sir
1&1 allows to chose which PHP version you want to use by default (global PHP version). So, you can just pick PHP5 for the miracle to happen…
jesus christ, that fixed all my issues on 4 different sites! THANK YOU SO MUCH!!!