Quick Tip: WordPress on 1and1.com

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

Possibly Related posts:

  1. WordPress 2.6 Tip: Disable Post Revisions
  2. Tip: WordPress hacked?
  3. 2.0.1 WordPress
  4. Testing New WordPress Versions Part 1: XAMPP
  5. Testing New WordPress Versions Part 4: Upgrade!


2 comments to Quick Tip: WordPress on 1and1.com

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>