****
*
*
*
*







*
*
                                      
*
*
System Admin



System Admin    

    

How to increase the speed of a drupal website?    

*
*

*
*

How to increase the speed of a drupal website?


Categories:


Tags:


Feb
12

Many of my users have had this question on how to increase the speed of a drupal 6 website specifically in a shared hosting environment

The answer is simple , that you use caching for pages

In this article we will focus upon some advanced caching fundamentals of drupal 6.

We will need the following two modules for the same:

1. Authenticated User Page Caching (Authcache)(http://drupal.org/project/authcache)

2. Cache Router (http://drupal.org/project/cacherouter)


       

      Now copy the above two files to the “/sites/all/modules/” folder on your shared hosting environment.

      Now unzip the two files, you can use either of the following two methods to unzip the files:

      =======================================================================

      1. open http://webftp.dreamhost.com , enter your site address as host address and then your username and password and in the folder option navigate to “/your-site-root/sites/all/modules/” and then select the “blue” theme.

      Now select the two files above and press the unzip button on the top navigation menu of the page

      Select the directory to “/your-site-root/sites/all/modules/” and then press “set all target directories” button.

      After this press the submit key

      2. open putty from here:

      set the host name to your website address and then “open”

      login using your credentials

      navigate to “/your-site-root/sites/all/modules/” using cd /your-site-root/sites/all/modules/ command.

      type tar –zxvf authcache-6.x-1.0-rc1.tar.gz (or if you have another version then change this filename accordingly)

      enter

      again type tar –zxvf cacherouter-6.x-1.0-rc1.tar.gz (or if you have another version then change this filename accordingly) and then enter

      =======================================================================

       

      Now chmod your settings.php (which is saved under “sites/default”) to 644 .

      All we need to do here is to make the settings.php file writable , which it is not by default.

      Now edit the settings.php file and add the following line of code to it:

      $conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';
        $conf['cache_inc_via_authcache'] = './sites/all/modules/cacherouter/cacherouter.inc';

      $conf['cacherouter'] = array(
          'default' => array(
            'engine' => 'db',               // apc, memcache, db, file, eacc or xcache
            'server' => array(),             // memcached (host:port, e..g, 'localhost:11211')
            'shared' => TRUE,                // memcached shared single process
            'prefix' => '',                  // cache key prefix (for multiple sites)
            'path' => 'files/filecache',     // file engine cache location
            'static' => FALSE,               // static array cache (advanced)
          'fast_cache' => TRUE,
          ),
        );

       

      Now enable the modules and configure the Authcache settings
        (Site Configuration -> Performance -> Authcache).

       

       

      A brief description of what we are doing here:

      First of all we copied the files and unzipped them

      then we chmoded the settings.php file to make it writable

      The code that we added to settings.php actually is defined as:

      1. In settings.php we added the following code to make sure $conf['cache_inc'] loads Authcache we used:

      $conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

      2. Then we would tell Authcache to load the cacherouter as:

        $conf['cache_inc_via_authcache'] = './sites/all/modules/cacherouter/cacherouter.inc';

      3. Then we configure the cache router as explained in its docs :

      $conf['cacherouter'] = array(
          'default' => array(
            'engine' => 'db',               // apc, memcache, db, file, eacc or xcache
            'server' => array(),             // memcached (host:port, e..g, 'localhost:11211')
            'shared' => TRUE,                // memcached shared single process
            'prefix' => '',                  // cache key prefix (for multiple sites)
            'path' => 'files/filecache',     // file engine cache location
            'static' => FALSE,               // static array cache (advanced)
          'fast_cache' => TRUE,
          ),
        );

      4. In the last step we configured the auth cache module.

      By doing all this the site will cache pages for both anonymous and authenticated users:authcache

      What is the need to do all the above , when drupal has inbuilt caching option?

      By default the caching option given in drupal under performance only enables caching for anonymous users, by doing and performing the steps above we actually enable the caching for both anonymous and authenticated users.

      Hence a significant boost in the drupal performance is observed



      No TrackBacks

      TrackBack URL: http://www.skar.us/site/mt-tb.cgi/40

      Leave a comment








      *
      *

      administrator
      Author Bio          ★★★★★

      Author Name:         administrator
      Author Location:    India
      Author Rank:          Writer
      Author Status:        
      The Green leave stands!!


      *
      *
      *
      *
      ****



      *****



        Desktop
      • eBooks
      • Games
      • Softwares
      • Tools
      • Tweaks
      • Wallpapers
      • Warez
        PDA
      • Games
      • Tools
      • Wallpapers
        System Administration
      • dll Center
      • Scripts
      • Tools
      • .extensions database
      • Write-up
        more...
      • Download Database
      • Jobs
      • Lists
      • Polls
      • Glossary

      01000011 01110010 01100001 01100011 01101011 01111010 01101000 01100001 01100011 01101011