PHPackages                             nazmulcreator/laravel-web-installer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nazmulcreator/laravel-web-installer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nazmulcreator/laravel-web-installer
===================================

Web‑based step‑by‑step installer for Laravel applications (shared‑hosting / VPS).

v1.0.2(1mo ago)02MITPHPPHP ^8.2

Since May 5Pushed 1mo agoCompare

[ Source](https://github.com/bdnahid55/nazmulcreator-laravel-web-installer)[ Packagist](https://packagist.org/packages/nazmulcreator/laravel-web-installer)[ RSS](/packages/nazmulcreator-laravel-web-installer/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel Web Installer
=====================

[](#laravel-web-installer)

A production-ready, web-based step-by-step installer for Laravel applications designed for shared hosting and VPS environments. No CLI required—everything runs from the browser.

Features
--------

[](#features)

- ✅ **Web-based wizard** – No SSH/CLI access needed (perfect for shared hosting)
- ✅ **Server requirements check** – Validates PHP version and required extensions
- ✅ **Database configuration** – Test connection, write to `.env` directly
- ✅ **Auto-migration** – Run migrations on finalization
- ✅ **Auto key generation** – Generate application key automatically
- ✅ **Clean &amp; simple UI** – Responsive design works on any device
- ✅ **Publishable assets** – Customize styling and config per project
- ✅ **Laravel 11/12+ compatible** – Works with current and future Laravel versions
- ✅ **No external dependencies** – Uses only Laravel core facades

Installation
------------

[](#installation)

### 1. Require the package via Composer

[](#1-require-the-package-via-composer)

```
composer require nazmulcreator/laravel-web-installer
```

### 2. Publish assets &amp; config (optional, but recommended)

[](#2-publish-assets--config-optional-but-recommended)

```
php artisan vendor:publish --tag=installer-config
php artisan vendor:publish --tag=installer-assets
```

This allows you to customize the installer configuration and styling per project.

Usage
-----

[](#usage)

### Quick Start

[](#quick-start)

After installation, navigate to your application URL:

```
https://your-domain.com/install

```

The installer will guide you through:

1. **Welcome screen** – Introduction to the wizard
2. **Requirements check** – Verify PHP version and extensions
3. **Database setup** – Enter MySQL credentials and test connection
4. **Finalization** – Run migrations, generate key, clear cache

### Step-by-Step Walkthrough

[](#step-by-step-walkthrough)

#### Step 1: Welcome

[](#step-1-welcome)

- User reads intro information
- Clicks "Start Installation" to proceed

#### Step 2: Server Requirements

[](#step-2-server-requirements)

- Displays PHP version and extension status
- Shows checkmarks (✔) for present extensions
- Shows crosses (✖) for missing extensions
- Disables "Next" button if PHP &lt; 8.2

#### Step 3: Database Configuration

[](#step-3-database-configuration)

- User enters MySQL host, port, database, username, password
- System validates connection
- Credentials are written to `.env` file automatically
- If connection fails, error message appears with retry option

#### Step 4: Installation Complete

[](#step-4-installation-complete)

- Migrations run automatically
- Application key is generated
- Cache is cleared
- User sees success page

Configuration
-------------

[](#configuration)

The installer uses a configuration file at `config/installer.php`:

```
return [
    'steps' => [
        'welcome',
        'requirements',
        'database',
        'finish',
    ],
    'temp_connection' => 'installer',
];
```

### Customization Options

[](#customization-options)

- **Change the route prefix** – Rename installer URL:

    ```
    // In config/installer.php or via environment:
    'route_prefix' => 'setup',  // Now accessible at /setup
    ```
- **Add custom steps** – Extend the controller and add routes:

    1. Create a new controller method
    2. Add a route in `routes/web.php`
    3. Add the step name to `config/installer.php`
- **Customize styling** – Edit the published CSS:

    ```
    php artisan vendor:publish --tag=installer-assets --force
    # Edit: public/vendor/laravel-web-installer/installer.css
    ```
- **Customize views** – Publish and edit Blade templates:

    ```
    # Manually copy views from vendor to resources/views/vendor/installer
    # Then customize as needed
    ```

Security Considerations
-----------------------

[](#security-considerations)

### After Installation

[](#after-installation)

**Important:** Remove or disable the installer after successful setup:

#### Option 1: Change the route prefix

[](#option-1-change-the-route-prefix)

Edit `config/installer.php`:

```
'route_prefix' => 'very-secret-path-12345',
```

#### Option 2: Remove the package entirely

[](#option-2-remove-the-package-entirely)

```
composer remove nazmulcreator/laravel-web-installer
```

#### Option 3: Disable via middleware

[](#option-3-disable-via-middleware)

Add authentication or IP whitelist middleware to installer routes.

### Environment Protection

[](#environment-protection)

- The `.env` file is written directly (not committed to version control)
- Database credentials are only stored in `.env` (not in database)
- Session-based progress tracking (volatile on shared hosting)
- CSRF token protection on all forms

File Structure
--------------

[](#file-structure)

```
laravel-web-installer/
├── composer.json
├── src/
│  ├── LaravelWebInstallerServiceProvider.php
│  ├── Http/
│  │  ├── Controllers/
│  │  │  ├── InstallController.php
│  │  │  └── FinalizeController.php
│  │  └── Requests/
│  │     └── DatabaseSetupRequest.php
│  ├── Models/
│  │  └── Installation.php
│  └── Resources/
│     ├── views/
│     │  ├── layout.blade.php
│     │  ├── welcome.blade.php
│     │  ├── requirements.blade.php
│     │  ├── database.blade.php
│     │  └── finish.blade.php
│     └── assets/
│        └── installer.css
├── routes/
│  └── web.php
├── config/
│  └── installer.php
└── tests/
   └── Feature/InstallTest.php

```

API Reference
-------------

[](#api-reference)

### Routes

[](#routes)

RouteMethodNameDescription`/install`GET`installer.welcome`Welcome page`/install/requirements`GET`installer.requirements`Requirements check`/install/database`GET`installer.database`Database form`/install/database`POST`installer.database.post`Process DB credentials`/install/finish`POST`installer.finish`Finalize installation### Controllers

[](#controllers)

#### InstallController

[](#installcontroller)

- `showWelcome()` – Display welcome view
- `showRequirements()` – Verify PHP/extensions and display results
- `showDatabase()` – Show database setup form
- `processDatabase(DatabaseSetupRequest $request)` – Validate and save DB credentials

#### FinalizeController

[](#finalizecontroller)

- `__invoke(Request $request)` – Run migrations, key generation, cache clear

### Form Request

[](#form-request)

#### DatabaseSetupRequest

[](#databasesetuprequest)

Validates:

- `host` – Required string
- `port` – Required numeric
- `database` – Required string
- `username` – Required string
- `password` – Nullable string

Testing
-------

[](#testing)

Run the feature tests:

```
php artisan test tests/Feature/InstallTest.php
```

### Test Coverage

[](#test-coverage)

- `installer_shows_welcome_page()` – Verifies welcome route returns 200
- `it_validates_database_form()` – Verifies form validation works

Troubleshooting
---------------

[](#troubleshooting)

### "Database not configured yet" error

[](#database-not-configured-yet-error)

- Ensure you completed the database setup step
- Check session is enabled (web middleware)
- Verify cookies are allowed in browser

### ".env file not found" error

[](#env-file-not-found-error)

- Ensure `.env.example` exists in project root
- Or manually create an empty `.env` file

### "Connection failed" on database step

[](#connection-failed-on-database-step)

- Verify MySQL credentials are correct
- Check MySQL service is running
- Ensure host/port are accessible from server
- Verify username has necessary permissions

### Requirements page says extensions missing

[](#requirements-page-says-extensions-missing)

- Install missing PHP extensions via your hosting control panel
- Or contact your hosting provider
- Restart PHP-FPM/Apache after installation

How It Works
------------

[](#how-it-works)

### No CLI Required

[](#no-cli-required)

Instead of using Artisan commands via CLI:

```
# Traditional (requires SSH)
php artisan migrate
php artisan key:generate
php artisan cache:clear
```

The installer runs Artisan directly from PHP:

```
Artisan::call('migrate', ['--force' => true]);
Artisan::call('key:generate', ['--force' => true]);
Artisan::call('cache:clear');
```

### .env File Writing

[](#env-file-writing)

The installer modifies `.env` directly without CLI:

```
// Reads current .env
$content = file_get_contents($envPath);

// Updates or appends values
foreach ($values as $key => $val) {
    $pattern = "/^{$key}=.*$/m";
    if (preg_match($pattern, $content)) {
        $content = preg_replace($pattern, "{$key}={$val}", $content);
    } else {
        $content .= PHP_EOL . "{$key}={$val}";
    }
}

// Writes updated .env
file_put_contents($envPath, $content);
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please:

1. Fork the repository
2. Create a feature branch
3. Submit a pull request

License
-------

[](#license)

MIT License. See LICENSE file for details.

Support
-------

[](#support)

For issues, questions, or suggestions:

- Open an issue on GitHub
- Check existing documentation above
- Review the source code comments

Author
------

[](#author)

**Nazmul Hossain**

- Email:

---

**Enjoy hassle-free Laravel deployments on shared hosting!** 🚀

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance93

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

35d ago

PHP version history (2 changes)v1.0.0PHP ^8.3

v1.0.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e79d6b39fe5fde0acbf459730233e6137ffcc9f7196c78a5271b7309e4413eb4?d=identicon)[bdnahid55](/maintainers/bdnahid55)

---

Top Contributors

[![bdnahid55](https://avatars.githubusercontent.com/u/10655598?v=4)](https://github.com/bdnahid55 "bdnahid55 (4 commits)")

### Embed Badge

![Health badge](/badges/nazmulcreator-laravel-web-installer/health.svg)

```
[![Health](https://phpackages.com/badges/nazmulcreator-laravel-web-installer/health.svg)](https://phpackages.com/packages/nazmulcreator-laravel-web-installer)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M264](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10533.5M984](/packages/illuminate-pagination)[illuminate/redis

The Illuminate Redis package.

8314.4M356](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
