[documentation] [Documentation task] Proposal: "HOWTO: Make changes
to the code without disrupting a live site"
njivy
drupal-docs at drupal.org
Fri Apr 28 22:07:44 UTC 2006
Issue status update for
http://drupal.org/node/60911
Post a follow up:
http://drupal.org/project/comments/add/60911
Project: Documentation
Version: <none>
Component: Installation
Category: tasks
Priority: normal
Assigned to: njivy
Reported by: njivy
Updated by: njivy
Status: active
Step 2 is similar to what I have in mind: in both cases, Drupal is
installed in a subdirectory and can be accessed as a subdirectory. And
symlinks are involved in both cases. But I expect the methods diverge
from that point.
I like your naming scheme, though. How would you name this method?
Here's a rough sketch of the method I've been using:
* Install Drupal into a subdirectory, ./drupal-1. (Subsequent code
bases can be installed into ./drupal-2, ./drupal-3, etc.)
* Make a symlink to the active Drupal subdirectory, ./drupal-active ->
./drupal-1.
* Edit $base_url in settings.php to include the subdirectory,
http://www.example.com/drupal-1.
* Edit the RewriteBase in .htaccess in the subdirectory.
* Edit .htaccess in the parent directory so that it internally
redirects to the active Drupal subdirectory, ./drupal-active. The
address in the visitor's browser never changes.
* Add a line to the index.php in each subdirectory to reset $base_path.
This makes all rendered links point back to the parent directory, which
is what the visitor expects.
There is a catch: If two Drupal installs are active at once (e.g.
under A/B testing conditions), the page cache keys will be the same
since this method mangles the $base_path. Two small tweaks to page
caching functions work around this problem. But the method would be
more palatable without the tweaks.
So with the following directory structure (and some other preparation),
the Drupal installed in ./drupal-1 looks to the visitor like it is
installed in the parent directory.
parent-directory/
parent-directory/drupal-0/
parent-directory/drupal-1/
parent-directory/drupal-2/
parent-directory/drupal-active -> ./drupal-1
Would you like me to continue sketching the method here for you to
document?
njivy
Previous comments:
------------------------------------------------------------------------
Fri, 28 Apr 2006 19:49:20 +0000 : njivy
* *Objective*: Explain how to make changes to the code without
disrupting activity on a live Drupal site
* *Audience*: Site administrators with command-line access and skill
* *Topics covered*:
* Create a special .htaccess file
* Partition the directory for different instances of Drupal
* Edit Drupal in a couple places to accommodate the partitioning
* Use symlinks to tie it all together
* *Topics not covered*:
* How to use the command line
* Install Drupal from CVS or tarball
* Duplicate the database
* Accommodate environments without mod_rewrite
* Accommodate environments without symlinks
* *Other future related documentation*:
* HOWTO: Update the code base of a live site with no down time (less
than a second, actually)
* HOWTO: Test code and theme changes randomly (i.e. perform A/B
testing)
* *Questions*:
* Does someone else have experience in these topics? I'd like to chat
with them and compare notes.
* Where can I maintain the documentation until it's ready and accepted?
Is a Writeboard [1] okay?
[1] http://writeboard.com/
------------------------------------------------------------------------
Fri, 28 Apr 2006 20:55:52 +0000 : SpzToid
Please refer to step two in this page: (http://drupal.org/node/26434).
Is this what you had in mind?
Please note I removed this step 2 from the options I otherwise
detailed, in the 'multiple sites' version of this document (scroll to
the bottom): http://drupal.org/node/47163
If you would like me add/clarify this to the mulitple-sites docs
(linked 2nd, this message), tell me so, be patient, and I'll get it
done. I'll do it, but I struggle getting my head 'round with this
RewriteBase stuff, so please be patient. In the meantime, maybe the
first link in this message will help you.
More information about the documentation
mailing list