Running PHP 5 for WordPress with 1&1 Hosting

Update: 1&1 Hosting Transition to PHP5

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 for WordPress 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 only the following into your file.

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. Your .htaccess file will be in your root directory for your installation, it may be hidden so in your FTP program see if there is an option to display hidden files.

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.

02. February 2009 by Gabe Diaz
Categories: Blog | Tags: , , | 60 comments

Comments (60)

  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

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

  2. Pingback: Umstellung auf WordPress 2.8 - saxlog - Der lange Weg zum Tenor-Saxophonisten

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

    • @Alan


      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.

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

    JoeTaxpayer’s last blog post..My Favorite Kind Of Bar

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

  6. great information thank you

  7. Nice, this was extremely easy and helpful.

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

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

  10. you rock. thanks so much for putting this up.

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

  12. ignore last comment. im all set.

  13. Pingback: I'm Just Sharing » Blog Archive » My Blogs Are Finally PHP 5.2!

  14. Pingback: 1and1 changes for automatic Wordpress 3.0 updates — Exception code: 0x8badf00d

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

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

  17. @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!

  18. 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 I figured I owed you a comment. Thanks again, this has helped me (and I’m just tons of others) so much!!!!!

  19. @Phil – Anytime! It’s good to hear that these fixes are useful to others. Thanks for stopping by!

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

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

    However, this page does indicate that after Q3 2010 everything will be using PHP 5, so at least they offer some explanation.

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

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

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


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

    • @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 🙁

  26. Thanks so much, bugging me this!. Works great, runnin at


    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!

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

  29. 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! 🙂

  30. @Leeka – Sounds great, glad you figured it all out!

  31. Pingback: force php5 on 1and1 wordpress | taigeair

  32. Pingback: force php5 on 1and1 wordpress | taigeair

  33. there’s the htaccess code for wordpress on this site you can just copy it

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

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

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

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

  38. 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… 😛

  39. THANKS!!! This is exactly what I was looking for!

  40. Thanks so much for this.

    Had the php wrong version error, this set me free.


  41. Hey folks,

    I’m super amateur when it comes to this stuff, but I found something interesting and wanted to share.

    I tried this .htaccess stuff for at least 1 hour and I couldn’t manage to get my ftp to load it to the site. Probably something to do with my lack of skills.

    Out of frustration, I went back into the 1and1 control panel and I was messing around with the Global PHP selector. I was already on PHP5 according to their drop down list (phpinfo said 4.4.9) so I tried their other options.
    php dev (had no effect according to phpinfo
    php 4 (I’m running php5.4.* now)

    I have no idea how this happened, but I’m not messing around with it anymore just to find out.

    So, try messing around with their dropdown box… maybe something will stick for you!

  42. Thanks a lot, Gabe!

    Three years after you wrote this, it has helped me a lot more than 1and1 support guys, who were persuaded they only had php5.2 in the managed server I use (which by the way, doesn’t even give you the option to change it manually).

    In case anyone is as baffled as I was, this is what happened: The 1and1 server *used* to run php5, but after modifying other settings, it switched to php4.4.9 and there is no way to set it back to the previous version!

  43. Just upgraded my 1and1 server from one managed dedicated server to a faster one and now I am getting this message.

    Your server is running PHP version 4.4.9 but WordPress 3.3.2 requires at least 5.2.4.

    I already have the line in the htaccess file but for some reason it isn’t working… The server tech couldn’t find a solution so I am having to wait till Germany is back at work on Monday morning.

    Anyone else have this problem when upgrading servers?

    • Alan – From the dashboard there is now an option called “Global PHP Version” with the option to select PHP 4, PHP5 and PHP Dev. Try selecting PHP 5 and then create a new database and see what version is actually being used.

  44. Hi Gabe
    Hail, traveller, you speaketh 1and1. The fact that people are still commenting shows that 1and1 are missing out on a huge area of customer service. Just posted on their Facebook page too so we’ll see.

    Wondering, do you or anyone else on here have info about upgrading my WordPress blog (created in 2010) from a 100mb Mysql database to 1024MB? I tested out a set of instructions I found from another blogger on the internet for lack of finding anything at 1and1 either online or on the phone and got ‘Error establishing database connection’. Will leave it overnight and see if that helps.

    Tested it on an empty blog so no worries, just don’t want to have to rebuild my entire blog just because I want a bigger database. Any pearls you could pass my way would be appreciated.

    A Mom On A Spiritual (and blogging) Journey!

    • Hi Sarah,
      It’s funny you should bring up this topic. The other day I was going through some old posts what were never published and I cam across a post from 2009 called Moving Your WordPress Install to a New Host!

      Although your issue kind of sounds more like a wp-config issue. Make sure to update your old wp-config with your new Database name and password.

      I just set the old post live with it’s orignal intended run date, maybe it’ll be of some help to you or to another 1and1 customer looking for help 🙂

  45. Every time I try to upload the newly written .htaccess file to my 1&1 directory, it says “parent directory is read only.” What am I doing wrong?

  46. Ok, ok, forget the last comment I just made. 1&1 just proceeded to tell me that I am not allowed to change permissions or edit my .htaccess file. I would have to re-download wordpress manually in order to make changes. That sounds absolutely insane! All I want to do is use an affiliate link cloaker without having to change my permalinks settings. Is this even possible?

  47. Thanks for this! It’s amazing the little things I can forget between WordPress installs.

  48. Great tips my site got hacked has been down for 3 months now – also the tip about “What I did was go to the permalinks page under settings and click ’save changes’.” Save alot of pain and headache

    Thank you Dude

  49. Just what I needed. You’re the man!

  50. Thank you so much – this was just what I needed.

  51. THANK YOU! You are my hero. My site is hosted on a friend’s server—though I’m thinking of moving it—but used your trick and forced it to use the newer PHP… And it worked! Lots of panicking but I’m glad I found you in Google. You’re amazing.

  52. Pingback: Moving Your WordPress Install to a New Host -

Leave a Reply

Required fields are marked *