WordPress Plugin Directory Gets a Facelift

Matt Mullenweg recently announced that the WordPress plugin directory has been given a major facelift. A good one too. Take a look:

The new Plugins frontpage

WordPress Plugin Site

- - - - -

The new Plugins tags page

WordPress Plugin Tags

- - - - -

A sample plugin description

WordPress Plugin Description

- - - - -

Sample plugin installation instructions

WordPress Plugin Installation Instructions

- - - - -

A sample plugin FAQ

WordPress Plugin FAQ

- - - - -

Sample plugin stats

WordPress Plugin Stats

The new plugin repository can be found here, in the usual place.

How To: Make Search Engines Like Your WordPress Blog

Wordpress LogoRecently, I discovered that this site had received a 100% SEO score from Domaintools. When comparing this rating to some larger sites, it seemed Sheeped beat them all by leaps and bounds.

What makes it even better, is that I’ve done relatively little to make my blog search engine-friendly, or “SEO-optimized”. Here’s what I did:

1. Modify page titles

By default, WordPress displays your blog’s name then your article’s name in the title. It should be the other way around. Not only is the article/page name first, blog name last good for SEO, humans like it too. Most of the WordPress themes out there use this approach, but if yours doesn’t or you’re using a vanilla WordPress, you can replace the <title></title> code in your theme’s header.php with this:

<title><?php wp_title(' '); ?><?php if(wp_title(' ', false)) { echo ' - '; } ?> <?php bloginfo('name'); ?><?php if (is_home()) { ?> - <?php bloginfo('description'); ?><?php } ?></title>

This will make your titles look like this site’s (check the title of this page).

2. Use Ultimate Tag Warrior and its meta keyword tag inclusion feature

Using Ultimate Tag Warrior to add specific tags to a post is pretty cool, but what’s even cooler is that you can enable inclusion of these tags as meta keyword tags in your pages. While humans do not directly benefit from this, search engines love it.

3. Use index and follow tags wisely

While it may seem nicer to have Google index everything at first, it’s usually not a good idea, especially on blogs. You don’t want search engines to index your whole site, especially if you’re not using excerpts for your archives. On a typical WordPress blog, there’s at least 4 different pages containing identical contents of a post (date/category/poster/tag/etc… archives). This can be penalized by search engines, but even if it isn’t, they might index the wrong thing. I’d hate to search for something and get a result linking to an article pasted in a blog archive for say, 2007.

This little snippet has helped me out a bunch. It also goes in header.php anywhere between the <head></head> tags:

<?php if(is_single() || is_page() || is_home()){
echo '<meta name="robots" content="index,follow" />';
} else {
echo '<meta name="robots" content="noindex,follow" />';
} ?>

All static pages, posts and the main page will be indexed. Archives and search results won’t. If you’re not using excerpts on your frontpage and are extremely obsessive with optimization and avoiding duplicate content, you may choose to remove the is_home() check. Just be aware that people searching for your site with e.g. “Sheeped” won’t find your front page, but rather some article on your site.

4. Use a robots.txt file to block out unwanted queries

You’ll want to place a robots.txt file at the root of your domain, listing paths and regex matches you do not want search engines to index. The robots.txt for sheeped.com looks like this:

User-agent: *
Disallow: /?
Disallow: */feed*
Disallow: */trackback
Disallow: */wp-admin
Disallow: */wp-content
Disallow: */wp-includes
Disallow: *wp-login.php

It disallows search engines from accessing my control panel (why should they?), my RSS feed (duplicate content!), search queries, and other pages search engines don’t need to index.

5. Enforce or remove trailing slashes from page queries

Similar to duplicate content, pages might be indexed twice with almost identical URLs, the only difference being the trailing slash. You can either enforce or remove trailing slashes from all page queries. Personally, I’ve chosen to enforce trailing slashes, and have touched the subject in my article, “How To: Remove ‘www.’ Permanently With .htaccess“. This can be easily done by modifying your .htaccess file. My .htaccess uses this rewrite rule to enforce trailing slashes:

RewriteEngine On
RewriteRule ^([^\.]+[^/])$ http://sheeped.com/$1/ [R=301,L]

6. Use Google Sitemaps

Having a search engine-readable sitemap in the root of your domain helps search engines index your pages quicker. As I mentioned in my article, “WordPress Plugins a Site Wouldn’t Function Without“, Arne Brachhold’s Google Sitemap Generator plugin for WordPress does everything for you. You just have to install it and enable it. That’s about as easy as it gets!

More to come…

Oh, and let’s not forget the cardinal rule of SEO optimization: The best SEO optimization is writing quality content.

WordPress 2.1.1 Includes Exploitable Code

Wordpress LogoIronically, the 2.1.1 security and bug-fix release of WordPress included malicious code that allows anyone to execute PHP code on your server. If you’ve upgraded WordPress during the last 3-5 days, it’s highly recommended that you upgrade to WordPress 2.1.2 immediately.

From the official announcement:

It was determined that a cracker had gained user-level access to one of the servers that powers wordpress.org, and had used that access to modify the download file. We have locked down that server for further forensics, but at this time it appears that the 2.1.1 download was the only thing touched by the attack. They modified two files in WP to include code that would allow for remote PHP execution.

Well, time to upgrade…

Happy Valentines Day Googe

The folks at Google sure love mathematical and philosophical references, like the mathematical riddle posted on a billboard as a means of recruiting new engineers, and most recently today’s homepage Doodle.

Google Valentine 2007 LogoToday’s Valentines Doodle caused some buzz due to its seemingly incorrect spelling, ‘Googe’. Some people even went to the extreme and claimed Google is indeed considering a name change. Some claim that the designers simply forgot the letter L. Others argue that the strawberry stem may be the missing letter. Personally, I thought the G and L are living up to the occasion, L being the chocolate covering the G. Who knows, it’s all one big mystery…

Except for those who truly know love, says Dennis Hwang of Google in a post entitled “Strawberries Are Red, Stems Are Green” (hint hint!) on the Official Google Blog, stating:

I just know that those with true romance and poetry in their soul will see the subtlety immediately.

It’s safe to say the strawberry stem has some L’ness to it, but there’s more to the subtlety. What might ‘Googe’ be? Why, a quick Googling of the term returns a Wikipedia entry for Barnabe Googe, an English poet well-known for one line of poetry, I did but see her passing by, and yet I love her till I die. I’m sure there’s lots more…

Happy Valentines Day!

Staying Anonymous Online

Following the recent accusations that Google and Amazon (among others) are profiling you without your knowledge, I’ve been asked by many, both online and offline, how they can stay anonymous online. If you’re wondering the same thing, read on!

Onion Routing

OnionOnion routing is the concept of distributing packets among many different servers and routing them onwards randomly while en- and de-crypting them. This effectively prevents anyone from seeing where a packet came from, or where it’s headed. The periodical encryption even prevents the servers that are routing your packets to see where it came from, or where its final destination is. Each individual server only knows where the packet came from and the next server it is to be sent to (hence the name, we’re peeling the onion). Simply put, you’re untraceable.

This technique is being used by everything/everyone from journalists within restrictive regimes, to corporations conducting opposition analysis, and even the U.S. Navy, who used it as a means to communicate while within the middle east, not too long ago. It is, however, not completely secure. If someone had access to both your computer and the server you’re trying to communicate with, they could potentially assess what packets are part of the same circuit. Fortunately, this is very rarely the case.

Why should I use it?

By now you’re probably hyped about the possibility of committing online fraud, hacking, identity theft and other illegal activities. Perhaps not. Either way, it’s certainly possible — just don’t consider yourself the next Kevin Mitnick quite yet. If the CIA really wanted to get to you, I’m sure they could. Besides, Kevin Mitnick’s true strength was social engineering. …Oh yes, there’s some moral/legal issues, too.

Jokes aside, there’s various scenarios where you might want to hide your identity. Personally, I use onion routing when I’m online on campus. Even though there’s no real reason why I should, as I don’t perform criminal acts (that you know of), I just don’t like having someone breathe down my neck. What I do and where I go while online is my business, not the school’s internet administrator with his sparkling Microsoft diplomas and Microsoft Windows Server 2003 running ISA. Yes, we’re quite up-to-date here in ol’ Denmark.

Other scenarios include:

  • You want to find information on treatment for an illness that you do not want anyone to know about.
  • You’re in a country that is known to actively monitor internet traffic.
  • You participate in e.g. online chat-rooms for victims of abuse, rape, etc.
  • etc…

Quote from the Tor website:

Individuals use Tor to keep websites from tracking them and their family members, or to connect to news sites, instant messaging services, or the like when these are blocked by their local Internet providers. Tor’s hidden services let users publish web sites and other services without needing to reveal the location of the site. Individuals also use Tor for socially sensitive communication: chat rooms and web forums for rape and abuse survivors, or people with illnesses.

Journalists use Tor to communicate more safely with whistleblowers and dissidents. Non-governmental organizations (NGOs) use Tor to allow their workers to connect to their home website while they’re in a foreign country, without notifying everybody nearby that they’re working with that organization.

Using it

Tor is the most popular installment of onion routing. It is being used by hundreds of thousands of people around the world. This means that there are thousands of potential servers on your traffic’s path, which ensures your anonymity. For a visual demonstration of how Tor (and onion routing in general) works, see the pictures below.

How Tor works 1 How Tor works 2 How Tor works 3

Tor is surprisingly easy to install, configure, and use — regardless of operating system. For download and installation instructions, please see the Tor download page. For more information about online routing and Tor, see their website.

Stay safe, and happy peeling!

How I Taught Myself Programming by Making a Game

This is the tale of how I wanted to create my own computer game, how I taught myself programming by doing it (not the other way around), and why I think you should do the same.

My Story

Stick ManMy first exposure to computer programming was back when I was about 10. Some of the cool boys at school (you know how it’s like) were playing a fantasy game with each other, all in text. They called it a “MUD“, one of the oldest genres of computer games. I grew curious and it didn’t take long before I was sat at home, religiously emerged in text worlds, rather than graphical games like Quake and Counter-Strike (both wildly popular back then, of course).

Briefly about MUDs: If you’ve never heard of or played MUDs, I strongly encourage you to give them a try. They may not have graphics, but that is exactly what gives them power. They’re like books — if you have a decent imagination, you don’t need graphics. In fact, I’d play a MUD over a game with crappy graphics any day. MUDs are also incredibly educational — if I hadn’t played MUDs, I wouldn’t be speaking nor writing English nearly as well as I do today (I’m not a native speaker), and I probably wouldn’t know much about programming either. If you’re still not curious, there’s also the fact that about half of MUD players are female (*wink*).

Anyway, after a while I decided I wanted to create my own game. I downloaded a C codebase and started hacking away at the source, experimenting and learning the basics of programming (I was completely clueless before MUDs). Creating a game was no longer a mere dream — I was doing it, even though I was quite a newbie. I was in the matrix.

Eventually, my little project evolved into more than just a spare-time thing and was serving a couple thousand players, admittedly not simultaneously but I was still quite impressed, and I had learned many a valuable lesson about everything from love to programming.

I took the plunge into the world of programming without reading any books on the subject. I am a person who learns best from practice, so it wasn’t all that bad. I bent, I broke and I played with the code and eventually I learned all about functions, pointers, memory management, and all the other fun feats of C. The only downside to this was that I was not learning contemporary programming languages and methods. Until recently, that has been the single biggest reason why I haven’t recommended that anyone interested in programming start out by trying to create their own MUD. MUD codebases are old… Well, most of them, anyway.

NakedMud

Another Stick ManNakedMud is a modern MUD codebase whose core is still in the good old C, but everything else is accomplished using Python as an embedded scripting language. Don’t let C discourage you — if you want, you can leave the core alone, do everything in Python and only make the small, necessary changes in C. Python is incredibly easy to learn, and games are much more fun to work with than traditional learning tools, right? Could it be any better? Besides, as soon as you’re comfortable with Python, modifying C will be painless, too.

Geoff Hollis, the creator of NakedMud, describes the codebase as a clean and easy way to create your own MUD, without all the usual hassle that other codebases bring — and that’s exactly what it is. NakedMud’s source is beautifully clear and concise in comparison to other codebases, making it a perfect tool for those who want to create their own game for the first time, and have no clue how to do it from scratch. If you want to create your own game, really, use it.

What now?

I won’t go into details about NakedMud as Geoff has literally written books about it. If any of this has even remotely tickled your curiosity, I will, however, end this off by strongly recommending that you learn more on your own. Here’s a few links to get you started:

The source of the MUD I created, Shattered Dreams MUD (SDMUD), can be found here. As you can probably imagine from what I said about it being my first, it isn’t a masterpiece. If anything, studying the source of it will make you realize what makes NakedMud better than the other, old, mainstream codebases.

WordPress Plugins a Site Wouldn’t Function Without

Wordpress LogoPerhaps “wouldn’t function” is an overstatement — it’d surely function, just not quite as well. These are the WordPress plugins that I install before doing anything else on a new blog (all are highly recommended!):

404 Notifier
This is a nifty little plugin that allows you to subscribe to an RSS feed listing all of the 404 hits your site receives. It’s useful if you’re doing any changes in permalinks, deleting posts, or similar. I wouldn’t recommend this for high-traffic sites, unless you purposefully want to see what the “hacking” SQL-Inject scout bots look for.

Akismet
I can’t even begin to describe my undying love for this tool. I love it almost as much as I love Gmail’s anti-spam feature. It blocks spam comments on your blog, and it is almost always correct in what it blocks.

FeedBurner Feed Replacement
If you aren’t already “burning your feed”, you should. Feeds are becoming increasingly popular, and this service manipulates your feed to your choosing, e.g. by inserting a “Digg this” link below posts, tracking your feed subscribers/stats, and more. This plugin simply redirects all hits to /feed/ (and /comments/feed/ if you choose so) to your burnt feed on FeedBurner. For an example, see the Burned Sheeped Feed!

Google Analyticator
Google Analytics is wonderful. Again, I highly urge you to sign up for this service if you’re not already using it. This plugin automatically inserts the correct Analytics code into your pages - what makes it better than simply pasting the code in your template footer is it also generates Analytics code for outbound links, allowing you to keep track of what links are generating the most heat.

Google Sitemap Generator
I’ve previously tried to manually build sitemaps with the Google Sitemap Generator tool, by parsing Apache accesslogs. This turned out to be quite unsatisfying as it would index funky pages such as unfinished posts that I was working on in the admin panel. This sweet little plugin generates a Sitemap of all posts, pages and categorizes on your WordPress blog, prioritizes them based on comment count (if you choose to), automatically updates the sitemap and notifies Google every time you make a change, and more. If you’re using tags, it can also index that: Google Sitemap Generator UTW Tag Addon. For an example of a sitemap, see the Sheeped Sitemap (XML).

Related Entries
This plugin allows you to show a list of posts that are related to a specific post. For an example, check out the “Related Posts” part of the sidebar to the right.

Snap Preview Anywhere
Snap lets you show your users an automatic screenshot of a page before they click a link. For an example, hover over this link with your mouse: Hover me!. Snap is pretty cool, but serves no real, useful purpose — not on this site, anyway.

Sociable
Sociable automatically appends links to common social bookmarking sites for your users’ convenience. The links are set up so users will automatically get to an already existing story or submit a new one, preventing duplicate stories. For an example, see the bottom of this post, before the comments section. Sociable supports many more services than the ones I’m showing.

Subscribe To Comments
Allows your users to subscribe to the comments of a certain post when they are making a comment. This is particularly useful if users are seeking support for something you’ve written about. Whenever a new comment is made, they will receive an e-mail, letting them know there might be an answer to their question.

Ultimate Tag Warrior
Mmmmm. This plugin converts your blog from taxonomy to folksonomy in the sense that it lets you tag your posts rather than categorize them (or both). Personally, I keep categories as broad as possible, then add tags to posts to specify what I’m writing about. For an example, see the top of this post, which shows this was posted in Internet and Software. Now, take a look at the bottom of the post, which shows that this is tagged with the tag WordPress. UTW also lets you make a tag cloud, an awesome thing. You can see the tag cloud for Sheeped on the Archives page.

Videos with Wordpress
This is by far the easiest-to-use plugin of this type I’ve found so far. It lets you embed Google, YouTube, etc. Videos in your posts with very short tags, e.g. google 4183875433858020781 (surrounded by brackets). For an example, see the post on Parallel Universes I made a while back.

WordPress Reports
This plugin shows you (both) your Google Analytics and FeedBurner stats from within the WP admin panel. Very cool.

WP-Cache
This is THE single most useful WordPress plugin in my opinion. Everyone should use this. It automatically caches your pages and serves them from static files rather than making up to 30 SQL queries per page. I’ve been using it for ages with a cache time-out setting of 2592000 seconds (24 hours if I remember correctly) without any visual abnormalities. The cache is automatically cleared whenever a new post or comment is made. I’m telling you, this plugin could be what makes the difference between life and death if you get dugg/slashdotted/etc - and it’s basically transparent.

Note: If you make any changes to your blog’s template or core files, you will need to clear the cache manually.

WP ContactForm
Shows a simple contact form, allowing your visitors to reach you easily. For an example, see the Contact page.

WP-DBManager
WP-DBManager allows you to backup, restore, delete (if you really want to) and best of all, defragment your MySQL-database from within the WordPress administration panel.

WP-Lightbox2
Also one of my favorites. This plugin opens images in a very pretty AJAX window, allowing users to see images (even a series of images) on the page rather than having to navigate back and forth. For a demonstration, click this link to an image.

In case I fall in love with any more plugins, I will update this post.

Feel free to share your thoughts/problems of/with any of these add-ons by commenting!

Wordpress 2.1 “Ella”

WordPress 2.1 has just been released. It includes several improved/new features and over 550 bug fixes. Some of the nicest new features are that posts are automatically saved while you’re editing, you can switch between WYSIWYG and code editing instantly while writing, you can hide your blog from search engines, and there’s a new version of Akismet!

Wordpress 2.1 - Visual/Code AJAX Switching. Wordpress 2.1 - New Reading Options Wordpress 2.1 - New Privacy Options

One thing I really don’t like about this new release is that !–more– tags also cut RSS feeds — I like to have my frontpage show a minimized list of the most recent posts, but allow RSS-subscribed users to read the full contents of my posts — but… I guess showing full post content on the frontpage as well makes more sense. If you take a look at the frontpage, you’ll notice that Sheeped now makes more sense!

As always, the newest version of Wordpress is available on the WP Download Page.

WordPress 2.0.6

Wordpress LogoWordPress 2.0.6 has just been released. It addresses an important security issue and all users are advised to upgrade as soon as possible. Other than the security fix, the new release sports Safari support for HTML quicktags, comment filtering (to avoid comments breaking page layout) and compatability with PHP/FastCGI setups.

Update: A small bug was introduced in 2.0.6. It affects people using FeedBurner. This article explains how to fix it (it’s rather quick and painless).