jump to navigation

How to optimize Drupal for better performance June 28, 2011

Posted by Tournas Dimitrios in Drupal 7.2.

Drupal is one of the three most popular CMS applications (besides WordPress and Joomla ) , offering stability and performance for almost any kind of site. However, if you don’t maintain it properly, it can become slow.Here are some tips on how to optimize your Drupal:

  •  As the number of module increases , the complexity of serving a request increases . That means the server has to work harder .Disabling/removing all modules/blocks you are not using is a good practice .
  • Check your website using this online tool . It will give you valuable information on what modifications can be implemented to improve performance .
  • Optimize your Drupal database :
    • The easiest way is to install the DB Maintenance module .
    • The other way  is to create a php script with the sql query. The code you should include in the php file should be similar to this :
      //replace credentials to reflect your's
      $db = mysql_connect('localhost','root','');
       if(!$db) echo "cannot connect to the database"; 
      $alltables = mysql_query("SHOW TABLES"); 
      while ($table = mysql_fetch_assoc($alltables)) { 
         foreach ($table as $db => $tablename) {
         $result = mysql_query("OPTIMIZE TABLE ".$tablename)
              or die(mysql_error());
      	echo "optimized ". $tablename . "<br>";
  • The three secrets to optimal Drupal performance are cache , cache and more cache . Consider strategies like :


No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s