Laravel Multi-Version Deployment via Symlink Switching Without Server Restarts
A deployment architecture for Laravel 11/12 applications has been detailed that allows live code version switching without restarting Apache or transferring large vendor directories. The setup splits each application into a private core directory above the web root and a minimal public-facing web entry point, connected by a PHP orchestrator that manages three symlinks. Multiple full application copies, such as 'private' and 'private2', can coexist on the same server, with the active version controlled by changing a single constant in one file. A deployment script automates the process by filtering source files, relocating Vite-compiled assets, injecting environment-specific configurations, and packaging everything into timestamped archives for transfer. This topology is designed for teams managing multiple in-flight branches on shared or semi-managed hosting environments where full root access is unavailable.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in