How to Create Custom Laravel Maintenance Page?

Hakan Bayraktar
2 min readMar 17, 2021

--

Create Custom Maintenance Page

In order to change override the default 503 maintenance page, we need to add the following commands into the resources/views/errors/503.blade.php file

<!doctype html>
<html>
<head>
<title>Be right back.</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"><style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato', sans-serif;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">Be right back.</div>
</div>
</div>
</body>
</html>

Enable Default Maintenance Mode

In order to put your application in maintenance mode all that you need to do is to run the following artisan command:

php artisan down
Now you can see the custom maintenance page we created below.

Disable Maintenance Mode

In order to disable the maintenance mode of your website, we use the following artisan command:

php artisan up

--

--