{"id":2136,"date":"2025-04-11T07:12:00","date_gmt":"2025-04-11T07:12:00","guid":{"rendered":"https:\/\/www.devopsconsulting.in\/blog\/?p=2136"},"modified":"2025-04-11T07:12:03","modified_gmt":"2025-04-11T07:12:03","slug":"zero-downtime-deployment-for-laravel-using-php-deployer","status":"publish","type":"post","link":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/","title":{"rendered":"Zero Downtime Deployment for Laravel Using PHP Deployer"},"content":{"rendered":"\n<p>here&#8217;s a <strong> beginner-friendly version<\/strong> of the guide you shared on <strong>Zero Downtime Deployment using PHP Deployer for Laravel projects<\/strong>. It\u2019s written to help learners easily understand and follow the process without feeling overwhelmed:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\ud83d\ude80<strong> Zero Downtime Deployment for Laravel Using PHP Deployer \u2013 A Beginner\u2019s Guide<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"585\" height=\"892\" src=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-6.png\" alt=\"\" class=\"wp-image-2137\" srcset=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-6.png 585w, https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-6-197x300.png 197w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 What is Zero Downtime Deployment?<\/h2>\n\n\n\n<p>Imagine updating your website without any interruptions \u2014 users stay online, no glitches, no downtime. That\u2019s <strong>zero downtime deployment<\/strong>.<\/p>\n\n\n\n<p>It means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your users won&#8217;t notice when you&#8217;re deploying updates.<\/li>\n\n\n\n<li>Your website or app stays <strong>online all the time<\/strong>, even while new code is being uploaded.<\/li>\n<\/ul>\n\n\n\n<p>This is usually done through <strong>smart strategies<\/strong> like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Blue-Green Deployments<\/strong><\/li>\n\n\n\n<li><strong>Canary Releases<\/strong><\/li>\n\n\n\n<li><strong>Rolling Updates<\/strong><\/li>\n<\/ul>\n\n\n\n<p>These techniques help push updates slowly, keeping the old version alive until the new one is ready and stable.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udca1 Why It\u2019s Easier with PHP<\/h2>\n\n\n\n<p>PHP is an <strong>interpreted language<\/strong>, which means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No need to compile.<\/li>\n\n\n\n<li>You can <strong>switch between code versions<\/strong> using tricks like <em>symlinks<\/em> (symbolic links) without restarting the whole server.<\/li>\n<\/ul>\n\n\n\n<p>But, for a proper professional deployment, you still need to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run database migrations<\/li>\n\n\n\n<li>Clear caches<\/li>\n\n\n\n<li>Build frontend assets<\/li>\n\n\n\n<li>Restart services (if needed)<\/li>\n<\/ul>\n\n\n\n<p>To help with all that, let\u2019s meet the hero of this guide: <strong>PHP Deployer<\/strong>!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddf0 What is PHP Deployer?<\/h2>\n\n\n\n<p><strong>PHP Deployer<\/strong> (also called just &#8220;Deployer&#8221;) is a tool to <strong>automate the deployment<\/strong> of PHP apps.<\/p>\n\n\n\n<p>With Deployer, you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Deploy to one or more servers<\/li>\n\n\n\n<li>Run tasks like building assets or migrating databases<\/li>\n\n\n\n<li>Manage releases easily<\/li>\n<\/ul>\n\n\n\n<p>It even comes with <strong>built-in support (recipes)<\/strong> for popular frameworks \u2014 like Laravel!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udee0\ufe0f Step-by-Step: Zero Downtime Deployment for Laravel<\/h2>\n\n\n\n<p>Let\u2019s get started.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Install PHP Deployer<\/h3>\n\n\n\n<p>In your Laravel project, open a terminal and run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer require --dev deployer\/deployer\n<\/code><\/pre>\n\n\n\n<p>This installs Deployer as a development tool in your project.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Initialize Deployer<\/h3>\n\n\n\n<p>Now run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vendor\/bin\/dep init\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"397\" src=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-7.png\" alt=\"\" class=\"wp-image-2138\" srcset=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-7.png 503w, https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-7-300x237.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/figure>\n\n\n\n<p>This sets up Deployer in your Laravel app.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Answer Setup Questions<\/h3>\n\n\n\n<p>During setup, Deployer will ask:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>File format<\/strong> \u2013 Just press Enter to choose the default (<code>PHP<\/code>).<\/li>\n\n\n\n<li><strong>Choose a recipe<\/strong> \u2013 Select <code>Laravel<\/code>.<\/li>\n\n\n\n<li><strong>Enter Git repo URL<\/strong> \u2013 Paste your GitHub or GitLab project URL.<\/li>\n\n\n\n<li><strong>Project name<\/strong> \u2013 Name your project anything you like.<\/li>\n\n\n\n<li><strong>Host IP\/Domain<\/strong> \u2013 Enter your server IP or hostname.<\/li>\n\n\n\n<li><strong>Confirm setup<\/strong> \u2013 Hit Enter.<\/li>\n<\/ol>\n\n\n\n<p>After this, a file named <code>deploy.php<\/code> will be created in your project.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Update <code>deploy.php<\/code><\/h3>\n\n\n\n<p>Your <code>deploy.php<\/code> will look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nnamespace Deployer;\n\nrequire 'recipe\/laravel.php';\n\nset('repository', 'https:\/\/github.com\/your-repo.git');\n\nhost('your.server.ip')\n    -&gt;set('remote_user', 'your-ssh-user')\n    -&gt;set('deploy_path', '~\/your-project-path');\n\nafter('deploy:failed', 'deploy:unlock');\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace the repository URL, user, and path with your actual info.<\/li>\n\n\n\n<li>This tells Deployer how to connect to your server and where to deploy the code.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: If You\u2019re Using Vite (for Laravel Mix)<\/h3>\n\n\n\n<p>Laravel uses <strong>Vite<\/strong> for frontend asset building. So, add this to your <code>deploy.php<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>desc('Install &amp; build npm packages');\n\ntask('npm:build', function () {\n    run('cd {{release_path}} &amp;&amp; npm ci &amp;&amp; npm run build');\n});\n\nafter('artisan:migrate', 'npm:build');\n<\/code><\/pre>\n\n\n\n<p>This ensures your JS\/CSS files get built <strong>after the migration step<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Add Server\u2019s SSH Key to Git<\/h3>\n\n\n\n<p>Your server needs permission to pull your code from Git.<\/p>\n\n\n\n<p>To do that:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>SSH into your server<\/strong><\/li>\n\n\n\n<li>Run this to view the public key:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>cat ~\/.ssh\/id_rsa.pub\n<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Copy the output.<\/li>\n\n\n\n<li>Go to your Git repo \u2192 <strong>Settings<\/strong> \u2192 <strong>SSH and GPG Keys<\/strong><\/li>\n\n\n\n<li>Click <strong>\u201cNew SSH Key\u201d<\/strong>, paste the copied key, and save.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"321\" height=\"650\" src=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-8.png\" alt=\"\" class=\"wp-image-2139\" srcset=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-8.png 321w, https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-8-148x300.png 148w\" sizes=\"auto, (max-width: 321px) 100vw, 321px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"305\" height=\"521\" src=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-9.png\" alt=\"\" class=\"wp-image-2140\" srcset=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-9.png 305w, https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-9-176x300.png 176w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"795\" height=\"416\" src=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-10.png\" alt=\"\" class=\"wp-image-2141\" srcset=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-10.png 795w, https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-10-300x157.png 300w, https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-10-768x402.png 768w\" sizes=\"auto, (max-width: 795px) 100vw, 795px\" \/><\/figure>\n\n\n\n<p>Now your server can pull your code securely.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Deploy Your Laravel App<\/h3>\n\n\n\n<p>Back in your project folder on your local machine, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vendor\/bin\/dep deploy\n<\/code><\/pre>\n\n\n\n<p>During the first deployment, you might see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Warning: Your .env file is empty! Skipping...\n<\/code><\/pre>\n\n\n\n<p>No worries! We\u2019ll fix that next.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Set Up the <code>.env<\/code> File on the Server<\/h3>\n\n\n\n<p>You only need to do this once:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>SSH into your server:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>vendor\/bin\/dep ssh\n<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Copy the example <code>.env<\/code> file to the shared folder:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>cp .env.example ..\/..\/shared\/.env\n<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Open it and edit values as needed:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>nano ..\/..\/shared\/.env\n<\/code><\/pre>\n\n\n\n<p>Make sure <code>APP_ENV=production<\/code><\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>If needed, generate a new key:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>php artisan key:generate\n<\/code><\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Exit the SSH session:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>exit\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 9: Deploy Again<\/h3>\n\n\n\n<p>Now that your <code>.env<\/code> is set, run the deploy again:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vendor\/bin\/dep deploy\n<\/code><\/pre>\n\n\n\n<p>\ud83c\udf89 That\u2019s it! Your Laravel project is now deployed with <strong>zero downtime<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd01 How It Works Behind the Scenes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Every time you deploy, Deployer <strong>creates a new folder<\/strong> (<code>release<\/code>) for that version.<\/li>\n\n\n\n<li>Then, it <strong>symlinks<\/strong> that folder to the <code>current<\/code> directory.<\/li>\n\n\n\n<li>Your web server always points to <code>current<\/code>, so switching versions is smooth and instant.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 Benefits of This Approach<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No downtime.<\/li>\n\n\n\n<li>Easy rollbacks.<\/li>\n\n\n\n<li>Smooth experience for users.<\/li>\n\n\n\n<li>Cleaner deployment workflow for developers.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf89 Final Thoughts<\/h2>\n\n\n\n<p>Zero downtime deployment sounds fancy, but with tools like PHP Deployer, it&#8217;s easy and powerful.<\/p>\n\n\n\n<p>Just install it, set up your deploy config, connect your server, and you&#8217;re good to go. This is one of the best ways to <strong>scale your Laravel apps professionally<\/strong> and deliver updates <strong>without annoying your users<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>here&#8217;s a beginner-friendly version of the guide you shared on Zero Downtime Deployment using PHP Deployer for Laravel projects. It\u2019s written to help learners easily understand and&#8230; <\/p>\n","protected":false},"author":2,"featured_media":2142,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1330,1333,1331,1332,1329,1327,1328,1334],"class_list":["post-2136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-automated-deployment","tag-ci-cd-for-php","tag-github-integration","tag-laravel-environment-setup","tag-laravel-vite-build","tag-php-deployer","tag-ssh-deployment","tag-symlink-deployment"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Zero Downtime Deployment for Laravel Using PHP Deployer - DevOps Consulting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Zero Downtime Deployment for Laravel Using PHP Deployer - DevOps Consulting\" \/>\n<meta property=\"og:description\" content=\"here&#8217;s a beginner-friendly version of the guide you shared on Zero Downtime Deployment using PHP Deployer for Laravel projects. It\u2019s written to help learners easily understand and...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/\" \/>\n<meta property=\"og:site_name\" content=\"DevOps Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-11T07:12:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-11T07:12:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-11.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1306\" \/>\n\t<meta property=\"og:image:height\" content=\"887\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/\"},\"author\":{\"name\":\"Abhishek Singh\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#\\\/schema\\\/person\\\/fc397ba8be42f9fdd53450edfc73006f\"},\"headline\":\"Zero Downtime Deployment for Laravel Using PHP Deployer\",\"datePublished\":\"2025-04-11T07:12:00+00:00\",\"dateModified\":\"2025-04-11T07:12:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/\"},\"wordCount\":714,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/image-11.png\",\"keywords\":[\"Automated Deployment\",\"CI\\\/CD for PHP\",\"GitHub Integration\",\"Laravel Environment Setup\",\"Laravel Vite Build\",\"PHP Deployer\",\"SSH Deployment\",\"Symlink Deployment\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/\",\"name\":\"Zero Downtime Deployment for Laravel Using PHP Deployer - DevOps Consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/image-11.png\",\"datePublished\":\"2025-04-11T07:12:00+00:00\",\"dateModified\":\"2025-04-11T07:12:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#\\\/schema\\\/person\\\/fc397ba8be42f9fdd53450edfc73006f\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/zero-downtime-deployment-for-laravel-using-php-deployer\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/image-11.png\",\"contentUrl\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/image-11.png\",\"width\":1306,\"height\":887},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/\",\"name\":\"DevOps Consulting\",\"description\":\"DevOps Consulting | SRE Consulting | DevSecOps Consulting | MLOps Consulting\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/#\\\/schema\\\/person\\\/fc397ba8be42f9fdd53450edfc73006f\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"I\u2019m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I\u2019ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains: \u2022 DevOps School \u2013 Tech blogs and tutorials \u2022 Holiday Landmark \u2013 Travel stories and guides \u2022 Stocks Mantra \u2013 Stock market strategies and tips \u2022 My Medic Plus \u2013 Health and fitness guidance \u2022 TrueReviewNow \u2013 Honest product reviews \u2022 Wizbrand \u2013 SEO and digital tools for businesses I\u2019m also exploring the fascinating world of Quantum Computing.\",\"url\":\"https:\\\/\\\/www.devopsconsulting.in\\\/blog\\\/author\\\/abhishek\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Zero Downtime Deployment for Laravel Using PHP Deployer - DevOps Consulting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/","og_locale":"en_US","og_type":"article","og_title":"Zero Downtime Deployment for Laravel Using PHP Deployer - DevOps Consulting","og_description":"here&#8217;s a beginner-friendly version of the guide you shared on Zero Downtime Deployment using PHP Deployer for Laravel projects. It\u2019s written to help learners easily understand and...","og_url":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/","og_site_name":"DevOps Consulting","article_published_time":"2025-04-11T07:12:00+00:00","article_modified_time":"2025-04-11T07:12:03+00:00","og_image":[{"width":1306,"height":887,"url":"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-11.png","type":"image\/png"}],"author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/#article","isPartOf":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/"},"author":{"name":"Abhishek Singh","@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f"},"headline":"Zero Downtime Deployment for Laravel Using PHP Deployer","datePublished":"2025-04-11T07:12:00+00:00","dateModified":"2025-04-11T07:12:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/"},"wordCount":714,"commentCount":0,"image":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/#primaryimage"},"thumbnailUrl":"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-11.png","keywords":["Automated Deployment","CI\/CD for PHP","GitHub Integration","Laravel Environment Setup","Laravel Vite Build","PHP Deployer","SSH Deployment","Symlink Deployment"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/","url":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/","name":"Zero Downtime Deployment for Laravel Using PHP Deployer - DevOps Consulting","isPartOf":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/#primaryimage"},"image":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/#primaryimage"},"thumbnailUrl":"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-11.png","datePublished":"2025-04-11T07:12:00+00:00","dateModified":"2025-04-11T07:12:03+00:00","author":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.devopsconsulting.in\/blog\/zero-downtime-deployment-for-laravel-using-php-deployer\/#primaryimage","url":"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-11.png","contentUrl":"https:\/\/www.devopsconsulting.in\/blog\/wp-content\/uploads\/2025\/04\/image-11.png","width":1306,"height":887},{"@type":"WebSite","@id":"https:\/\/www.devopsconsulting.in\/blog\/#website","url":"https:\/\/www.devopsconsulting.in\/blog\/","name":"DevOps Consulting","description":"DevOps Consulting | SRE Consulting | DevSecOps Consulting | MLOps Consulting","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.devopsconsulting.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","caption":"Abhishek Singh"},"description":"I\u2019m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I\u2019ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains: \u2022 DevOps School \u2013 Tech blogs and tutorials \u2022 Holiday Landmark \u2013 Travel stories and guides \u2022 Stocks Mantra \u2013 Stock market strategies and tips \u2022 My Medic Plus \u2013 Health and fitness guidance \u2022 TrueReviewNow \u2013 Honest product reviews \u2022 Wizbrand \u2013 SEO and digital tools for businesses I\u2019m also exploring the fascinating world of Quantum Computing.","url":"https:\/\/www.devopsconsulting.in\/blog\/author\/abhishek\/"}]}},"_links":{"self":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/2136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/comments?post=2136"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/2136\/revisions"}],"predecessor-version":[{"id":2145,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/2136\/revisions\/2145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/media\/2142"}],"wp:attachment":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/media?parent=2136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/categories?post=2136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/tags?post=2136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}