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.
define('WP_POST_REVISIONS', false);
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:
define(’WP_CONTENT_DIR’, ‘http://www.labnol.org/assets/wp-content’);
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.
Find this article at: http://www.labnol.org/internet/blogging/wordpress-tips-post-installation-hacks/3931/

Reader Comments
great tips man…but why not to remove the
<meta name=”generator” content=”WordPress 2.5″ />
line from header file of your theme rather than writing the following code in the functions. file
<?php remove_action(’wp_head’, ‘wp_generator’); ?>
Written by Roshan Bhattarai on 07.21.08
@Roahsn Bhattarai
Because that generator is now generated automatically by Wordpress (I think since 2.5 or so) and not by your theme.
Btw, if you wish to inhibit all auto-generators, you can write a simple function in your functions.php
/* remove all wp auto-generators */
function noGenerators() { return ”; }
add_filter(’the_generator’,'noGenerators’);
Written by Brajeshwar on 07.21.08
Ah.. thanks. Was looking for something like this.
Written by Santosh on 07.21.08
@ #1
Because this way is more “portable” in case you switch themes. Though I suspect that you’d need to preserve it across WP upgrades either way…
Written by Kyle Maxwell on 07.21.08
Is there any more unnecessary codes which we can delete? I hope it woould make the blog run a bit faster!
Thanks for this tricks!
Written by Renjith on 07.21.08
Good post. Thank you
What didi you mean by casually browsing. What is its effects?
Written by kasim on 07.21.08
Thanks Amit, It surely helps a lot
Written by Anmol Agarwal on 07.21.08
Great job! Could I translate it to chinese and publish to my blog ?
Written by Qianli on 07.22.08
Brilliant Tips. I never knew that there are so many things to do after installing WordPress.
I can not afford to miss reading this blog for a single day.
Amit – You are the Best of Tech Bloggers.
Written by Gopinath M on 07.22.08
Hey… thanks a ton for these tips.
Tip4 of Post Revisions is must do for all single user wordpress to keep database size in controlled state!
Written by Davinder on 07.22.08
Great tips!
I’ll be sure to implement many of them.
Written by rob friedman on 07.22.08
Great tips. Amit can you also post information on how to promote wordpress blogs online.
Written by Sandip on 07.22.08
Some interesting points. However some of them verge on paranoia and are really a step too far for the casual user. I’d prefer urging users to always make sure they have the latest version of WP for example, instead of removing the version number from the header.
Some good ideas to think about though
Written by Owen Cutajar on 07.22.08
Very useful tips for anyone using WordPress.
Thanks for the tips.
Written by NiMaL on 07.22.08
Hi -
I want to move my wp-content folder, but when I make the changes, Wordpress loads nothing. Are there any requirements about where you have the new wp-content folder? I’ve also tried defining WP_CONTENT_URL in addition, but still no luck.
Ideas?
Written by Shaun on 07.22.08
Actually, I figured it out. Almost every plugin that I have explicitly references the default wp-content directory, so it is these that are breaking Wordpress.
Great idea, but doesn’t seem to work in practice. Thanks for the other tips though.
Written by Shaun on 07.22.08
Good point about post revisions. I will turn them off in my sites.
Written by Binny V A on 07.22.08
great tips, amit – this article will help a lot.
Written by abhishek on 07.22.08
Once you have disabled Revisions, how can you drop the previously archived ones from the db?
Written by Marcelo on 07.23.08
I’ve tested the tips #1, 3 and 4 and they didn’t work in my Wordpress 2.6 :( What’s happening?
Written by Marcelo on 07.23.08
Great article, thanks.
I know workaround to image thumbnails:
in settings/misc.
two fields:
“Thumbnail size” and “Medium size”
just leave fields blank i.e. does not specify any sizes :) tn’s will not be created..
Written by Gene on 07.25.08
Nice article. I have just started blogging and recently upgraded to WP 2.6.
Is there a WP plug-in that lets us do the same thing?
Written by technochakra on 07.27.08
Great article, those tips come in handy. Mahalo.
Written by Stephen on 07.27.08
Hey Amit:
Great Tips! However, the version number removal does NOT work… I’ve even gone as far ahead as applying the:
remove_action(’wp_head’, ‘wp_generator’);
remove_action(’wp_head’, ‘wlwmanifest_link’);
to ALL 3 theme subfolders… Nothing! when I “re-apply” my theme and refresh my site, I still see the version #s…
Am I doing something wrong?
There are several functions.php, so maybe I’m editing the wrong ones? The ones I’ve edited are:
../wp-content/themes/classic/functions.php
../wp-content/themes/default/functions.php
../wp-content/themes/<mymoddedone>/functions.php
Any help?
Written by KnightMare on 07.27.08
KnightMare : maybe it’s comes from header.php files on your active themes directory.
Written by Mario on 07.27.08
#15 & #16: I got the same as Shaun when using the line in wp-config.php and moving my wp-content folder elsewhere – blank blog pages and when logged in and on the ‘design’ page (where it’s looking for available themes in the wp-content folder) I got a couple of PHP errors. I’m not using any plugins so it can’t just be that.
What am I missing? This would be so useful…
Written by Andy on 07.30.08
@Knightmare: I had the same problem, I allready ahd remove the template code from the header.php.
Once I wrote the remove_action(’wp_head’, ‘wp_generator’);
into the header.php itself, the code was no longer in the source.
So I don’t write it into the functions.php but the header.php, works great!
Written by Hummerbie on 08.01.08
Re. Tip 6 – I’ve got this working now. Your example defines WP_CONTENT_DIR with a URL. WP_CONTENT_DIR is the directory path, there’s another new 2.6 variable for the URL – WP_CONTENT_URL.
I dropped WP_CONTENT_DIR from my wp-config.php file and set WP_CONTENT_URL instead, and this is working fine on my blog.
From what I’ve read though, this may cause problems with certain plugins that have hard-coded paths (as Shaun says at #16).
Written by Andy on 08.01.08
Yeah for tip #1 inserting that code caused some funky errors but deleting the line that generates the version number from the header.php file did the trick.
If it’s relevant, the blog in question is on 2.7 bleeding edge, not sure if something in that version causes the insertion to fail or perhaps it’s the them used (The Morning After).
Written by Adam Pieniazek on 08.27.08
To remove the WP version tag, you can also edit genral-template.php (includes). At about line 1207 you’ll find
function wp_generator() {
the_generator( apply_filters( ‘wp_generator_type’, ‘xhtml’ ) );
}
change that to
function wp_generator() {
the_generator( apply_filters( ‘xhtml’ ) );
}
Written by Anneke on 10.19.08
Disabling the generation of thumbnails and/or medium sizes is also easy. In the admin, go to Settings -> Miscellanious and empty the thumbnails and/or medium sizes fields for width and height. Then Save. No thumbnails and/or medium sized images will be generated.
Written by Anneke on 10.19.08
This line killed my NextGEN photo on side bar:
It will be great if WP can officially allow people to switch on and off of those features.
Written by KFChow.com on 11.01.08
Forgot to note Amit disabled html on comment : )
I meant this wp_generatorline:
remove_action(’wp_head’, ‘wp_generator’);
Written by KFChow.com on 11.01.08
I have a question that I cannot seem to find an answer for.
What I want to do is be able to pass a parameter (a flash file name) to a blog page. This blog page contains a swf player that will then play that flash file. Is this an easy thing to do? If so, I am lost would appreciate any help.
Thank you in advance.
Written by tron on 11.12.08
count me in, KFChow,
I would love to have tutorials on tips and tricks merging flash apps into wordpress
Written by Rony on 01.13.09
The first two steps that I tend to carry out after a fresh install are invariably rewriting permalinks and installing wp-cache. Can make a world of difference.
Written by Ajay on 03.07.09