What are the requirements for installing Laravel?
To install and run Laravel 12 properly, your environment should meet the following updated requirements (2026 standards):
1. PHP Version
PHP 8.2 or higher is required. For 2026 and future-proof setups, PHP 8.4+ is highly recommended.
Required PHP extensions:
- Core: Ctype, cURL, DOM, Fileinfo, Filter, Hash, Mbstring, OpenSSL, PCRE, PDO, Session, Tokenizer, XML
- Math/Security: BCMath or GMP
- Image Processing (optional): GD or Imagick
2. Composer
Composer 2.x (latest) is required to manage Laravel and its dependencies. Composer helps install Laravel packages and ensures reproducible setups across environments.
3. Database
Laravel supports multiple database systems:
- SQLite (default for quick setup)
- MySQL / MariaDB
- PostgreSQL
- SQL Server
Ensure the database driver and corresponding PHP PDO extension are installed.
4. Node.js & NPM (Optional but Recommended)
- Node.js 20+
- npm 9+
Required if you want to use Vite for frontend compilation, Tailwind CSS, React, or Vue components in Laravel 12.
5. Web Server
- Built-in PHP server for development (
php artisan serve) - Apache or Nginx for production deployments
6. Operating System
Laravel can be installed on Windows, Linux, or macOS. On Windows, ensure environment variables are set properly, especially for Composer global bin if you want to use laravel new.
7. Optional Tools
- Redis (for caching and queues)
- Memcached (alternative cache store)
- Supervisor (Linux, for queue workers)
- Git (for version control)
Quick Environment Check
After installing PHP and Composer, verify your setup:
- Check PHP version:
php -v - Check Composer version:
composer -V
Create a Laravel project to ensure everything is working:
composer create-project laravel/laravel my-project- If it runs successfully, your environment is ready for Laravel 12.
Related Answers
Still need help?
Talk to our Laravel experts
We've handled GDPR/CCPA compliance for dozens of EU & US Laravel.
