fatinfo.com




Installing a WordPress Blog

I had never used WordPress in my life but thought it would be a cool idea to include a blog into the FatInfo directory for documenting the daily operations of a directory. WordPress was selected because so many other bloggers use it, and it is also open source.

First order of business was creating a physical folder on the host to contain the PHP files, templates and scripts. Easy. Done.

Second, create a SQL database. I have another 20 databases left from the GoDaddy hosting package. Easy. Done.

Upload all the files via SmartFTP client, it is a very powerful FTP tool. Highly recommended for transferring your files between a host provider and your local machine.

Now to finish the installation process like WordPress described will only take 5 minutes. I get to the finish screen, and try to access the wp-admin area and it kicks me back to the FatInfo directory. I knew this was going to happen because the .htaccess file was affecting the whole ROOT, and folders in the ROOT since the script was installed on the ROOT. For a long time, I had ignored this problem which prevented me from accessing the stats folder that was part of the GoDaddy host because I didn’t really care about the stats much. My root/stats/ folder had always redirected me back to http://www.fatinfo.com due to the .htaccess file.

Now this is a huge problem because I would not be able to access my blog. What’s the point if it doesn’t work when you try to access http://www.fatinfo.com/blog and get redirected by the mod rewrite? So I had to do a search for “.htaccess mod rewrite exclude directory” or something to that extent. The search took an hour or two because I had never looked at an .htaccess ever since there wasn’t a need.

Initial solution worked for a while until I turned on permalinks feature and everything broke again. I still have no idea what the syntax means. Hopefully a kind visitor will leave comments on it.

# added to exclude blog directory from root .htaccess
RewriteBase /
RewriteCond %{REQUEST_URI} ^/blog/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]

Then I searched Google Groups (used to DejaNews) for the same problem again, the more powerful version of forums (puts every forum to shame). Yes, even more powerful than DigitalPoint forums. And found this solution. Not familiar with the syntax either, but it works. I will probably revisit these settings later on if I do decide to learn PHP and SQL.

# added to exclude blog directory from root .htaccess
RewriteCond %{REQUEST_URI} !^/blog$
RewriteCond %{REQUEST_URI} !^/blog/(.*)

Eureka, this works. Oh God, now I need to find a theme for the WordPress blog. The one that comes with it just won’t do.

Update 08/23/2006: You can also try adding the following snippet of code to the ROOT/.htaccess file to exclude a directory from mod rewrites. If the requested URL starts with /directory/ then stop processing the ROOT/.htaccess rewrite in the ROOT. Now the /directory/.htaccess can do whatever it wants since everything in the /directory/ is excluded.

RewriteCond %{REQUEST_URI} ^/directory/.*$
RewriteRule ^.*$ - [L]

Thanks to Vincent Wright of eSyndiCat forums in helping me understand this.


No Responses to “Installing a WordPress Blog”  

  1. No Comments

Leave a Reply


*
To prove you're a person, type the security word shown in the picture.
Anti-Spam Image