The WordPress tips and few hacks mentioned below may only apply to a self-hosted installation of WordPress version 2.6 or above.
*If your WordPress blog is hosted on wordpress.com, please skip this.
Tip 0: Change the Default Image Upload Folder
The default installation of WordPress will store all your images inside wp-content/uploads folder.
You can however use a different folder or even sub-domain on your web server for saving file uploads as in the setting screen above. This offers two advantages – your image URLs become relatively shorter and second, the size of your WordPress folder will always remain small and manageable.
Also deselect the option – “Organize my uploads into month- and year-based folders.”
Tip 1: Remove unnecessary code from your WordPress header.
WordPress by default adds a version number to the header of all your blog pages.
<meta name="generator" content="WordPress 2.5" />
This information may prove a goldmine for WordPress hackers as they can easily target blogs that are using the older and less secure versions of WordPress software. To completely remove the version number from WordPress header, add this line to your functions.php file in the WordPress themes folder.
<?php remove_action('wp_head', 'wp_generator'); ?>
Tip 2: Prevent people from casually browsing your WordPress Folders
Since you definitely don’t want Peeping Toms to navigate your WordPress files and folders using the explorer view in web browsers, add the following link to your .htaccess file that exists in the main WordPress installation directory.
Options All -Indexes
Tip 3: Windows Live Writer Templates & WordPress
If you not blogging via the Windows Live Writer client, add the following line to your functions.php file.
<?php remove_action('wp_head', 'wlwmanifest_link'); ?>
The WLW-Manifest function is used by Windows Live Writer to download the styles / themes used in your WordPress blog. Windows Live Writer users who do not use the live preview feature may also turn off this function.
Tip 4: Turn off Post Revisions in WordPress 2.6
WordPress 2.6 introduced Wikipedia style document revisions where you have access to all previous version of the document making it easy to revert incase you make any mistakes.
This may be a great feature for blogs where multiple authors work on the same blog post but 99% of WordPress users don’t need it. Post revisions also increase the size of WordPress wp_posts table as each revision means an additional row.
To disable post revisions in WordPress 2.6, add this to your wp-config.php file.
Tip 5: Disable HTML in WordPress Comments
The comment box is WordPress is like a basic HTML editor – people can use HTML tags like <b>, <a>, <i>, etc to highlight certain words in their comment or add live links. If you like to disable HTML in WordPress comments, add this to your functions.php
add_filter( 'pre_comment_content', 'wp_specialchars' );
Tip 6: Change location of the Plugins & WordPress Themes folder
With WordPress 2.6, you can place the wp-content folder anywhere on your web server. This may come handy when you are upgrading the WordPress installation because none of your existing themes and plug-ins will get overwritten even if you replace all the WordPress files with a tar downloaded from wordpress.org.
If you decide to move the wp-content folder to another location, specify the path in the wp-config.php file:
Tip 7: XML Sitemaps – Change the Building Mode
If you using XML Sitemaps plugin in WordPress, try changing the building mode to “manual.”
When you publish (or delete) a blog post via the WordPress write panel, the entire XML sitemap is recreated from scratch and hence may increase the overall time it takes to publish a post as you’ll have to wait until the creation process is over.
Tip 8: Turn Off Image Thumbnails in WordPress (workaround)
When you upload an image to WordPress, it creates two additional thumbnail images in the uploads directory. I don’t know how to prevent WordPress from creating image thumbnails but there’s a workaround if you publish posts via Windows Live Writer.
Just use the FTP publishing option for images and this will automatically disable thumbnail creation because the upload happens through a different route.
Also see this tip on creating a mobile friendly WordPress blog using Google Reader. The upcoming article will be about XML-RPC support in WordPress 2.6. Stay tuned.