One of the great things about Drupal is how quickly you can crank one out for a special purpose, like an upcoming event. However, you are then faced with the dilemma of what to do with that site after the event has passed. Often you want to keep the site up for historical reasons, but if it stays a Drupal site, you really should keep up with security updates, which means eventually you'll need to update to the next version of Drupal. Or you can save yourself the bother by converting your site into a static archive.
There is a good article on at http://drupal.org/node/27882, but my goal is not just to create an archive, but to have the archive live on the web, and that article just gets you half way.
First, login as admin and prep your site
* Turn off all the dynamic blocks. ex: login block, who's online block
* Turn off dynamic modules. ex: search module
* Get rid of login/register links
** Update all nodes by setting their comments to read only.
** Quickest way is directly in db: update node set comment = '1' where comment = '2';
** Some are hard to remove, like the og "Login/Register to post"
HTTrack Website Copier
* Only for windows
* Set Options - Spidering to "no robots.txt" to get css and js out of themes and modules
* Set Options - Scan Rules
** Skip big files and move them over by hand. ex: -*.mp3
** Skip login/register links (they are a pain b/c of ?destination query), -*user/register* -*user/login*
** Anything else dynamic. ex: -*feed
HTTrack by default will pull down copies of assets on other websites that you link to, which is nice. So, if you are archiving example.com, after the run you will have this directory structure:
* example
** example.com
** other1.com
** other2.com
** hts-cache
Go ahead and move the other websites under example.com, but leave hts-cache where it is. Then upload example.com up to your webserver, where the Drupal site lives.
Now, assuming you are using Apache, change the DocumentRoot from your old Drupal site, to the newly uploaded archive directory. You could just stop here, but all the links and search engine results out there will stop working, since example.com/news has been replaced with example.com/news.html. So, lets add some rewrite rules:
RewriteEngine on
# If we are accessing root, redirect to index.html
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ /index.html [L]
# If we are accessing a page without a "." in it, append .html to the end.
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*)$ $1.htmlRule two is a little crude, and won't work in all situations, but has worked fine for the sites I have done so far.
Restart Apache, and you should have a nifty, new, unhackable, no-maintenance-needed copy of your old Drupal site.
nice write-up
another way of accomplishing this would be using the boost module: http://drupal.org/project/boost
in a nutshell, it'll turn your site into static html
I was thinking about using
I was thinking about using boost, but I assumed you would still need to leave Drupal running behind it. Does it have a "render entire site" feature?
Boost
It has an external crawler that can hit every page; which I hope to integrate very soon. Also boost allows you to cache ajax responses, so it could even look like a server is there when in fact it's not! Once it's cached keep the images and the cache dir. There are 2 other alt's to this as well
http://drupal.org/project/html_export
http://drupal.org/project/savetoftp