WordPress 3.0.2 is available for download.

WordPress 3.0.2 has been released couple of days ago. The release fixes a security issue and some other bugs.

The security issue in the older versions of wordpress could allow author level users to gain further access on the blog. But even if you don’t have other users on your blog you should upgrade your blog to the latest version.

If your theme does not support the newer versions of wordpress you can hire me or any other wordpress developer to make your theme and plugins compatible with newer version of wordpress. But do not delay the update as you might later regret it and will have to hire someone to not only update your theme but also fixed your hacked blog or in worse case you might even lose all your precious data on your blog.

You can update automatically using the WordPress Dashboard of your blog or you can download the update and then do the manual upload. Once again if you are worried about breaking your blog you can hire me.

P.S I will soon write the step by step howto to update your wordpress installation to the latest version without breaking the blog.

WordPress 3.0 has been released

Finally long awaited version 3.0 of WordPress has been released. This version has got 1,217 bug fixes, so upgrading to WordPress 3.0 is must must. Get ready to upgrade to WordPress 3.0 as this is a major update so you have to prepare for the update before actually trying it on your live site.

Major new features of this upgrades are the new default theme “Twenty Ten“. ¬†Wordpress MU is now part of WordPress, so now you can run off multiple sites from your single WordPress install. One feature that will going to be very useful for WordPress blog administrators is the bulk upgrade of plugins, you can now upgrade all selected plugins with just one click.

You must watch the WordPress 3.0 tour video, specially in HD to catch the Easter eggs (that is what the announcement blog says):


When are you planning to upgrade to WordPress 3.0? Is your theme WordPress 3.0 ready? Are you plugins WordPress 3.0 ready?

WP Super Cache has been released

WP Super Cache has been released, this is the biggest release because it support WordPress 3.0 which will be coming out very soon. So now the users will not have to wait for WP Super Cache to be WordPress 3.0 compatible, it already works with it.

The other major features being added to this release are:

  • Better support for mobile plugins.
  • Cache preloading to cache every post of the blog.
  • Cache tester to test if home page of the blog has been cached.

The only glitch which only affects huge blogs (specially those with more then 32K posts) is that Cache preloading will cache all posts of your blog which means you will hit the file system limits, so if your blog is hosted on ext2 or ext3 file systems (99% chance it is) then you should be careful about this feature. You can read more about the issue at WordPress.org support forum. Read official release announcement here.

Have you tried WP Super Cache yet? Are you going to upgrade to it or will you wait till WordPress 3.0? Let us know.

How to Add Facebook Like Button to Your WordPress Blog Posts

Facebook recently launched a web wide Like button which allows everyone to add Like buttons on every page of their site. With in hours of launching everyone started adding buttons on their site. The bloggers who use WordPress platform for blogging didn’t stay behind in the race, they also started adding the button on their blog and very soon the button started appearing on thousands of blogs.

Let me tell you how can you add the Facebook Like button on you WordPress Blog with in 5 minutes, without any extra plugin.

Goto the your WordPress theme directory and open the file single.php and add the following code snippet to appropriate position in your file.

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;"></iframe>

The above code adds an iFrame to your site which displays the Facebook Like button. You can modify the look & feel of the button by changing following parameters in the iFrame URL.

Facebook Like Standard Layout


The above example uses the layout “standard” but you can also use the “button_count” layout which will display Like button as follows:

Facebook Layout Button Count

Show Face:

If you wish to show the friends who have already liked the page, then use the option “show_face=true”.

Color Scheme:

If you want to use the dark color scheme use the parameter of colorscheme to change the colors. You can use “dark” as follows to use the dark color scheme for your Like button.


Facebook Like Dark ColorScheme

Are you using Facebook Like button on your blog? Are you seeing any results? Share your success story with us!

How to delete old wordpress revisions

Have you been keeping post revisions for all your posts. You might have been storing post revisions for posts that you don’t touch anymore. There is no point storing post revisions if you are not making any changes to the post. Post revisions serve as a backup if you mistakenly change something in your post and then you have to revert back. But its very rare that you have something on posts older then 2-3 months. Also in my last post I showed how you can completely disable revisions, so if you had it enabled you might still have those old post revisions in your database.

Why should you delete post revisions?

  • Clean up your database.
  • So you don’t accidentally revert back to an old revision.
  • Free up some space.
  • To decrease the database overhead.

Delete revisions older then x days.

You have revisions enabled and just want to delete revisions on public posts older then x days, you should use revision delete! plugin. Revision delete! automatically deletes revisions on posts older then x days. Install the plugin and then configure it under Tools.

Delete redundant revisions.

Delete Revision is the revision manager that allows you to delete redundant revisions in bulks and hence reduces the load on database and makes your wordpress blog faster.

Delete all of them.

You have already disabled the revisions, now you just want to get rid of those old revision lurking in the database. So you can increase the performance of your blog. Access your data using your favorite client, and then select your blog database. After selecting the blog database run the following query and you are done.

DELETE FROM wp_posts WHERE post_type = "revision";


I am wondering how many other wordpress bloggers out there use revisions? So, have you used revisions? How do you manage? Have you disabled them altogether? Do you use a plugin to manage revisions? Have you ever reverted or had a need to revert to old post revision?

How to track adsense clicks on your wordpress blog

Stats, stats, stats!!! Every blogger love their stats, specially if the graph is moving up. You might already be using Google Analytics to track visitors on your blog. From where they are coming, what articles they are reading. But won’t it be great if you knew what user clicked on adsense ad? On what page a visitor clicked on adsense ad? How they came to your site? With the tracking information in front of you, you can optimize your web site for your visitors to increase conversions. I won’t be teaching Analytics here in detail, but if you have any issues or don’t understand anything you should ask.

To better integrate Google Analytics with your wordpress blog, I would recommend you use a plugin because adding tracking manually in your template is prone to errors and you might mess up your theme. I personally use Google Analytics for WordPress and you can get it from here.

Once you have installed Google Analytics for WordPress, goto Google Analytics configuration page and enable “Track Adsense clicks“.

Enable adsense click in Analytics plugin

Save your settings and then login to your Google Analytics. We will be creating new Goal on Google Analytics, if you are wondering what is a Goal? it lets you track conversion rate. You can evaluate your traffic in terms of money and much more. When you are logged into your Google Analytics account, goto your Website Profiles and click Edit in front of your website profile.

Edit analytics profile

Now you are on Profile Settings page and you should now be seeing a section Goals. By default there are 4 sets of Goals available for every profile and you can add upto 5 Goals in every set.

Analytics Profile Settings Goal

Click on “Add goal” to add new Goal. Once you are on Goal Setting page to add new Goal. Enter your Goal Name we will use “Adsense Clicks” for this example and select URL Destination as Goal Type.

Goal Add Settings

As soon as you will select URL Destination as your Goal Type, the Goal Details panel will be shown. Enter “/outbound/asclick” as the Goal URL, you can also enter your optional Goal Value.

Analytics Goal Details

Click Save Goal and you will see the new Goal listed under Goals on your Profile settings.

New goal  adsense click listed

From now on Google analytics will track your adsense clicks. You can track your conversion rates under Goals while viewing reports of your site.

This is how I have setup my adsense tracking, do you have suggestions to improve it? Do you know how else can those adsense clicks can be tracked?

Disable wordpress post revisions

WordPress being most popular blogging platform has been used by hundreds of thousands of bloggers. As we all know that WordPress is an Open Source software that is in continuous development. With every release numerous new features are added to the platform. Not every new feature is suitable for everyone and this is what is good about WordPress. You can disable most if not all of the functionalities or features that does not suite you.

Post revisions is a feature that was added in WordPress with version 2.6, it is useful for most of the bloggers. But suppose you have thousands of posts and you are hard core fan of WordPress Post Editor so you only use it to edit posts. WordPress saves copy of your posts while you edit them, by default its every 60 seconds. So suppose you create a new post and it took you 15 minutes to write it, there will be 15 revisions of the same post in your WordPress database. By the time you reach 1000 posts the number of revisions will be 15000. Though revisions may be useful for some cases but not for everyone. WordPress saves a revision of every post when ever you will make changes to it while in Drafts or after publishing.

Few drawbacks of Post Revisions are:

  • Wastes space
  • Makes db slower
  • Makes editing slower

I am sure there will be more drawback. But for me it is enough that if I am not using or do not want a feature I can disable it. I am sure you will want to disable it too until there is an absolute need for it.

Lets see how we can disable the post revisions. After installing WordPress open your wp-config.php in your favorite text editor and add the following line:
define('WP_POST_REVISIONS', false );

In case if you do not want to disable it but want to limit the number of post revisions you can change false to number of revisions you want to allow, e.g:
define('WP_POST_REVISIONS', 5);

Save the file and you are done.

Do you use post revisions? Do you know any other drawbacks of using post revisions?

Secure wordpress by changing default administrator username

Securing wordpress installation is the first thing that I do after installing wordpress. There are many security measures I take but changing default administrator username is the very basic and important security measure that people often forget about. Here I am listing down the steps that are required to change the username.

  1. Goto Users->Authors & Users to verify that you or your partner (if you have one) haven’t already change the default admin username. You should see admin listed under the Username.
  2. Users Panel

    Default admin username

  3. Now to change the username “admin” we have to run a MySQL query. There are two ways to do it. You can use PhpMyAdmin or login directly to your MySQL server and do it. Below I have listed both ways.

Change admin username using phpMyAdmin

The easiest way is to use phpMyAdmin. Follow the steps below to change username using phpMyAdmin.

  1. Login to your phpMyAdmin and select your wordpress database.
  2. Select wordpress database

  3. Then click on the wp_users table under the tables list.
  4. Select wordpress users table

  5. Click the pencil icon just before admin username.
  6. Click pencil icon with admin username record

  7. Change admin entry under user_login to your desired admin username.
  8. Change default admin under user_login field
    The changed admin field
  9. Click the “Go” button. Thats it. You are done, now you can login with your new admin username

Change the admin username directly from MySQL shell.

  1. conntect to your MySQL server using mysql client.
  2. select your db by issue following command.
  3. USE <database_name>;

  4. Use the following query to change the default admin username to your desired username. In this case we will change it to “thewordpressguy
  5. UPDATE wp_users SET user_login='admin' WHERE ID=1;

  6. Thats it. You are done. Now you can login to your wordpress admin with your new admin username.

This was the first step that I take when I install wordpress. What is your first step after installing wordpress?

5 features not plugins that should be part of WordPress Code

Have you ever setup a wordpress blog? What are the common features a blog should have? If you have ever setup a wordpress blog then you must know that you have to add plugins to add extra functionality or features. I wish that following 5 features should become part of WordPress Code.

  • Anti Spam
  • Stats
  • Subscribe to Comments
  • XML Sitemaps
  • Similar Posts

Lets see what plugins are available for these features. I will be listing top 2 or 3 at most, not all the plugins for every feature. Let me know if I miss one of your favorites.

Anti Spam

Anti Spam plugins are required to prevent comment spam and/or spam via forms on the blog. With thousands of spammers out there with intelligent spam spiders that crawl the web and automatically submits every form they see with their spam data, a blogger doesn’tt have all day to sort out the spam comments, he really needs anti spam plugins to do most of the work and then all the blogger have to do is to look at the comments that are marked as spam for possible valid comments. i.e false positives. At the time of writing this post a simple search for “anti spam” listed 41 plugins, but there is one plugin that has a very good reputation not because it has been developed by WordPress guys but because it really works, yes right that is Akismet. You will need a wordpress.com account to get your own API key for the Akismet plugin to work.


We all love stats, why shouldn’t we? They help us know if we are doing good on our blog or not? Stats graphs let us see if we are moving up or going down? There are many Stats plugins available but to be honest I have never used anyother then “WordPress.com Stats” and like Akismet it has been developed by WordPress Team and you need your own API key to actually use it. You can also view your blog stats on wordpress.com, its really cool and handy feature if you have wordpress.com blogs.

Comments Subscription

Subscription, subscription we all need more and more subscribers so people keep coming back to our blog. Comments Subscripton is a feature that not only keep readers coming back but it also encourages conversation, your readers can easily followup the discussion going on any post of their choice. So this feature not only make your readers interested in your blog but it also increases the traffic of the blog. Subscribe to Comments it the only plugin I use and I find useful for this purpose.


Search Engine needs to know the structure of your site, to better index your site and list them in relevant searches. Not only that but Search Engine crawlers needs an easy way to find your content. Almost all Search Engines support Sitemaps specially the big ones. So not having a sitemap for your blog will be really stupid. My favorite is Google XML Sitemaps, don’t let the name stop your from using it, the sitemaps generated can be used on all Search Engines.

Similar Posts

Displaying Related or Similar posts always helps increase page views which is an important aspect for every blogger. Though it is still not enabled on my blog but I have planned it and will surely be enabling the Similar posts on my blog. For this purpose I have couple of plugins under consideration which includes “Similar Posts” and “Yet Another Related Posts Plugin“. I will post my findings once I decide.

Did I miss your favorite feature? or did I miss your favorite plugin? What are your thoughts on the features I have listed? Should they become part of WordPress Code? If not, why?

A mistake that no blogger should ever do

Its been almost a month since I last posted on my blog. First of all I should sorry all of you out there for not being able to updated the blog specially I want to sorry to those who were expecting me to post more posts specially about wordpress. I had been quite busy with some stuff and hence couldn’t update the blog, and I am really sorry for that. I hope I will be able to keep with the pace of changing technology and post useful stuff as soon as I have any.

If you ask any blogger they will say a blog should be updated once a week except if you are posting about something that does not gets updated that frequently. But my blog was about Programming, WordPress, blogging, Twitter and Facebook which is for sure has changed a lot since I last posted. I have missed a lot of things and wasn’t able to keep myself updated with the latest stuff happening special in the social media scene.

Today when I logged on to Facebook I found out that highlights are gone, now they show up in the news feed. Facebook now have a news feed as well as Live feed, I am still not able to figure out difference between the two. But my understanding is the Live Feed thing shows that FriendFeed team is doing their work and Live feed should have real time feed coming. This is surely some great stuff coming out of Facebook and I will write more about new features and updates from Facebook very soon. I am thinking of writing posts on how to use these new features to enhance your Facebooking and use it effectively. Oh by they way, I also like that new ability of Draging and Dropping of news filters.

Twitter seems to have new features too, specially the list feature which is as per my knowledge currently only available to 5% of users. But the list feature will be available to all users from sometime next month. I hope they provide a sensible way of managing and using lists through their web interface. Also I notice Twitter is going pretty hard on spammers because they get them suspended very soon after they register. I got follow notifications from few spammers and as I manually check everyone who follows me and then follow them back if they are human and share useful stuff not just what they had in lunch. Sharing what one had in lunch is also interesting but only if that person shares other useful stuff too.

Stay tuned for more posts coming this week. I will try to do a post daily but only if I will have some useful stuff to write about.

P.S WordPress has been updated too, it is now 2.8.5. I don’t know when the update was released but I just saw the notification at the top, so gotta update too.