- Don't copy files into current document root
- Let existing requests finish on old code
- New requests start on new code
- Avoid clearing your opcode cache
- Minimal impact on production traffic
- two
DOCUMENT_ROOTdirectories: A & B - symlink
DOCUMENT_ROOTtoggles between them - use
realpath()symlink at the web server level - set
DOCUMENT_ROOTto symlinked realpath - never hardcode
DOCUMENT_ROOTin code
- Apache: http://github.com/etsy/mod_realdoc
- nginx:
fastcgi_param DOCUMENT_ROOT $realpath_root - Hacky PHP: https://github.com/etsy/incpath