Running PHP 5 for WordPress with 1&1 Hosting
If you are on a shared hosting plan with 1&1 it’s relatively easy to create a new MySQL Database for your WordPress installation.
Creating Your New Database
Just sign into your account and navigate to Web Space & Access and then to MySQL Administration. Click on “New Database” and you will be prompted to name your new database along with the option of choosing between MySQL 4.0 and MySQL 5.0 for your new database. WordPress Requirements state that WordPress need PHP 4.3 or higher to function properly although a few plugins require that you use PHP 5 to function. Choose MySQL 5 and your database will begin setup.
Since we created a new database and chose the option of MySQL 5 your database is using PHP 5 right? Unfortunately that’s not the case.
Checking Your PHP Version by Creating a phpinfo.php File
1&1 will have your new database running PHP 4.4.9. Easiest way to check what version of PHP you are running is to create a phpinfo.php file and insert the following.
<?php phpinfo(); ?>
Upload this file to your directory and open phpinfo.php in your web browser.
The information at the top of this window will display the version of PHP that you are running.
Forcing 1&1 to Use PHP 5
It only takes 2 lines added to your .htaccess to force 1&1 to use a version of PHP 5. Add the following to the first 2 lines in your .htaccess file.
AddType x-mapp-php5 .php AddHandler x-mapp-php5 .php
Once you make the edits to your .htaccess upload it to your directory and once again open phpinfo.php in your web browser. You should now be able to see that your database is using PHP 5
Quick Tip from JG in the comments:
I found once I updated the .htaccess file, then all my links would break from the homepage. What I did was go to the permalinks page under settings and click ’save changes’. You don’t have to actually change anything.Then when I found pages that wouldn’t load, simply refreshing the page made them work again.





















44 Comments: Comment or Ping
Simon
Many many thanks for this fix. I find it damn annoying that 1&1 support is akin to a paper umbrella in a downpour when their product seems pretty good and robust for the money.
Thanks again
Apr 20th, 2009
gabediaz
@Simon -
Yea it sucks that one has to go in and manually make edits to 1&1′s system when the average user would not know how to do it nor know where to look for info on fixing their issue.
Apr 20th, 2009
Alan
Perfect, worked great. My 1&1 WordPress blogs are now working exactly how they should. Thanks so much!
Jun 18th, 2009
gabediaz
@Alan -
Awesome!
I found it very frustrating that even though 1&1 asks for you to choose php4 or 5 that you have to manually force 1&1 to use PHP5…hopefully one day they will correct this issue.
Jun 21st, 2009
JoeTaxpayer
Hey. I found this post by googling 1&1 wordpress, hoping to find some 1&1 discussion regarding this. Your advice worked perfectly, and the PHP5 – only plugins now work. Thanks!
Joe
JoeTaxpayer’s last blog post..My Favorite Kind Of Bar
Jul 11th, 2009
gabediaz
@JoeTaxpayer -
Glad this worked!
Jul 14th, 2009
Anthony Ogden
Brilliant, thank you for letting people know, I was looking for an option in the admin somewhere but couldn’t find one to switch to PHP 5.
Thanks again.
Oct 15th, 2009
cashman
great information thank you
Nov 10th, 2009
Sam
Nice, this was extremely easy and helpful.
Nov 25th, 2009
Navin Soni follow me on Twitter
That was a life saver. Why do they still use PHP 4 as the default, its prehistoric!
Apr 2nd, 2010
oral seymour follow me on Twitter
thanks for the tip. 1and1 is one of the cheapest yet with a good set of features but its little things like this that stop them from being one of the best.
.-= oral seymour´s last blog ..AT&T Switching from Unlimited 3G Data to Tiered Pricing =-.
Jun 12th, 2010
Alex McAulay follow me on Twitter
you rock. thanks so much for putting this up.
Jun 15th, 2010
joe
Having trouble changing my .htaccess file on 1and1. changes are not sticking .. am i missing a permissions change?
using logs\.htaccess this is the correct location?
dropping one in my wordpress dir. worked fine, but getting random access requests.
please help i have noobed all over my self.
Jun 18th, 2010
joe
ignore last comment. im all set.
Jun 18th, 2010
JG
Thanks this worked a treat for me – but had one problem I found a work-around for if anyone needs it:
I found once I updated the .htaccess file, then all my links would break from the homepage. What I did was go to the permalinks page under settings and click ‘save changes’. You don’t have to actually change anything.
Then when I found pages that wouldn’t load, simply refreshing the page made them work again.
Jul 30th, 2010
Emily
Thanks for this. I’ve been wondering why the automatic upgrades on my new WP install won’t work. Hopefully this will work toward fixing my import issues, too!
Worked really well, and I’m PHP clueless.
Jul 30th, 2010
gabediaz
@Navin & @Oral – Not sure why 1&1 still does this but I’ve they are phasing out MySQL 4 and will be setting MySQL 5 as a default, wondering if they will do the same with PHP 5.
@JG – Thanks for the permalinks tip, I’ve updated the post with your comment!
@Alex @Joe & @Emily – Glad it helped!
Aug 4th, 2010
Phil
This post of yours is a miracle
Several months ago I was creating a new joomla based site and was having nothing but problems. This website fixed everything in 30seconds!
Since then I’ve bookmarked this page and come back here anytime I’m making a new site. I guess I could have simply written down the code, but I’m sure you enjoy the visitors lol.
Anyways after how many times I’ve used this trick (just used it again on my newest site http://www.MyLocalYoga.com) I figured I owed you a comment. Thanks again, this has helped me (and I’m just tons of others) so much!!!!!
Aug 11th, 2010
gabediaz
@Phil – Anytime! It’s good to hear that these fixes are useful to others. Thanks for stopping by!
Aug 12th, 2010
badtheba
Thanks so much for this info, I am working on several Joomla websites under one account, and was hoping not to have to go to any extremes, and was definitely wanting to avoid the dreaded support call to 1and1. I will be working on this tonight and see what results I get.
THANKS!
Sep 14th, 2010
badtheba
This same info is on their support pages, but Google searches would lead me to your site long before I’d ever find it here: http://faq.1and1.com/scripting_languages_supported/php/5.html
However, this page does indicate that after Q3 2010 everything will be using PHP 5, so at least they offer some explanation.
Sep 14th, 2010
badtheba
Sorry for yet another post, but this was really stopping me from using Shadowbox in a Joomla installation, and after checking the PHP version on one of my folders, I then uploaded the .htaccess file to each folder in my account that I had a URL mapped to. Shadowbox works perfectly!
Thanks again.
Sep 14th, 2010
gabediaz
@Badtheba – Glad it helped! I saw that 1and1 mentioned MySQL 4 so good to see they are also planning to move away from PHP4 as the default.
Sep 15th, 2010
509 Graphics
Has anyone ran into an internal server error with the .htaccess file? Once 1&1 made mySQL5 the default after creating a new database, I began getting errors when trying to install WordPress. In the past, when it was automatically set to mySQL4, I was able to use the .htaccess file without issue to get things running on mySQL5.
Deleting the .htaccess file gets everything running for WordPress, however I have a client who purchased a plugin that requires PHP5.
Thanks,
Kevin
Oct 18th, 2010
Jessica
Ummmmm am I the only one here who can’t save their .htaccess edit? I add the code to the file but when I try to upload it to the server it says “critical transfer error”. Help?
Oct 19th, 2010
gabediaz
@Jessica – Sounds like you may not have permission to upload to the directory or to overwrite the file. Make sure you are in the correct directly, have correct permissions and are able to upload anything…else you will need to contact 1&1 support
Oct 21st, 2010
Adam
Thanks so much, bugging me this!. Works great, runnin at
5.2.14
Jan 8th, 2011
DA_Hansen
THANK YOU – THANK YOU – THANK YOU !!!!!!!
I had updated WordPress to latest version (Jan. 1st) and then later got a notice about an Atahualpa upgrade … tried 4 times to do automatically, finally did manual. All the time since 1st theme upgrade attempt, I could NOT edit any page! Got list of pages, chose one, clicked EDIT, and got a blank page – horrors!
Anyway, came across your info via juggledad Oct 29/2020 “do a google search ’1&1 php faq’ ” and decided I should do this. THANK YOU ! I can now edit pages again!
Jan 19th, 2011
gabediaz
Very welcome DA_Hansen, enjoy!
Jan 23rd, 2011
Leeka K. follow me on Twitter
I followed these directions over and over again and all I get when I am trying to check if I now have php5 is 500 Error!
Help please!
Feb 17th, 2011
Leeka K. follow me on Twitter
Never mind!
Just wanted to say that my problem was this: I was not saving .htaccess file correctly! Instead of saving it as plan .txt file, I was saving it as .rtf! As soon as I caught that- everything worked perfectly!
Feb 17th, 2011
gabediaz
@Leeka – Sounds great, glad you figured it all out!
Feb 17th, 2011
rajat
there’s the htaccess code for wordpress on this site you can just copy it
http://taigeair.com/2011/05/16/force-php5-on-1and1-wordpress/
May 18th, 2011
Lightning Rod
Not working for me. I still get the same error message when I try to install WordPress on my 1&1 server:
“Your server is running PHP version 4.4.9 but WordPress 3.2.1 requires at least 5.2.4.”
I have created an .htaccess file as a text file with the following data:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
RewriteEngine on
And uploaded it to the root directory of a subfolder of my site (where WordpPress is installed) – same level as the file index.php.
Any helpful suggestions appreciated.
Aug 9th, 2011
Micheal Sharrieff
Good write-up, I am regular visitor of ones web site, maintain up the nice operate, and Its going to be a regular visitor for a lengthy time.
Aug 24th, 2011
Sue Czosek
Its a pity you dont have a donate button! Id most certainly donate to this excellent blog! I guess for now ill settle for book-marking and adding your RSS feed to my Google account. I look forward to fresh updates and will talk about this blog with my Facebook group. Chat soon!
Aug 24th, 2011
David follow me on Twitter
ah – thank you … good old 1and1 … changed the global PHP set up in the admin area … waited 20 minutes … still nothing! Changing the .htaccess file was perfect. Thanks again.
Oct 20th, 2011
Sean T.
I am surprised that even today this is still needed advice (no thanks to 1AND1). Once I learned what may be going on after I upgraded WordPress I had to downgrade my version of WP and then found your tips, the helpful PHP version script and the “update permalinks” advice which solved my problem. Thanks for the clear, concise and helpful information! Now all I need to do is start posting again…
Nov 13th, 2011
Marcus Janz
THANKS!!! This is exactly what I was looking for!
Jan 4th, 2012
Trackbacks
Reply to “Running PHP 5 for WordPress with 1&1 Hosting”