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…

WordPress 2.1 and Ultimate Tag Warrior

Ultimate Tag Warrior does not work with Wordpress 2.1 at the moment. The bug turns out to be quite nasty. Whenever a new comment is made, one is in moderation or a trackback is made, all the respective post’s tags will be deleted. This applies to both registered and anonymous users.

I’ve implemented a temporary fix that seems to work. I was able to find several other fixes, but none of them covered all of the errors I encountered. This is basically a mashup that should fix everything:

1. Get the newest version of Ultimate Tag Warrior.

2. In wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior-actions.php around line 500 in the ultimate_save_tags function, add the following if it is not already there:

if (isset($_POST['comment_post_ID'])) return $postID;
if (isset($_POST['not_spam'])) return $postID; // akismet fix
if (isset($_POST["comment"])) return $postID; // moderation.php fix
if (!isset($_POST['tagset'])) return $postID; // tag fix

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).