Community Documentation

Boost 7.x: installation instructions

Last updated February 8, 2013. Created by bgm on February 28, 2012.
Edited by firfin, anandps. Log in to edit this page.

1. Goto: [Administer > Configuration > Search and metadata > Clean URLs] and ensure that Drupal's clean URLs are enabled and working correctly on your site.

2. Unzip and upload the module folder (as is) to the sites/all/modules folder in your Drupal installation directory. Enable the module.

3. Goto: [Administer > Configuration > Development > Performance] and disable the Drupal core cache for anonymous users. Boost will not be able to generate its cache if a page is already in the Drupal core cache. This is the only core setting you must disable, others can be left enabled.

4. Goto: [Administer > Configuration > System > Boost > Boost Settings] and review the default settings.

5. Goto: [Administer > Configuration > System > Boost > File System] Make sure that the cache directory is writeable by the web server: you may need to create the directory, and set the permissions. Ideally, the cache directory should be owned by your user and be in the group of your web server ("www-data" on Debian/Ubuntu), with a unix permission of 0775 (read/write/exec owner, read/write/exec group, read/exec others).
To check these goto: [Reports -> Status Report]

6. Review the other default Boost settings.

7. IMPORTANT - Back up the original .htaccess file from your Drupal installation directory for safe keeping. In the next step you will edit this file and any mistake may render the site unusable (e.g. 500 Server Error, 404 Not Found etc.)

8. REQUIRED - This step is easy and required for Boost to work! Copy the custom generated htaccess rule from the [Administer > Configuration > System > Boost > .htaccess > .htaccess Generation] page and paste the rules into the Drupal .htaccess file as shown below.

       # RewriteBase /
       -------paste the rules right here--------
       # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
      # Pass all requests not referring directly to files in the filesystem to
      # index.php. Clean URLs are handled in drupal_environment_initialize().
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !=/favicon.ico
      RewriteRule ^ index.php [L]

Note: If you get "400 Bad Request" responses from Apache server, make sure you have configured the RewriteBase. For example when using VirtualHost configurations it is necessary to define as:

     RewriteBase /

8. a. IMPORTANT - Note for Windows Users only ...
When you copy the code from the ".htaccess generation" page (admin/config/system/boost/htaccess/generator), you MUST paste it into an editor that will convert the line endings to LF. This problem had me chasing shadows for a good long time. It's likely to occur if you develop on the windows platform but will have your Staging/Production servers on a Linux environment.
Use Notepad++ (freeware) to double check the line endings of the .htaccess code you copy. You can do this (once you've installed Notepad++) by making a new document, pasting the .htaccess code into it and going to and clicking on View > Show Symbol > Show End of Line. This will show you whether or not the end-of-line (EOL) characterr is CRLF or LF.

By default, Notepad++ will set the EOL to be the system default - which is CRLF on Windows. You may convert the line endings in the document by going to and clicking onEdit > EOL Conversion > UNIX Format. The character-figure at the end of lines will change from "CRLF" to "LF". Once this is done, it is safe to re-copy the .htaccess code and THEN put that into your .htaccess file.

Line endings and development across systems can be a pain, when working from a Windows machine, always keep it in the back of your mind.

9. Done! Enjoy your boosted Drupal!

10. Optional - enable crawler submodule to pre-cache pages.

Comments

Directory

If my site is vinnchan.net, then the directory should be cache/normal/vinnchan.net and should set the cache folder to 0775 permission ?

If it is above case, so I should keep Root cache directory : cache and Normal cache directory : normal?

Thanks for help

Correct

Yes, that's what I did. And actually, not sure if it's my host or Drupal or Boost or what did it, but I just checked the settings, hit save, checked my directories, and they were already created and with correct permissions.

Thanks!

This module helped a lot - thank you!

I lost my session

I follow every step that I read in README.txt for Drupal 7 and every thing looks fine, but when I click over my site logo or other link I lost my session. What was my mistake? . Thank you for your help...

re: I lost my session

Try the latest beta2 (or dev version). If I understand correctly what you describe, it may be fixed already. Please open a support request in the project's issue queue if the problem persists.

cache directory clarification

The 'file system' page instructions are a little unclear. It says to let them default. That is correct. Just leave them alone: Root cache directory = 'cache'. Normal cache directory = 'normal'. You don't have to change the settings to 'cache/normal/www.example.com' as you might infer.

re: cache directory clarification

Thanks for the feedback. I changed the formulation a bit to make it a bit clearer.

Great Module!

I was averaging 8-10 second page loads. I followed this guide exactly (which is one of the clearest guides i have seen on Drupal) and instantly my page loads, when logged out and no admin menu, is about 3-4 seconds.

I do have some questions:

1. Since the page info is stored as a gzipped html and not accessing my database as much does this mean my my monthly VPS MB limit can be reduced? i have a limit of 300mb and my database VPS crashes at least once a day. I ask because as a new business i am broke and want to try and minimize costs as much as possible.

2. how does this work with a responsive theme for mobile?

3. It seems that page load is still very slow as a logged in user. Anonymous user is at about 3 seconds page load now. Did i do something wrong in my setup of Boost?

thanks in advance for the info!

Caching

I'm not a Boost expert but I'll try and answer as I understand it.

1 - The pages are generated, compressed and stored when they are first accessed. Subsequently those pages are loaded directly from the cache, reducing the server load. Since the server is no longer generating content, but just sending the cache file again, the VPS processor and memory load will be massively reduced. I think the built in Drupal caching already gzips output, so the actual bandwidth used, in MB, won't be significantly reduced, if at all.

2 - The page generated is just copied to a file and compressed. Since a responsive theme is just a normal HTML page with media queries that are interpreted by the client browser, it will exactly as before.

3 - It's my understanding that this module only works if the system can guarantee that the page won't change between loads. With user specific content this is not the case so this module only really works for anonymous users.

I hope that makes things a little clearer and that if I'm wrong on anything, somebody more familiar with Boost will clarify.

Drupal Beginner at http://www.darksnow.net
Web Master of the UK Snowboarding community at http://www.darksnow.co.uk

How is the cache directory setup for multi site

I have a vhost configuration. The multisite is setup as follows

/home/potliweb/

Site 1 - /home/potliweb/sites/potli.sastratechnologies.biz
Site 2 - /home/potliweb/sites/potlim.sastratechnologies.biz

So where should the cache directories be created in /home/potliweb or in the respective site directories. Documentation is not clear on this. It just says that Boost supports multisite setup.

Also how do I check if Boost is working. In Drupal 6, Boost used to append its signature at the bottom of the page when the page is cached. Does the same apply in D7?

Acer Aspire 5745
[i5 430M, 3GB, 320GB]
Ubuntu 12.04 (Precise Pangolin)
Drupal 6.15, 7.x
Aware Hosting, Go Daddy, LimeDomains, Rackspace, Tata Instacompute

Boost is not serving Cached pages

Hi, I installed Boost as per the instructions, and I was able to see the files being cached in the path mentioned. I did not see any improvement in the page loads, so I did some troubleshooting and found out that the files are not being served from cache. Each time the link is refreshed, a new file is being created/modified in the cache directory. I am using the latest version of Boost and 2.4 Apache. Can anyone please help out if you faced a similar issue before? Thanks for your help !!!!

Which version of Drupal

Which version of Drupal are you using?

Acer Aspire 5745
[i5 430M, 3GB, 320GB]
Ubuntu 12.04 (Precise Pangolin)
Drupal 6.15, 7.x
Aware Hosting, Go Daddy, LimeDomains, Rackspace, Tata Instacompute

I have the same problem, but ..

I had the same problem. I use boost 7.x-1.0-beta2 and drupal 7.18.
It is solved if I enable the "Cache pages for anonymous users" in admin/config/development/performance. This is diffierent from the description in "Boost 7.x: installation instructions" (http://drupal.org/node/1459690).

BUT I have new problem: the "Cache Lifetime" dosen't work (can not be controlled). For example, I set the Cache Lifetime for 1 week, but a new file is being re-created/modified in the cache directory AFTER some hours. I don't know why. Where can I set it ?

Subfolder

If you have your website setup in a subfolder, it is important to note that step 8, pasting the htaccess code, is NOT correct. If your site is in a subfolder, and you use a htaccess in the root to obscure that drupal is in a subdirectory, then you have to put the boost htaccess rules in the root's htaccess, not the htaccess in the drupal folder. Here's what I did to have Drupal in a subfolder and have boost working:

RewriteEngine on

  ### BOOST START ###
#Here the boost stuff.
  ### BOOST END ###

  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]

  RewriteRule ^$ drupal/index.php [L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^drupal/(.*)$ drupal/index.php?q=$1 [L,QSA]

  RewriteCond %{DOCUMENT_ROOT}/drupal/$1 -f
  RewriteRule ^(.*)$ drupal/$1 [L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ drupal/index.php?q=$1 [L,QSA]

Hope this helps someone, this took me a couple of hours to debug.

Dagomar Paulides
B.A. Digital Media Design
Owner @ iz3 webdesign

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 7.x
Audience
Site administrators
Level
Intermediate

Administration & Security Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here