WordPress 404 errors for old plugin files via Google Bot

I know – I hate the fact that Google indexes the site code, and then floods my logs with 404s for old files.

You can add something like this to your robots.txt file:

User-agent: *
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/

You could probably just have Disallow: /wp-content/ but that would also stop your images in the uploads folder from being indexed too… unless you want that!