Free tools Windows power users keep installed
One-click scans. No signup required.
To install Laravel 13 on Ubuntu, install PHP 8.3 or newer with Laravel’s required extensions, Composer, the Laravel installer, and Node.js with NPM (or Bun). Laravel’s supported bootstrap command can install the PHP and Composer toolchain in one step; then you create an application, build its frontend assets, and start the local server with Artisan’s development runner.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What you need before installing Laravel
A Laravel application has two toolchains. PHP and Composer install and run the framework and its packages. Node.js with NPM (or Bun) installs and compiles browser assets through Vite. Laravel’s installation documentation lists PHP, Composer, and the Laravel installer as prerequisites, plus Node and NPM or Bun for frontend assets. See the official Laravel documentation for the current installation and deployment instructions.
As an Amazon Associate I earn from qualifying purchases.
PHP version for Laravel 13
Laravel 13 requires PHP 8.3 or newer. It also requires the Ctype, cURL, DOM, Fileinfo, Filter, Hash, Mbstring, OpenSSL, PCRE, PDO, Session, Tokenizer, and XML extensions. Ubuntu package names depend on the Ubuntu release and the repositories enabled on that release, so install the matching php8.3-* packages from your release’s supported repositories rather than copying a package list intended for another Ubuntu version.
Check the PHP version after installation with:
php -v
The output should report PHP 8.3 or a later version. If Ubuntu selects an older system PHP, change the enabled repository or PHP alternative using the package-management procedure appropriate to your Ubuntu release before creating the Laravel project.
#1 Best Overall
Composer
Composer resolves Laravel and your application’s PHP dependencies. Confirm it is available with:
composer --version
If the command is missing, the one-command Laravel bootstrap below installs PHP and Composer for Linux. If you already have a working PHP and Composer installation, you can install only Laravel’s command-line installer.
Recommended Free Tools
Node.js and NPM
Vite requires Node.js 16 or newer and NPM. A new Laravel application already contains the package metadata for the Laravel Vite plugin, but you still need to run npm install in the project directory before building assets.
node --version
npm --version
You may use Bun instead of Node and NPM if that is the runtime you have chosen. The commands in the standard Laravel workflow use NPM.
Choose an installation route
| Situation | Recommended route | What it does |
|---|---|---|
| Fresh Ubuntu machine or no reliable PHP/Composer toolchain | Use the php.new Linux bootstrap |
Installs the PHP and Composer tooling used by Laravel; you restart the terminal afterward. |
| PHP and Composer already work | Install the Laravel installer with Composer | Adds the laravel command globally without replacing your existing toolchain. |
| Local development | Use composer run dev |
Starts Laravel’s development workflow; the application is available at http://localhost:8000. |
| Production Ubuntu server | Nginx with PHP-FPM | Serves the application’s public directory and passes PHP requests to PHP-FPM. |
Do not treat the local development server as a production web server. It is useful for developing and testing an application on the Ubuntu machine; production needs a web server, PHP-FPM, permissions, deployment caching, and a process strategy for workers or other long-running services.
Install PHP, Composer and the Laravel installer with the official bootstrap
On Ubuntu/Linux, run the documented bootstrap command from a shell:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →/bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.5)"
This command is the current Laravel-documented Linux bootstrap. It targets the PHP 8.5 toolchain, which satisfies Laravel 13’s PHP 8.3-or-newer requirement. Review the script and ensure curl is available on the machine before running it.
- Open a terminal on the Ubuntu machine.
- Run the bootstrap command exactly as shown.
- Allow the installer to finish.
- Close and restart the terminal session. Restarting ensures the shell sees any PATH or environment changes made by the installer.
- Verify the toolchain with
php -vandcomposer --version.
If your organization requires packages from Ubuntu-managed repositories only, use the release-supported PHP and extension packages instead, then follow the existing-toolchain route below. The required PHP version and extensions remain the same; only the package installation method changes.
Rank #2
Install Laravel’s CLI installer when PHP and Composer already exist
When PHP and Composer are already correctly installed, install the Laravel installer globally:
composer global require laravel/installer
Open a new terminal session if Composer reports that its global vendor binary directory is not on the current shell PATH. Then check that the command is available:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
laravel
The installer is a project-creation command. It does not replace the PHP runtime, install a database server, or compile frontend assets by itself.
Create a Laravel application on Ubuntu
From the directory where you keep development projects, run:
laravel new example-app
Replace example-app with the directory name you want. The command creates a new Laravel application and its initial configuration files. Move into the project before running NPM or Artisan commands:
cd example-app
Install and compile frontend assets
Install the JavaScript dependencies described by the new project:
npm install
Build the frontend assets:
npm run build
Vite uses the Node.js and NPM toolchain for this step. If npm install fails, verify that Node.js is version 16 or newer, that NPM is on your PATH, and that you are running the command inside example-app, not its parent directory.
Start Laravel’s development workflow
Start the local development processes with:
composer run dev
When the command starts successfully, open http://localhost:8000 in a browser on the Ubuntu machine. If you are connecting from another computer, localhost refers to the computer running Laravel; use an explicitly configured, secured development-network address rather than assuming the local URL is publicly reachable.
Understand the generated .env file and database
Laravel creates an .env file for environment-specific settings. The file belongs to the individual machine or deployment environment, not to shared source control. Laravel’s documentation states: “Your .env file should not be committed to your application’s source control, since each developer / server using your application could require a different environment configuration.”
Add .env to the project’s ignored files if it is not already ignored, and keep secrets out of committed configuration. Share safe defaults through the project’s example environment file or your team’s secret-management process instead.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallUse the default SQLite database
A fresh Laravel application defaults to SQLite and creates database/database.sqlite. This is a convenient starting point for local development because it does not require a separate database server. Confirm that the file exists, then run the migrations from the project directory:
php artisan migrate
The migration command creates the tables defined by the application’s migration files in the configured database.
Switch to MySQL or PostgreSQL
If your application uses MySQL or PostgreSQL instead of SQLite, edit the database connection values in .env. Set the appropriate DB_* values for the database engine, host, port, database name, username, and password used by your Ubuntu environment. After the connection settings and database server are ready, run:
php artisan migrate
A migration failure usually means the connection values, credentials, database availability, or PHP database extension do not match the selected engine. Correct the environment settings first, then rerun the migration.
Verify an installation before writing application code
- PHP:
php -vreports 8.3 or newer for Laravel 13. - Composer:
composer --versioncompletes without a command-not-found error. - Laravel installer:
laravelis available after the global Composer install. - Project directory: the shell is inside
example-appbefore NPM and Artisan commands run. - Frontend dependencies:
npm installcompletes beforenpm run build. - Environment: the project has its local
.envand that file is not committed. - Database: SQLite’s
database/database.sqliteexists, or the selected MySQL/PostgreSQLDB_*settings point to a reachable database. - Application:
composer run devstarts and the site responds athttp://localhost:8000.
Common Ubuntu installation problems and fixes
php is too old
Laravel 13 needs PHP 8.3 or newer. Check the active binary with php -v. Installing a newer package is not enough if Ubuntu still points the php command at an older alternative; select the supported PHP binary using your release’s normal alternatives and PATH procedures, then recheck the version.
A required PHP extension is missing
Laravel 13 requires Ctype, cURL, DOM, Fileinfo, Filter, Hash, Mbstring, OpenSSL, PCRE, PDO, Session, Tokenizer, and XML. Install the corresponding extension packages for the PHP version supplied by your Ubuntu repositories. Package names differ between releases, so match the package names to the enabled PHP version instead of using an unverified cross-release command.
Rank #4
laravel is not found after Composer installation
The Laravel installer is installed globally, but the shell may not include Composer’s global vendor binary directory in PATH. Start a new terminal session and check again. If it is still unavailable, inspect Composer’s global bin directory and add that directory to the shell profile used by your Ubuntu account.
npm or node is missing
Install Node.js and NPM from a source that supports your Ubuntu release, then verify both versions. Vite requires Node.js 16 or newer. Run npm install only after changing into the Laravel project directory.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsThe browser cannot load the local site
Keep composer run dev running in the terminal while testing. If the command exits, the development processes have stopped. Open the URL on the Ubuntu host itself when using localhost; a browser on another machine does not resolve its own localhost to the Ubuntu server.
Migrations fail after changing database engines
Review every DB_* value in .env, make sure the database exists and accepts the configured user, and confirm that PHP has the extension required by the selected driver. Run php artisan migrate again only after those settings are corrected.
Move a Laravel application from local Ubuntu to production
Production serving is a separate setup from creating a project. Laravel’s deployment guidance uses Nginx in front of PHP-FPM. Configure Nginx so the site’s document root is the Laravel application’s public directory, not the project root. PHP requests should be passed to the PHP-FPM socket for the PHP version installed on the server, and the server should block access to hidden files.
Set filesystem permissions
Laravel must be able to write to bootstrap/cache and storage. Grant write access to those directories for the web-server process owner while keeping the rest of the project as restrictive as your deployment model permits. A permission error in logs or during cache generation usually means the owner or group does not match the PHP-FPM/Nginx service account.
Optimize during deployment
After deploying code and installing its dependencies, Laravel provides:
php artisan optimize
This deployment command handles the framework’s configuration, event, route, and view cache preparation. Run it as part of a controlled deployment process, after environment values are present and before traffic is switched to the new release.
Reload long-running processes
Queue workers, Reverb, and Octane can keep old application code in memory. Laravel’s deployment documentation says these long-running services should be reloaded after new code is deployed. Include the reload or restart operation in the process manager you use, and verify that the new workers are running the new release.
Local development versus self-managed production
| Decision | Local Ubuntu development | Self-managed Ubuntu production |
|---|---|---|
| Application entry point | composer run dev and http://localhost:8000 |
Nginx points to the Laravel public directory. |
| PHP request handling | Handled by the development workflow | Nginx passes PHP requests to PHP-FPM. |
| Database starting point | SQLite with database/database.sqlite |
SQLite, MySQL, or PostgreSQL according to the application’s DB_* configuration and operational needs. |
| File permissions | Your development account can work in the project | The web-server process owner must write to bootstrap/cache and storage. |
| Deployment maintenance | Run commands interactively while developing | Run php artisan optimize and reload long-running workers, Reverb, or Octane after releases. |
If you do not want to maintain Nginx, PHP-FPM, permissions, and deployment processes yourself, Laravel’s deployment documentation also names Laravel Cloud and Laravel Forge as deployment options. Their availability and any partner or referral terms can change, so confirm current details before choosing one.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Frequently asked questions
Can I install Laravel without Node.js?
You can create and run the PHP application without immediately compiling browser assets, but Laravel’s documented setup expects Node and NPM or Bun when the application has frontend assets. Vite requires Node.js 16 or newer and NPM for the standard asset workflow, so install that toolchain before running npm install and npm run build.
Which PHP extensions must Ubuntu provide?
Laravel 13 lists Ctype, cURL, DOM, Fileinfo, Filter, Hash, Mbstring, OpenSSL, PCRE, PDO, Session, Tokenizer, and XML. Use the package names supplied by your Ubuntu release for PHP 8.3 or newer; names and repository availability vary by release.
Why is the Nginx root set to public?
The deployment layout exposes Laravel’s intended public entry point while keeping application code and environment files outside the web root. Configure Nginx to serve the project’s public directory and block hidden files as described in Laravel’s deployment guidance.
Where should production secrets go?
Use the server’s environment configuration in .env or an equivalent secret-management process, and do not commit that file. Each developer and server can require different environment values.
Do I need to run migrations immediately?
Run php artisan migrate when you want Laravel’s migration files applied to the configured database. A fresh project defaults to SQLite and creates database/database.sqlite; for MySQL or PostgreSQL, set the connection’s DB_* values first.
Frequently Asked Questions
What is the minimum PHP version for Laravel 13 on Ubuntu?
PHP 8.3 or newer, together with Laravel’s required extensions: Ctype, cURL, DOM, Fileinfo, Filter, Hash, Mbstring, OpenSSL, PCRE, PDO, Session, Tokenizer, and XML.
What command starts a newly installed Laravel application?
From the project directory, run composer run dev. The local application is then available at http://localhost:8000 while the development command remains running.
Should the Laravel .env file be committed to Git?
No. Laravel says the .env file should not be committed because each developer or server may require different environment configuration.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




