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

*
Share on Google Buzz

Share and Enjoy:
  • TwitThis
  • del.icio.us
  • StumbleUpon
  • Digg
  • Mixx
  • Reddit
  • Design Float
  • Facebook
  • Sphinn
  • Google Bookmarks
  • email
  • Print

18 Comments: Comment or Ping

  1. 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

  2. @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.

  3. Alan

    Perfect, worked great. My 1&1 Wordpress blogs are now working exactly how they should. Thanks so much!

  4. @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.

  5. 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

  6. @JoeTaxpayer -

    Glad this worked!

  7. 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.

  8. great information thank you

  9. Sam

    Nice, this was extremely easy and helpful.

  10. That was a life saver. Why do they still use PHP 4 as the default, its prehistoric!

  11. 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 My ComLuv Profile

  12. Alex McAulay

    you rock. thanks so much for putting this up.

  13. 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.

  14. joe

    ignore last comment. im all set.

  15. 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.

    Trackbacks

Reply to “Running PHP 5 for WordPress with 1&1 Hosting”

CommentLuv Enabled

Contact

Questions, inquiries or just feel like getting in touch, feel free to do so: