«

»

Jan 10

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. Quick Fix for URL file-access is disabled Issues
  2. WordPress: Fixing Bad Feeds
  3. Testing New WordPress Versions Part 1: XAMPP
  4. Short Detour with the Testing New WordPress Series – Database Issue
  5. Quick Process Monitor Tip

11 comments

3 pings

  1. Luis

    I had to do the same thing with my GoDaddy account some time ago, but they fix it now in their control panel by giving you the option to switch to PHP5. Nice tip for beginners, watch out for your PHP and mySQL configuration when working with WordPress.

  2. Nick

    Most wonderful! This was making me crazy. Thanks for the tip.

  3. curious

    Hi

    would you say this “AddType x-mapp-php5 .php” addition applies to upgrading WP 2.8.6 to WP 2.9.2 & WP 3.0 as well..?

    when I tried upgrading from 2.8.6 to 2.9.2 it didn’t work; I got a warning about the PHP..not sure what it was..?

    Thank You.

    1. Chris

      Yes, I believe it is necessary if your 1&1 account is setup the same as my client’s was.

  4. curious

    Thanks much Chris for the reply. appreciated.

  5. Chris

    I have been banging my head against a wall.. THANK YOU!!!!!!!!!

  6. Steve

    Thanks!

  7. ariess

    nice tips. thanks for sharing

  8. David

    Thank you so much for this! I’ve been struggling with this for days.

  9. Bill

    This fixes all problems with upgrading core WordPress and upgrading plugins. Awesome, thanks so much.

  10. Susan

    Regarding 1 and 1 and WordPress, have you ever had an issue uploading large images? I know WordPress has no issue with this, but I can’t get 1and1 to help me resolve it. If I load an image via ftp to the 1and1 directory, it loads fine, but if I try to load any file larger than 2 mb thru the WP interface, it bombs.

    Any suggestions, would be greatly appreciated! (I’m about to leave 1and1…so frustrated…)

    Thanks,Susan

  1. Quick Fix for “URL file-access is disabled” Issues » Solo Technology

    [...] like my last Quick Tip for 1and1.com this is another quick fix, just a little different. If you manage your own server, just locate and [...]

  2. 1and1 hosting can SUCK IT. | Bleeptek

    [...] Wish I had found this a week ago!!! http://www.solo-technology.com/blog/2010/01/10/quick-tip-wordpress-on-1and1-com/ [...]

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>