Laravel Deployer Symlink autoload

If you want the latest content to be loaded from the latest symlinked release using PHP Deployer you need to add these lines to your Nginx PHP block

fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;

After doing this you do need to reload Nginx one time. But once done you will never need to reload PHP FPM to see the latest PHP changes due to older symlinked content being loaded still.

Jasper Frumau

Jasper has been working with web frameworks and applications such as Laravel, Magento and his favorite CMS WordPress including Roots Trellis and Sage for more than a decade. He helps customers with web design and online marketing. Services provided are web design, ecommerce, SEO, content marketing. When Jasper is not coding, marketing a website, reading about the web or dreaming the internet of things he plays with his son, travels or run a few blocks.