Deployment
An AdminLTE 4 for Laravel app is a normal Laravel application — it runs on any PHP host with public/ as the document root. For production you build the Vite assets, cache config/routes/views, and run with APP_DEBUG=false.
Server requirements
| Component | Requirement |
|---|---|
| PHP | 8.3+ with pdo, mbstring, openssl, ctype, fileinfo, bcmath |
| Composer | 2.x |
| Node.js | 18+ (build step only) |
| Web server | Nginx or Apache → document root must be public/ |
| Database | SQLite for a demo; MySQL/Postgres for heavier use |
1. Build assets
Vite produces the hashed, content-versioned bundle into public/build/. Always run the build on the host (or in CI) before going live:
composer install --optimize-autoloader --no-dev
npm ci
npm run build
2. Run the installer's vendor copy
Make sure the plugin vendor files exist under public/vendor/ — they are emitted at request time by @pluginScripts and are not part of the Vite bundle:
php artisan adminlte:install # copies public/vendor/* (idempotent)
php artisan adminlte:status # confirm config, assets, vendor files
3. Cache & optimise
php artisan key:generate # if APP_KEY is not set
php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan view:cache
Set production-safe environment values:
APP_ENV=production
APP_DEBUG=false
APP_URL=https://admin.example.com
4. Web server
Point the document root at public/ and route everything to index.php. A minimal Nginx + PHP-FPM server block:
server {
listen 443 ssl http2;
server_name admin.example.com;
root /var/www/admin.example.com/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* { deny all; }
}
Managed hosting (Forge / Ploi / RunCloud)
Point the platform at your repo and use this deploy script — it covers build, migrations and caching in one pass:
composer install --optimize-autoloader --no-dev
npm ci && npm run build
php artisan migrate --force
php artisan config:cache && php artisan route:cache && php artisan view:cache
Updating
composer update colorlibhq/adminlte-laravel
npm ci && npm run build
php artisan migrate --force
php artisan config:cache && php artisan route:cache && php artisan view:cache
Disable the bundled showcase routes in production by setting 'demo' => false in config/adminlte.php (and 'docs' => false if you don't want the in-app docs at /docs). Both are guarded by middleware but are unnecessary in a real app.
Deployment checklist
public/is the web root.npm run buildran — the Vite manifest exists inpublic/build/.public/vendor/*plugin files present (adminlte:installcopies them).APP_KEYset,APP_DEBUG=false.config:cache,route:cache,view:cacherun.storage/andbootstrap/cache/writable.