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…