Installation & Setup in PHP

From the Laravel cheat sheet · Setup & Artisan · verified Jul 2026

Installation & Setup

Installing Laravel and initial setup

php
# Install Laravel via Composer
composer create-project laravel/laravel myapp
cd myapp

# Or using Laravel installer
composer global require laravel/installer
laravel new myapp

# Start development server
php artisan serve

# Environment setup
cp .env.example .env
php artisan key:generate

# Database setup
php artisan migrate
php artisan db:seed
💡 Use Laravel installer for quick project setup
⚡ Artisan serve is for development only, use proper web server in production
📌 Always run key:generate for new installations
🔥 Cache config, routes, and views in production for performance

Continue with Laravel

Save the full cheat sheet or work through every related task.

More PHP tasks

Back to the full Laravel cheat sheet