Introduction
Laravel is one of the most popular PHP frameworks, widely known for its elegance and simplicity. However, one major challenge remains: setting up a fresh Laravel application for non-developers. Typically, Laravel requires command-line interactions to configure the environment, set up the database, and prepare the application for first-time use. For a developer, this is straightforward, but for a client or end-user, it can be quite complicated.
Imagine handing off a Laravel application to a client and having them run commands like:
cp .env.example .env
php artisan key:generate
php artisan migrate --force
php artisan db:seed --force
While these steps are essential, they are not user-friendly for someone who is not familiar with CLI commands. This gap inspired the creation of Laravel Deploy Wizard.
The Problem
When deploying a WordPress application, it is as simple as uploading files to a server and accessing a URL. A clean, interactive installation wizard guides the user through the steps to set up the application. Laravel, on the other hand, lacks this level of simplicity. The absence of a user-friendly installer means that every deployment typically requires a developer to:
- Copy and configure the
.env
file - Run migrations to create database tables
- Generate the application key
- Seed the database with default values
This dependency on CLI commands prevents clients from independently deploying their own applications, adding additional workload for developers and frustration for non-technical users.
The Solution: Laravel Deploy Wizard
Laravel Deploy Wizard is an interactive, step-by-step installation wizard for Laravel applications. Inspired by WordPress’s famous installer, it allows developers and clients to:
- Configure the application name, URL, and environment settings
- Set localization options
- Connect to the database and validate connection
- Automatically generate
.env
if not present - Run migrations and seeders without CLI intervention
It is built to be as intuitive as possible, requiring no command-line interaction for setup. Just access the installation route, and the wizard will take care of the rest.
http://yourdomain.com/deploy-wizard
If the .env
file is missing, the wizard triggers automatically—no manual intervention needed!
How It Works
📦 Installation
You can install the package via Composer:
composer require bijanbiria/laravel-deploy-wizard
🔧 Configuration
After installation, you may publish the configuration file to customize the route and final commands:
php artisan vendor:publish --tag=deploy-wizard-config
The configuration file will be published at: config/deploywizard.php
Default Configuration:
return [
'route' => 'deploy-wizard', // Route for accessing the wizard
'complete_route' => 'home', // Route to redirect after installation
'final_commands' => [
'php artisan route:cache', // Cache application routes
'php artisan migrate --force', // Run migrations
],
];
🗂️ Publishing Views
If you want to customize the look and feel of the installer, you can publish the views:
php artisan vendor:publish --tag=deploy-wizard-views
The views will be published to: resources/views/vendor/deploy-wizard
You can edit these Blade files to match your UI design.
🛠️ Usage
After installation, you can simply visit the route:
http://yourdomain.com/deploy-wizard
💡 Note: You don’t even need to manually visit this page! If the .env
file is missing and you try to access any route in your application, the wizard will automatically launch and redirect you to the deployment page to complete the setup.
If the .env
file does not exist, it will be created automatically from .env.example
. If APP_KEY
is missing, a new key will be generated, and all migrations and seeders will be executed automatically.
The wizard is structured in 3 main steps:
- Step 1: Application Configuration (App Name, URL, Environment)
- Step 2: Locale Settings (Locale, Fallback Locale, Faker Locale)
- Step 3: Database Configuration (DB Connection, Host, Port, Credentials)
At the end of Step 3, custom Artisan commands defined in the configuration will be executed.
⚙️ Custom Route
You can customize the route in the configuration file:
return [
'route' => 'install-wizard' // Default is 'deploy-wizard'
];
Access it via:
http://yourdomain.com/install-wizard
✨ Final Commands
You can define your own list of Artisan commands to be executed after the installation process. Simply update the final_commands
array in config/deploywizard.php
:
'final_commands' => [
'php artisan storage:link',
'php artisan migrate',
'php artisan db:seed',
'php artisan view:clear'
]
These commands will be executed sequentially once the wizard is complete.
- Step 1: Application Configuration (App Name, URL, Environment)
- Step 2: Locale Settings (Locale, Fallback Locale, Faker Locale)
- Step 3: Database Configuration (DB Connection, Host, Port, Credentials)
- Step 4: Finalizing Setup (Running Migrations, Seeding Data, Caching Routes)
Upon completion, the application is fully configured and ready to use.
Open-Source and Community Driven
Laravel Deploy Wizard is fully open-source, and contributions are highly encouraged. If you have ideas for new features, enhancements, or bug fixes, feel free to submit a Pull Request on our GitHub repository.
We are actively maintaining and improving this package to make Laravel deployment as seamless as possible. Community feedback is not just welcomed; it is crucial to the project’s growth.
Get Involved
You can contribute by:
- Reporting issues
- Suggesting new features
- Submitting pull requests
- Sharing your experience and feedback
Visit our GitHub Repository and join the community.
Tags:
- Laravel Installation
- Laravel Deploy Wizard
- Laravel Installer
- Open Source
- Laravel Setup
- WordPress-like Installer
- Laravel Environment Setup
Conclusion
Laravel Deploy Wizard bridges the gap between developer-friendly and user-friendly application setup. Inspired by WordPress, this package makes deploying a Laravel application as easy as clicking through a few interactive steps. Whether you’re a developer handing off a project to a client, or a non-technical user setting up Laravel for the first time, Laravel Deploy Wizard makes the process effortless and efficient.
We welcome your ideas, contributions, and suggestions to make this project even better.
Let’s make Laravel deployment as easy as WordPress. ✨