Godaddy, WordPress, redirects, and htaccess

There are a million sites out there that help you try to get WordPress (or other cool webapps) up and running on a new domain through GoDaddy. I had to go through my share the last few days to really find the setup I liked, the features I wanted, and more.

First things first, do what most of these sites say…use a Linux account. I was able to do what I needed in 5 minutes on Sunday than what took me 2 hours on Saturday. I REALLY wanted the Windows setup, but in the end, its just too tricky to get WordPress up and running on their IIS 7 / PHP 5 install.

Next, I originally went the auto-install route available on all domains with GoDaddy. This installs a relatively new version of WordPress (2.6.1 I believe). This actually worked great, and even better once I got moved over to the Linux install (mail just worked, things were quick, etc). The only thing I didnt like (and some of the things I noticed on various sites) is that the ‘.htaccess’ file may be restricted to you. So instead, I decided to download the latest build of WordPress and upload it to my account. After extracting, setting up a database, and going to the config page, I was up and running!

The one last thing I had to do (that was a little tricky) is find the RIGHT way to do the .htaccess file to get the ‘Pretty Permalinks’. There where a whole bunch of examples online, but none that I could find that worked in GoDaddy’s newest Linux configs. So after a little bit of changes, this is what I came up with…


# BEGIN WordPress

RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

# END WordPress

The biggest thing here was that Final RewriteRule that removes the ‘index.php’ out of all my links. If you set up everything just right, this should just work out of the admin (just make sure your permissions are good and WordPress can write to this file).

Thats not it! I did all this but was still having a TON of problems, because the rewrites would work, but I would keep getting 404 (file not found) errors. This is because if you use GoDaddy’s universal 404 error handling, this gets done BEFORE your mod_rewrite rules. Basically, it can not find ‘/blog/2008/11/my-cool-post’, because it is looking for that file, rather than mod_rewrite handling the rewrite for you. You can just go to your ‘Manage My Domain’ screen, then click on Settings, then 404. I recommend creating your own 404 page, and then selecting this on the 404 configuration. I noticed that once I go this working, WordPress would then handle its 404 errors itself!

For a quick list, these are the steps…

  1. Get a Linux hosting account, and at least the deluxe or unlimited account. The Base may not have mod_rewrite enabled. Windows may work, but I could NEVER get email to work just right.
  2. Go to ‘Manage my domain’, then to ‘databases’, and ‘mysql’. Create a new database, and remember the settings.
  3. Download a copy of WordPress
  4. Upload this to your account, then unzip it. Rename the ‘wordpress’ directory to whatever you choose, I chose ‘blog’
  5. Go to your url to where this was unziped. If your permissions are correct ( I didnt need to change a thing), and it should ask you to setup.
  6. Just click through the setup, its only a page or two. Basically you need to create an email account and give WordPress your database credentials.
  7. Once this is done, you should be able to go on the WordPress side. Login, update your settings, and you should be good to go!
  8. Go to the Manage -> Permalink page, and update your permalinks to display the way you prefer.
  9. Go back to your GoDaddy account, click on ‘manage my domain’ and bring up their admin.
  10. Click on settings, and then on ‘404 Error Behavior’.
  11. In here, the best setting I found was to select my own 404 error page.
  12. Click save, and within 30 minutes, things should just work for you! They did for me!

[ad#postad]