Enabling Clean URLs Drupal 7

  • Posted on: 16 February 2014
  • By: Pradeep George

I have faced this problem many times, so thought this could help the person reading this :-)
 Often in Dupal 7  when you go to Configuration>>Clean URLs and "Run the clean URL test" it will give a failed run message even though the server have the capability to have clean URLs.
In this case all you have to do is to replace the clean URLs link on the browser from      

XML sitemap and Blog entries in Drupal 7

  • Posted on: 3 December 2013
  • By: Pradeep George

If you have built a new site based on Drupal and started blogging, you need to ensure that all your blog entries are included in the XML sitemap so that the system will automatically submitt it to the search engines.

In order to have your menu's and nodes(blogs are included in that), you have to enable the modules as shown below.

XML sitemap Drupal 7

Bulk Delete of Unapproved Comments in Drupal 7

  • Posted on: 13 January 2013
  • By: Pradeep George

When you allow comments in your blog post or page, often you will be spammed with thousands of comments from spammers. One way to reduse it to use module like CAPTCHA.
IF you already have thousands of comments to your posts and would like to remove all the un approved comments here is the method.

1. Enable the PHP format in your site
2. Create a new content page and add the following code

db_query('DELETE FROM comment WHERE status = 0');

How to solve the Blank page issue with MAMP PRO and DRUPAL

  • Posted on: 16 February 2012
  • By: Pradeep George

I have recently upgraded to MAMP PRO 2 and to my surprise some of the sites I was working with started showing a blank page locally even though the online version is working fine. After spending some hours in research, I have found the solution. It was basically because of the PHP memory limit.

If you add the following code in your index.php file , it will show the error OR  you could open MAMP PRO >>log>>Apache and check the logs. I got the following error

Add Twitter and Facebook buttons to your blog posts

  • Posted on: 2 November 2011
  • By: Pradeep George

There are several ways you can add the Twitter and Facebook buttons to your blog posts so that people can easily share your artciles or blog posts. One of the easiest way to add the following php code in to your page.

1. In Drupal, make sure you have enabled "PHP filter" in your module section.
2. Create a new block for Twitter and Facebook section
3. Add the below php code in the body as "Source" in case you have wysiwyg editor enabled
4. Select the Text format as "PHP code"
5. Save and add the block in your blog section.