In Laravel 12, the php artisan down command puts your application into maintenance mode — displaying a default “503 Service Unavailable” page to visitors. But you can easily customize this page to better match your brand, add useful info, or show a countdown.
Here’s a step-by-step guide to customize the maintenance mode page in Laravel 12:
🚧 What Happens During php artisan down?
When you run:
php artisan down
Laravel:
- Creates a
storage/framework/maintenance.phpfile. - Shows a default 503 “Service Unavailable” page to all users except those whitelisted (via
--secretor IPs). - Prevents all HTTP access until the app is brought back up via:
php artisan up
🎨 How to Customize the “Down for Maintenance” Page
✅ Step 1: Create the Custom View
Laravel looks for a custom maintenance view at:
resources/views/errors/503.blade.php
If this file doesn’t exist, it shows the default view.
✍️ Example: resources/views/errors/503.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>We’re Under Maintenance</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background: #f8fafc;
color: #333;
font-family: 'Arial', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
flex-direction: column;
text-align: center;
}
h1 {
font-size: 48px;
color: #6366f1;
}
p {
font-size: 18px;
}
</style>
</head>
<body>
<h1>🚧 Maintenance in Progress</h1>
<p>We’re currently working on updates.<br>
Please check back in a few minutes.</p>
</body>
</html>
This will replace the default Laravel maintenance page.
🛠️ Optional: Pass Custom Message to the Page
You can pass a message via artisan down:
php artisan down --message="Upgrading database..."
Then in your Blade view, access it like this:
<p>{{ $exception->getMessage() ?: 'We’ll be back soon.' }}</p>
getMessage()contains the value passed to--message.
🔐 Optional: Use --secret to Let Admins Bypass
You can generate a secret token to let certain users access the site during maintenance:
php artisan down --secret="my-secret-code"
Now, visiting:
https://yourdomain.com/my-secret-code
Will let you bypass the maintenance page.
🧪 Test Your Customization
After creating 503.blade.php, run:
php artisan down
Then open your site in the browser — your custom design will be shown!
When you’re ready to go live again:
php artisan up
📁 File Summary
| File | Purpose |
|---|---|
resources/views/errors/503.blade.php | Your custom maintenance mode page |
storage/framework/maintenance.php | Laravel’s internal maintenance trigger |
✅ Summary
To customize the artisan down maintenance page in Laravel 12:
-
Create
resources/views/errors/503.blade.php - Design it with your own HTML/CSS/message
- Use
--messageor--secretoptions as needed - Run
php artisan downto activate it - Run
php artisan upto bring the site back

Leave a Reply