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 PHP 5 and your database will begin setup.
Since we created a new database and chose the option of MySQL 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























18 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
Trackbacks
Reply to “Running PHP 5 for WordPress with 1&1 Hosting”