I was trying to patch, for the umpteenth time, my b2/cafelog installation. You know how this goes: Michel Valdrighi, the creator, has been missing in action for months, the code is starting to have more holes than a strainer, and every time I try to mess with the templates I end up breaking something in PHP.

But about a month ago, reading forums and mailing lists, I saw that a certain Matt Mullenweg and an Englishman named Mike Little had set up a fork of b2. They've baptized it "WordPress". Today I downloaded the .tar.gz file, opened FileZilla to upload it via FTP to my shared hosting (crossing my fingers the connection wouldn't drop halfway through), and decided to tinker around for a while.

Installation and Configuration

The installation process surprised me quite a bit, and for the better. Those of us coming from dealing with hellish CGI/Perl scripts, fighting with chmod 777 permissions via console, and configuring absolute paths in three different files, know that installing a weblog manager is usually a pain. Here things look different. WordPress inherits the base structure of b2, but you can tell they've gone in to clean house. It still relies on PHP 4 and MySQL (I've set it up over version 3.23 on my server and it runs smoothly).

The core of the matter is in the wp-config.php file. Basically, you grab the sample file wp-config-sample.php, rename it, plug in your database details, and off you go. I'll leave you the configuration I've used, which is as simple as it gets:

<?php
// ** MySQL settings ** //
define('DB_NAME', 'mi_base_de_datos');    // The name of the database
define('DB_USER', 'mi_usuario');          // Your MySQL username
define('DB_PASSWORD', 'password123');     // ...and your password
define('DB_HOST', 'localhost');           // Usually you don't have to change this

// Prefix for the tables
$table_prefix  = 'wp_';
?>

Once you upload everything via FTP, you access wp-admin/install.php from your browser and in a couple of clicks your setup is ready. What I liked the most is how they've cleaned up the administration interface. It's still quite Spartan (we're not going to ask for the moon from the basic HTML we handle in today's control panels either), but at least you don't get lost. They've put special emphasis on the code it generates: they brag about being "XHTML 1.1 compliant". Lately there's a lot of talk about separating content from presentation using CSS, running away from layouts based on kilometer-long HTML tables, and it seems these guys are on the right track.

The famous "Loop" in Templates

I've also been playing around with the template structure in the index.php file. It's still a bit rudimentary because you have to spit out PHP code among pure HTML to set up the famous posts "Loop", but it's tremendously intuitive if you've written any web code before.

<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <h2><?php the_title(); ?></h2>
    <div class="meta">Published on <?php the_time('j F, Y'); ?></div>
    <div class="storycontent">
        <?php the_content(); ?>
    </div>
<?php endforeach; else: ?>
    <p>Sorry, no entries were found.</p>
<?php endif; ?>

Final Thoughts

Does this WordPress thing have a future? It's too early to say. Right now Movable Type is the undisputed king for managing weblogs, but the fact that WordPress is 100% free under the GPL license is a huge point in its favor. Many of us are suspicious of closed platforms because any day they can turn off the tap or start asking us for money for commercial licenses, and with GPL you ensure the code is yours to mess with.

For now, it seems like a great toy to me. It's fast, it doesn't saturate the server's RAM, and if you know a bit of PHP you can do fancy things without too many headaches. Let's see how the community evolves, but for the time being it stays installed on my server.