
Laravel is loved for how fast you can build with it. Deployment is where many developers lose that speed. A server needs the right PHP version, extensions, a web server, a database, file permissions and a queue worker, and one mistake can break everything.
A PaaS platform removes much of that work. You describe what your app needs, and the platform prepares the environment.
Quick answer: To deploy Laravel on PaaS, create a PHP environment with the PHP version your app needs, add a database, deploy your code through Git or an upload, install dependencies with Composer, set your .env values, run migrations, make sure the web root points to the public folder, set permissions for the storage folders, and test. Then add your domain and SSL, and set up queues and backups.
New to PaaS? Start with our guide on what PaaS is, or read the general version of this guide on how to deploy a web application on PaaS.
What Laravel Needs to Run
Before you deploy, know what Laravel expects:
- A supported PHP version, with common extensions such as mbstring, openssl, PDO, tokenizer, xml and ctype
- A web server that sends requests to the public folder
- A database, such as MySQL, MariaDB or PostgreSQL
- Composer to install packages
- Writable storage and cache folders
- Optionally, a queue worker, a scheduler and a cache such as Redis
On our platform, our Laravel hosting supports Laravel 11 with PHP 8.2 and 8.3, along with tools such as Composer and Artisan.
Step 1: Prepare Your Project
Do these checks on your own machine first:
- Commit your code to Git. Keep the .env file out of the repository.
- Check your PHP version. Look at the require section of composer.json and use the same version online.
- Test the app locally. Run migrations, open the main pages and fix errors.
- Run tests if you have them.
- Remove debug tools from production. Turn off debug mode and any dev only packages.
A clean project makes everything after this easier.
Step 2: Create a PHP Environment
In the dashboard, click New Environment and use the topology wizard. Then:
- Open the PHP tab
- Choose your application server and PHP version
- Set resource limits so the app can scale up when needed
- Add a database in the same wizard, or add it later
- Turn on SSL if you want it from the start
- Name your environment and click Create
Our knowledge base explains this in its guide to creating an environment and its article on using NGINX as a PHP application server.
Step 3: Add Your Database
Laravel works well with MySQL, MariaDB and PostgreSQL, and our managed databases cover all of them, including MySQL hosting, MariaDB hosting and PostgreSQL hosting.
Write down the host, port, database name, user and password. You will use them in your .env file.
Step 4: Deploy Your Code
You can deploy in a few ways:
- Git: connect your repository, choose the branch and deploy. You can turn on automatic updates so new commits are picked up. See our knowledge base guide on deploying a project through Git or SVN.
- Archive upload: pack your project and upload it through the deployment manager.
- FTP or FTPS: upload files over an encrypted connection if you prefer.
- Docker: if you already use containers, see our guide on how to deploy Docker containers on PaaS.
Git is the best choice for repeat releases because every deployment is traceable.
Step 5: Install Dependencies With Composer
After your code is on the server, install the packages. In most setups you run:
composer install –no-dev –optimize-autoloader
Run it in the project folder, using the platform’s terminal or deployment hooks. The flags skip development packages and make the autoloader faster for production.
Step 6: Set Up Your .env File
Laravel reads settings from the .env file or from environment variables. Set at least:
- APP_ENV to production
- APP_DEBUG to false
- APP_URL to your real domain
- APP_KEY, which you can generate with Artisan if it is missing
- DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD
- Mail, cache and queue settings if you use them
Never commit this file to Git. Keep a safe copy of the values in a password manager.
Step 7: Run Migrations and Optimise
With the database settings in place, run:
php artisan key:generate
php artisan migrate –force
php artisan config:cache
php artisan route:cache
php artisan view:cache
Only run key:generate if you do not already have an APP_KEY, because changing it later invalidates existing sessions and encrypted data. The cache commands speed up the app, but remember to clear and rebuild them whenever you change configuration.
Step 8: Point the Web Root to the Public Folder
This step trips up many beginners. Laravel must serve requests from its public folder, not from the project root. If the web root points to the project root, visitors may see errors or, worse, expose files that should stay private.
Check how the web root is set in your environment, and ask our support team or check the knowledge base if you are not sure. Do not skip this step.
Step 9: Set Folder Permissions and Storage
Laravel needs to write to the storage and bootstrap cache folders. Check that they are writable by the web server user. If you store uploads, run:
php artisan storage:link
For apps with many uploads, consider our file storage and wider storage services instead of keeping everything on the app server.
Step 10: Test the App
Open the app from the dashboard and check:
- The home page and main routes load
- Login, registration and forms work
- The database reads and writes correctly
- Uploads work
- Error pages do not show sensitive details
- Emails send, if you use them
Read the logs in the storage logs folder if something fails. Most first deployment errors come from the wrong PHP version, missing extensions, wrong database settings or folder permissions.
Step 11: Add Your Domain and SSL
Point your domain to the environment, attach it in the dashboard and enable SSL so the site loads over HTTPS. Update APP_URL to match, then test again with the real domain.
Step 12: Set Up Queues, Scheduler and Performance Tools
Many Laravel apps need extra pieces:
- Queue workers for emails and background jobs
- The scheduler, which runs scheduled tasks with a cron entry
- Horizon if you use Redis queues
- Octane if you want higher concurrency. Our Laravel hosting supports Octane with Swoole or RoadRunner.
- Caching with Redis for faster responses
Add these once the basic deployment works, not before.
A Real-World Example
Imagine a small agency building an appointment app on Laravel. Their old server needed a developer for half a day each time they deployed a new client. On a managed platform, they follow the same routine for each client: create a PHP environment, add a MySQL database, deploy from Git, set the .env values, run migrations and add the domain.
On their first deployment they forget to switch the web root to the public folder and see an error page. After checking the setup and fixing it, the site works. Since then, the checklist has saved them from repeating the same mistake, and each new client goes live in a fraction of the time.
Common Laravel Deployment Mistakes
- Leaving APP_DEBUG on in production
- Committing the .env file to Git
- Pointing the web root at the project root
- Using a different PHP version from local development
- Forgetting to run migrations
- Forgetting to link or configure storage
- Running key:generate again on a live site
- Never testing a database backup restore
Laravel Deployment Checklist
| Step | Done |
| Code in Git, .env excluded | Yes or no |
| PHP version matches | Yes or no |
| Environment and database created | Yes or no |
| Code deployed | Yes or no |
| Composer install run | Yes or no |
| .env values set, debug off | Yes or no |
| Migrations run | Yes or no |
| Web root set to public | Yes or no |
| Storage permissions and link checked | Yes or no |
| App tested | Yes or no |
| Domain and SSL set | Yes or no |
| Queues, scheduler and backups set | Yes or no |
Where to Go Next
If your project is a general PHP app, read how to deploy PHP applications on PaaS. Before moving a live Laravel app, read our guide on how to evaluate a PaaS platform for production and our PaaS security checklist. You can also see how our plans work on the PaaS pricing page.
Final Thoughts
Deploying Laravel on PaaS comes down to a short routine: the right PHP version, a database, your code, a correct .env, migrations and the right web root. Once you have the routine, each deployment gets faster and safer.
Ready to deploy your Laravel app? Explore our Laravel hosting, our PaaS platform, or speak to our team.
Frequently Asked Questions
Can I deploy Laravel on PaaS? Yes. A PaaS platform can run Laravel with the right PHP version, a database and a web root pointed at the public folder.
Which PHP version does Laravel need? It depends on your Laravel version. Check the require section of composer.json and use the same version online.
Do I need SSH to deploy Laravel? You need a way to run Composer and Artisan commands, either through a terminal or deployment hooks. Check what your platform offers.
How do I run migrations on production? Run the migrate command with the force flag after your database settings are in place, and take a backup first.
Does Laravel work with Docker on PaaS? Yes, many platforms support Docker based workflows. Check the exact steps for your platform.
Can you help move my existing Laravel site? Our team offers migration help, so you can ask them to move your files and databases.


