To install Laravel 13, you need PHP 8.3 to 8.5 and Composer. Install the Laravel installer once with Composer, run laravel new example-app, answer the setup questions and start the app with composer run dev. A new Laravel 13 project uses SQLite by default, so you can run it without setting up a database server. This guide covers each step and the errors beginners meet most often.

Targets: Laravel 13, released on 17 March 2026, with support for PHP 8.3 to 8.5 according to the official release notes.

What are the requirements?

  • PHP 8.3, 8.4 or 8.5 with the common extensions Laravel needs (ctype, curl, dom, fileinfo, json, mbstring, openssl, pdo, tokenizer, xml).
  • Composer, the PHP dependency manager.
  • Node.js and npm if you want to build frontend assets with Vite.
  • A terminal and an editor.

Check your versions:

php -v composer -V node -v 

If PHP is older than 8.3, upgrade it first. Tools like Laravel Herd (Windows and macOS) or Laragon (Windows) install PHP and Composer for you.

Step 1: Install the Laravel installer

composer global require laravel/installer 

Make sure Composer's global bin directory is in your PATH, otherwise the laravel command is not found. Run composer global config bin-dir --absolute to see where it is.

Step 2: Create a new project

laravel new example-app 

The installer asks a few questions: whether you want a starter kit (React, Vue, Svelte, Livewire or none), which testing framework to use, and which database. Choose "none" for the starter kit if you want a clean framework, or pick one if you want login and registration ready made.

If you prefer not to install the installer, you can also create a project with Composer directly:

composer create-project laravel/laravel example-app 

Step 3: Run the application

cd example-app composer run dev 

This starts the PHP development server, a queue listener, log output and the Vite dev server together. Open the address printed in the terminal, usually http://localhost:8000, and you should see the Laravel welcome page.

If you only want the web server, run php artisan serve instead.

What database does a new project use?

Laravel 13 uses SQLite by default. The installer creates the SQLite database file and runs the initial migrations, so the app works immediately. To use MySQL or PostgreSQL instead, edit these values in .env and then run migrations:

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=example_app DB_USERNAME=root DB_PASSWORD= 
php artisan migrate 

Create the empty database in MySQL first. Laravel creates the tables, not the database itself.

What is the project structure?

  • app/ holds your application code (models, controllers, providers).
  • routes/web.php defines browser routes, and routes/console.php holds console commands and scheduled tasks.
  • resources/views/ contains Blade templates, and resources/js and resources/css contain frontend files.
  • config/ contains configuration files, and .env holds environment-specific values.
  • public/ is the web root. Point your web server to this folder only.

Step 4: Check your first route

Open routes/web.php and add a test route:

Route::get('/hello', function () { return 'Hello from Laravel 13'; }); 

Visit /hello. If you see the text, your installation works.

How do I update the installed version later?

Run composer update within the version constraint in composer.json. For a major upgrade, follow the official upgrade guide, which lists breaking changes.

Common mistakes and fixes

  • laravel: command not found: add Composer's global bin directory to your PATH.
  • Your PHP version does not satisfy the requirement: install PHP 8.3 or newer and make sure the command line uses it.
  • Missing PHP extension: enable it in php.ini and restart the terminal.
  • Vite manifest not found: run npm install and npm run build, or start composer run dev.
  • "No application encryption key": run php artisan key:generate. The installer normally does this for you.
  • Permission errors on storage: make storage and bootstrap/cache writable on Linux.

How do I verify everything is working?

  1. php artisan --version prints Laravel Framework 13.x.
  2. php artisan about shows the environment, drivers and versions.
  3. The welcome page loads in the browser.
  4. php artisan test runs the example tests and passes.

FAQ

Does Laravel 13 support PHP 8.2?

No. The release notes list PHP 8.3 to 8.5 for Laravel 13.

Do I need Node.js?

Only for building CSS and JavaScript with Vite. A backend-only API project can skip it.

Which is better, the installer or composer create-project?

The installer is faster to use and offers the interactive questions. Both create the same kind of project.

References

Originally published on yasiramin.dev.