Create Custom Maintenance Page in Laravel

Hi artisan, in this tutorial, we are going to create our custom maintenance page in Laravel. I’m testing on Laravel 7.x. Let’s get started:

Table of Contents

  1. Create Laravel Project
  2. Maintenance Mode
  3. Custom Design

Create Laravel Project

Run this composer command to create Laravel project. If you already have Laravel project, then you can skip this step.

composer create-project --prefer-dist laravel/laravel laratest

Maintenance Mode

To put website into maintenance mode, we have to run this command:

php artisan down


Application is now in maintenance mode.

To make application up and running again, run this command:

php artisan up


Application is now live.

Custom Design

Laravel displays 503 page as maintenance page. We can easily override the page. Navigate to resources/views folder and create a directory called errors. Under errors folder, create a file named 503.blade.php & paste your design:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Maintenance Mode</title>
<div class="container">
    <div style="margin-top: 50px; text-align: center">
        We will be up in couple of minutes. Thanks for patience.

That’s it. Thanks for reading.