May 21, 2012

Running WordPress on Lighttpd

I’ve finally moved the site to a new server.  My new host is a 1 gig slice at SliceHost, which will be hosting all my sites (yes, I really need a 1 gig slice) from now on.

One of my big goals was to completely drop Apache.  I just don’t like that server.  Ugly to configure, huge, slow & bloated.  I much prefer Lighttpd for my Django & Satchmo projects, but I hadn’t ever tried using it for PHP.  Today I bit the bullet and started the transition.

[Read more...]

All downloads should be working now.

In the changeover to the updated WordPress installation, I somehow managed to misconfigure the downloads.  It is fixed, and everything should be working now.  Please let me know if any files are still missing for you.

Technorati Tags: , ,

This site is worth how much?

questioning This site is worth how much?According to LeapFish, this domain is worth $12,150!

Well all right then! Finally some respect for the ol’ coder’s eye.

Ranking Factors

It seems that the ranking engine takes into account all sorts of variables. The shortness of the name, the fact that it is two dictionary words, and that it has a lot of Google hits.

Try yours and see how it compares. I’m curious to hear reports.

[tags]leapfish,domain name,domain name value[/tags]

Site Updates

happy Site UpdatesA quick site update. I’ve added a couple features.

First, I’ve added “email this post” functionality to every article. Now you can send anything I’ve written to a friend with one step.

Perhaps more importantly, I’ve added a “Related Posts” section to every article. At this point, the related posts are only shown when you view the article on its own page, not on the front page. I’d love feedback about this. Should I add it to front page articles as well? Is that too busy?

Solving WordPress 2.0 External Posting Errors

Since upgrading to WP2.0 I had not been able to use my favorite Weblog editor Ecto to do any posts which contained any inline tags, such as div or span classes. Also, it had been stripping the meat of Image tags. This was playing hell with my Technorati tags and, well, with how I like to blog.

Looking at the Ecto console, I saw that it was actually WP which was refusing to take the tags. With that bit of information, I rapidly zeroed in on the problem.

Solution

Edit your wp-includes/kses.php file, add the tag attributes you want.

I changed or added the following:
'div' => array ('align' => array (), 'class' => array (), 'id' => array(), 'style' => array()),
'span' => array ('class' => array (), 'id' => array(), 'style' => array()),
'p' => array ('align' => array (), 'class' => array (), 'id' => array(), 'style' => array()),
'tag' => array(), 'tags' => array(),

You can download the kses.php file with my fixes, if you like.

Now, everything but the img uploads is working as it should. I’ll figure that out and post the solution soon.

Update: 15 minutes later

To make images work, simply make sure you close the tag, and put a space after the src.

Bad:
<img src=”http://example.com/test.jpg”>
<img src=”http://example.com/test.jpg”/>

Good:
<img src=”http://example.com/test.jpg” />

Thanks go to Doncha for the img tag tip.

Technorati Tags: ,

Testing trackbacks

test

WordPress 2 multi-blogging made easy

I upgraded the site to WordPress 2 this morning. This wouldn’t be a bit deal, since the dev team has made it so easy to upgrade. What makes it interesting is that I read a tip on the WordPress forums and came up with a simple method to enable multiple domains using one blog installation on Linux/BSD systems.

1) Get WordPress 2.0 and unpack it to a master directory you’ll be symlinking later.

2) Copy wp-config.php to wp-config-orig.php.
3) edit wp-config.php, replacing the whole thing with:
<?php include($_SERVER['DOCUMENT_ROOT'] . '/config.php'); ?>
4) make the directory for your domain, for example:
mkdir coderseye.com
5) cd into the directory and symlink the contents of your master directory.
cd coderseye.com
ln -s /home/example/wordpress-master/* .

6) copy the original wordpress config file, naming it “config.php” and edit like you usually would for wp-config.
cp /home/example/wordpress-master/wp-config-orig.php config.php
7) Done! You’ve successfully linked another directory as a separate blog with the same base files.

Making it automatic

I’ve made a script which automates all of this, at least on Linux boxes. You just call it like so:
setup_multiblog.sh master slave
If “slave” directory exists, it will be backed up, and upgraded to work with the master as a slave-multi-blog.
If it doesn’t exist, it will be upgraded.
If the master doesn’t have the modifications I describe in step #3, the script will back up wp-config and make the modifications.

setup_multiblog.zip

Enjoy, let me know if it needs tweaks, it has a lot of self-checks built in, so hopefully it won’t trash anything. I’d backup first, just to be double-sure.

Technorati Tags: , , ,

Site goes live!

Site officially goes live today.