Browsing articles in "Web Development"

1and1 WordPress 3.1 and PHP5

If you have 1and1 (1&1) for hosting, and are on one of their Linux packages, you need to be sure you are running PHP5. I just ran into a problem after I installed WordPress 3.1 on my 1and1 hosting package. Some elements such as RSS would not load correctly in the dashboard and I would get internal server error 500 a lot when uploading images. I figured it was probably the version of PHP I was running. Your 1and1 hosting server runs PHP4 by default, you can check this by doing the following:

Create a .php file named “version.php” (without the quotes) and insert the following line into it and then save the file:

<?php echo “You are running PHP version: ” . phpversion ( ); ?>

After uploading this file to the root directory of any domain you will be able to visit (replace “” with the domain you uploaded the file to) and it will display the PHP version your server is running. Now to run your website in PHP5 you must do the following:

Create a .htaccess file or edit your existing .htaccess file on the root directory of your domain you want to change. Add the following line of code to the very top of the .htaccess file:

AddType x-mapp-php5 .php

Now remember to upload your .htaccess file to the root directory of the domain you are modifying, and overwrite the old .htaccess file if you previously had one. This will allow all the files on the domain you modified to run under PHP5 including all subfolders. WordPress as well as many other scripts will run much smoother now.

WordPress will be phasing out PHP4 soon, so be sure to update to PHP5 now!


Recent Comments


    Some of the links on this site are affiliate links, which means I get paid a commission when you purchase the product. You are not charged anything extra for this, thank you.