Quick Tip: WordPress on 1and1.com

January 10, 2010 by Chris · 8 Comments 

I recently finished up a custom WordPress project for a client hosted at 1and1.com. Now, 1&1 is a pretty major hosting company, but this is the first time I’ve ever deployed WordPress there so I wasn’t quite sure what to expect.

Initially, everything seemed just fine — until the first WP minor upgrade was released. The automatic upgrade failed. A quick web search taught me that you need to add a line to the .htaccess file for the auto upgrades to work:

AddType x-mapp-php5 .php

This is how you tell 1&1 to use PHP5 instead of the default PHP4.

Note: If you haven’t ever set pretty permalinks you may not have a .htaccess file. Just create one with that one line and upload it to the main WP directory.

This tip is easily found with a quick web search. However, I’ve noticed that a lot of people aren’t sure where to add the line so let’s touch on that briefly.

When WordPress edits your .htaccess file it puts all of its changes between the # BEGIN WordPress and # END WordPress lines.  You can safely infer that anything you put between those two lines is not guaranteed to be there forever. For instance, if you change your permalinks that section will get re-written. In other words, don’t make changes between those two lines!

If you put your changes above the # BEGIN line then they’ll live through WP changes. Just that simple. Here’s mine for example:

AddType x-mapp-php5 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

  • About

    Wandering the Internet, looking at all things bright and shiny. Playing with many, writing about some. More...
  • Referrals and Ads

    Mozy Logo for Referral

    Dropbox Logo for Referral

    Dreamhost Promotion
    Get $50 off at Dreamhost — Just mention SOLOTECH50 when signing up!

  • Topics

  • Flair and Sparklies