New host, new theme, new links

August 4, 2007

I made a number of changes this morning that I have been playing with for a while.

New Host

A long, long time ago (at least in Internet years), I started hosting sites from a server at my house via DSL with a static IP. The main impetus for doing it back then is because most hosts:

  • Were expensive - $20 per month for the basics
  • Had limited disk space - You were lucky to get 100MB for your $20/month
  • Offered little control - I wanted to be able to install and run whatever I wanted

Being the good developer that I am, I wanted complete control and the ability to have more space. I didn’t want to be tied into a Microsoft-only host or a LAMP-only host. I wanted to be able to do ASP and PHP at the same time for different sites. And of course, I didn’t really want to pay much for it. Never mind the fact that I’ve been paying extra for my DSL service to have the ability to have static IP addresses. However, it has finally gotten to the point where hosting services and disk space are a commodity and it is no longer worth while for me to go through the effort to host from home.

I’ve used a number of hosts over the years and have seen lots of people shilling for their hosting services so I’m pretty well-versed in what is available. I’ve even gotten screwed over by one or two back in the day so I was pretty cautious in my choices. There were however, two or three hosts that offered lots of features that were affordable to the average person. In the end, I went with DreamHost (yup, referral link) because of their awesome features:

I know some people have some complaints against DreamHost and their stability, but let’s face it, they would have to be really bad to be worse than what I can do myself over my DSL line. So far, in a couple of months of playing with the features on various sub domains, I like what I have seen and they pretty much offer all the flexibility that I really need.

New Theme

On my last make-over, I had attempted to incorporate the YUI Reset and Grids CSS along with my logo and my own custom design. Needless to say, if you have visited the site in the past year or so, you would know that it did not look pretty and was pretty much a failure. While I had the basics down, it was still very rough and since I had started the theme from scratch, there were a number of places that I missed so it looked pretty bad. Specifically, because the YUI Reset file resets all styles, there were many styles that I didn’t go back and implement, like blockquote, dl, dt, and dd. In addition, some of the plug-ins I was using, like SyntaxHighlighter, no longer worked with the reset styles. And of course, I probably did the last theme right before some big project was due so all I had time for was the basics and then I had to quit to focus on getting my project implemented.

One of the great things about DreamHost (yup, another referral link) and their One-Click Installs of WordPress is that they offer about 50 different pre-installed themes. While I have been working on my own custom theme (again), I could tell that it was going to take a lot longer than I wanted to get it tweaked the way I wanted. I was originally going to wait to make the transition to the new host until the theme was complete but that would take way too long. So, I chose one of the available themes that was pretty close to the direction I was going and called it done.

New Links

Since I was making such drastic changes to the site, I decided to go ahead and re-examine my link structure as well. During my last overhaul, I put the blog at the site root and all the posts were under the “/posts/08/04/…” urls. This time I wanted to do it a little differently and wanted my blog back under a sub-folder so that all the links began with “/blog/08/04/…” Since I am now on an official LAMP stack with a real .htaccess file, I didn’t have to bother with IIS workarounds for redirecting links. Of course, the only difficulty was trying to figure out how to work with the .htaccess file and how to redirect all my existing links without pissing of Google. It took me a while, but I figured out that DreamHost has a cool web-based FTP client that allows you to edit your .htaccess file. I ended up making the following modifications to the .htaccess file in the root of my site:
RedirectMatch 301 /posts(.*) http://swoofware.com/blog$1
RedirectMatch 301 /tags(.*) http://swoofware.com/blog/topic$1

This, in theory, should permanently redirect any inbound links to the old addresses to the new addresses. If you run across anything that is broke, just let me know. The only thing that I don’t have the way I want is that the SwoofWare heading at the top of the page should link to the site root (http://swoofware.com) and not the blog. I experimented several times with the Site and Blog settings in the Options, but it wasn’t working out too well. Oh well, it’s minor so I’ll live with it for a while.

Popularity: 16% [?]

ISAPI_Rewrite Rules for WordPress on IIS

January 31, 2006

This seems like a no-brainer post. Not sure why I didn’t think of it before. These are the ISAPI_Rewrite rules that I am using for this WordPress installation running on Windows 2003 and IIS to get clean/pretty URLs:

The rules above summarize the various ISAPI_Rewrite forum threads related to WordPress. I really like the product and have had no issues and in general the support forum is great. However, as popular as we might like to think WordPress is, I don’t think they care because they really haven’t put forth much of an effort to really understand what the various posters are trying to accomplish. Here’s hoping that this helps.

How’s that for a short post to make up for the previous book I just wrote? Hope it helps. I don’t guarantee it is complete, but it seems to be working pretty well. Drop a note in the comments if I’m missing anything.

Popularity: 14% [?]

Kismet

November 3, 2005

According to Wikipedia, the definition of kismet is:

kismet
Fate, Destiny.

I guess after my previous post about how I didn’t need Akismet it was my fate or destiny to once again have to deal with comment spammers. Seriously though, this blog has gone for months with only the occasional spam comment. Starting yesterday, the free ringtones and poker spam comments starting showing up. I’ve probably already deleted more than 20.

As pointed out in the comments of my previous post, my solution was not going to foil the smarter spam bots. I knew that. But I was pretty happy that it had worked as long as it did. Guess it’s time to implement another solution. I do know that I won’t be implementing one that has to be trained and managed and constantly updated and tweaked.

Popularity: 8% [?]

Akismet

October 28, 2005

Since Deane insists on directing traffic my way, I guess I’m obligated to provide some updated content, so here goes…

There has been a lot of talk the past few days about Akismet, the new blog comment spam filter service for WordPress. It sounds like a very promising solution to a really annoying problem.

Automattic Kismet (Akismet for short) is a collaborative effort to make comment and trackback spam a non-issue and restore innocence to blogging, so you never have to worry about spam again.

Actually, comment spam on this site (of all sites) was what really kind of made not quit blogging several months ago. I got tired of digging through dozens of spam comments which was time that I could have been using to post.

As far as Akismet goes, the actual solution is not to far from how SpamStopsHere works. All messages/comments are routed through a centralized server that maintains the spam rules for all subscribers. No more do you constantly have to train your bayesian filter to recognize spam. It is maintained by someone whose sole job is to filter spam and it is done at a central location that benefits everyone as it becomes smarter. As much as some people like to maintain control (or don’t want to be bound to someone else’s solution), I think it just make good sense to have a centralized effort to try to combat such an annoyance.

So, am I going to try out Akismet? Nope. I solved my comment spam problem several months. It was pretty simple and very effective. It’s so easy, I’m not sure why it isn’t advocated more. Right now, even as my site is getting a little bit more exposure, I deal with one spam comment every couple of days. Actually, I’m almost to the point of getting more legitimate comments than spam! (That probably says more about how low volume and un-interesting my site is, than it does about the spam volume).

Enough already! What did you do? All you need to do to effectively deal with comment spam is to change the name of the file that handles comments and then update any references to that file. Most spam is auto-generated and is directed at the most common blogs. The spammers know that the interfaces are to submit comments and everything is rigged up to hit those sites that are built out of the box with no changes. However, by changing the name of the comment processor file, their scripts/bots/whatever they use, don’t work. Pretty simple. Of course, there is someone out there that is either automating posts via the interface, or they have gotten smart enough to check for the comment post action and modify their scripts accordingly. At this point in time, it is only a comment every couple of days, but it is the same type of comment.

One way to improve this solution for everyone would be to pull the references to the comment processor filename into one variable. Then, during installation, the user could be prompted for a unique name, or better yet, a random name could be generated and stored. The downside is that would provide the motivation to the spammers to get smarter about actively trying to determine what address comments are posted to which would then ultimately render this solution moot.

But for now, I’m one up and quite happy with my solution! If you need specific details about what I changed, drop me a comment and I will write something up.

Popularity: 11% [?]

Favicons as link bullets

September 1, 2004

I was updating my list of Links that displays in the sidebar and saw that WordPress allows you to associate an image with the link. Associating images to entries is a bit of a novelty to me and not something that I wanted to do if I had to go out and find appropriate images and manipulate them accordingly. Then I thought about the favicon.ico images that so many people are using on their sites. Sure it is an .ico file, but just maybe it will work.

Of course, my most visited site (and most updated), Gadgetopia, doesn’t have a favicon. So I decided to work with another site. I added WordPress to my Links list and pointed the Image URI property to the favicon. And voila, it worked. Kind of.

I wasn’t too thrilled with the default display of Link images. WordPress shows the image with a 2px border (since it is linked) and did not display the Name of the link. A couple of quick modifications to links.php and I was set:

Change lines 210-211 from:

if (strstr($row->link_image, 'http'))
echo "<img src='$row->link_image' $alt $title />";

to:

if (strstr($row->link_image, 'http')) {
echo "<img style='border:0px;padding-right:4px;vertical-align:middle;' src='$row->link_image' $alt $title />";
echo($name);
}

and you end up with a nice looking list of links. Kind of.

You didn’t think that I could get away without browser issues did you? With the exception of Dive Into Mark, which shows as text, all of the icons display fine in the latest version of Firefox (actually Kintana Superkangaroo with the Firesomething extension). And in the latest Internet Explorer, A List Apart, Dive Into Mark, SimpleBits and Zeldman had issues. Not the same issues though. A List Apart shows as a 32×32 black and white image. Dive Into Mark and SimpleBits have broken image placeholders. Zeldman is a 16×16 black square.

I plan on keeping this feature as it looks good in Firefox (my primary browser). So for those I mentioned above, feel free to fix your icons so my site looks better. ;-)

Popularity: 8% [?]

How to be a WordPress WIMP

August 7, 2004

I’ve pretty much been a Microsoft person for my entire career and have only rarely crossed the threshhold into the Anything But Microsoft (ABM) camp. I’ve used Blogger (an online blog tool) and .Text (a .Net blog application) and was left wanting more control and a refined user experience.

Unfortunately, it appeared that the cream of the crop in web log apps ran on the LAMP platform (Linux + Apache + MySQL + Perl/PHP/Python). Since all of my experience and my site is with WISA (Windows + IIS + SQL Server + ASP.Net), I thought I was out of luck. However, a little bit more research showed that you can put together all sorts of viable combinations of acronyms. In my case, I wanted to be a WIMP (Windows + IIS + MySQL + Perl/PHP/Python).

Someday I want to learn more about Linux and Apache (and I may with Knoppix) but for now, I need to stick with Windows and IIS. So, specifically for WordPress, I needed to get MySQL and PHP installed and running on my server. This is my attempt to document this process since a lot of the given documentation doesn’t directly address being a total newbie to the WIMP platform. NOTE: The documentation that comes with and is available online for MySQL and PHP is very thorough and very good. However, it is a bit generic and can get a little confusing when all you want to do is install it and go.

Specifically, the directions in this post is directed at the following versions:

  • Windows Server 2003
  • IIS 6.0
  • MySQL 4.0.2d
  • PHP 4.3.8

Windows Server 2003 and IIS 6.0
This post assumesthat you have Windows Server 2003 and IIS 6.0 running on your machine. You will need to find some other source of instructions for configuring them if you don’t know how.

Installing and configuring MySQL database server
I’m really just pulling out the highlights from section 2.2.1 Installing MySQL on Windows but with a specific focus on the quickest path to getting it up and running.

  1. Go to MySQL Downloads and download MySQL 4.0 database server. Select the Windows (x86) download that comes with the installer. Save the downloads to a directory on the machine you are installing on. I wanted to keep all of my non-microsoft apps in one location, so I created a c:\ABM folder (ABM = Anything But Microsoft) and saved the file there.
  2. Install the MySQL database server and Administrator client. I installed to C:\ABM\MySQL.
  3. Once installed, create a file called my.ini and save it to C:\WINDOWS. Open this file in your favorite text editor and add the following:

    Save and close the file.

  4. To verify that MySQL is installed correctly, open a command prompt window and run the following:

    You should then see something along the lines of:

  5. To close the running instance of MySQL, open another command prompt window and type:

  6. To get MySQL running as a Windows service, type the following:

    See 2.2.1.4 Selecting a Windows server for more information on which version to run. Note: You might think that you could change to the C:\ABM\MySQL\bin directory and run all of your commands successfully from there. In theory, you should be able to do that. However, I ran across an issue where I couldn’t get the service to run/install until I actually ran it with the complete path.

  7. Go to the Services control panel and start the MySQL service.

Installing and configuring MySQL Administrator

  1. Go to MySQL Downloads and download the MySQL Administrator graphical client. Select the Windows (x86) download that comes with the installer. Save the download to the same directory that you saved the MySQL database server installer to.
  2. Install the MySQL database server and Administrator client. I installed to C:\ABM\MySQL\GUITools\MySQL Administrator.
  3. Run MySQL Administrator.
  4. You will need to add a new Connection in order to connect to your database. Use the following settings:
    • Connection: localhost
    • Username: root
    • Password: leave this blank, we haven’t changed the default password yet.
    • Hostname: localhost
    • Apply changes
  5. Once you are in MySQL Administrator, click on the User Administration icon.
  6. Click on the ‘root’ User Account below and change the password.
  7. Click on the ” (the guest/anonymous) User Account below and change the password.
  8. You will need to add a new database for your WordPress installation. Click on Catalogs. Right-click in the Schemata section, and select Create new Schema and give it a name (wordpress is good).
  9. You then need to create a new user to access this database. Click on User Administration. Right-click in the Users Accounts section and select Add new User. Enter a name in MySQL User field and enter the passwords. Click on Apply Changes
  10. Right-click on the user you just created and select Add Host from which the User can connect. Enter localhost.
  11. Click on the Schema Privileges tab for that user.
  12. You need to assign the correct privileges to your new user to be able to work with your new database. Be sure that the localhost node under your new user is selected. Then under the Schemata column, select your WordPress database. Then click the << button to assign all privileges to your new user when connecting through localhost.
  13. Optionally, you can also click on the top node of the user and assign the same privileges for logging in locally to MySQL administrator with that account but most likely you will be logging in with the root account anyway.
  14. Apply Changes
  15. You can close the MySQL Administrator. Don’t forget that when you come back, you will need to change the password on the initial connection you created.

Installing and configuring PHP

  1. Go to PHP Downloads and download the PHP 4.3.8 zip package under PHP 4.3.8 Windows Binaries. We don’t want PHP 5 because WordPress 1.2 apparently has some issue running on that version. In addition, we don’t want the Installer version because it doesn’t come with all the extensions that we may want.
  2. Extract the zip file to C:ABM. This should create a C:\ABM\php-4.3.8-Win32 directory structure which can be renamed to C:\ABM\PHP
  3. In C:\ABM\PHP, copy the php4ts.dll file to C:\WINDOWS
  4. In C:\ABM\PHP, rename the php.ini-recommended file to php.ini and copy it to C:\WINDOWS directory.
  5. Create a file called test.php and add the following line of code:

  6. To test if PHP is working correctly open a command prompt window and run:

    You should see a lot of HTML text rendered to the command prompt window.

Configuring IIS for PHP

  1. Open the IIS Management Console
  2. Right-click on the Web Sites folder and choose Properties
  3. On the Home Directory tab, click the Configuration… button
  4. On the Mappings tab, click the Add… button
  5. On the Add/Edit Application Extension Mapping form, the Executable path should be C:\ABM\PHP\sapi\php4isapi.dll and the Extension should be .php
  6. Click OK to add the mapping and OK again to close the Application Configuration window.
  7. On the Documents tab, you will need to add index.php
  8. For best results, restart IIS.

Installing and configuring WordPress

  1. If you have made it this far, then we are doing pretty good. Go to WordPress > Downloads and download the latest release.
  2. Now the 5 Minute Installation directions should work.

Popularity: 27% [?]

MyHomePoint

Having trouble keeping track of everything going on at home? Is the refrigerator organizer not cutting it anymore? We feel the same way...
Check out MyHomePoint »

Close
E-mail It