Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
Install Laravel on an Infomaniak hosting account
Update 09/01/2026
This guide concerns Laravel, an open-source web framework written in PHP that follows the model-view-controller (MVC) principle. Please also refer to their documentation.
Prerequisites
- Have a Shared Web Hosting or Cloud Server with the latest MySQL/MariaDB.
- Website running on PHP 8.2.
- Create an SSH access.
- Create a database.
Installing Laravel 11
To do this:
- Connect to the server via SSH (need help?).
- Navigate to the website directory by running the command “cd path-to-website” (e.g.
cd sites/laravel.domain.xyz). - Create a new project by running the command
composer create-project laravel/laravel example-app. - Edit the
.envfile at the root of the hosting to update the connection settings for the new database:- DB_CONNECTION=mysql
- DB_HOST=xxxx.myd.infomaniak.com
- DB_PORT=3306
- DB_DATABASE= the name of the MySQL database (xxxx_newbdd)
- DB_USERNAME= the MySQL user with the rights to this database
- DB_PASSWORD= its password
- Navigate to the project directory and deploy via SSH:
cd example-appphp artisan migrate - Modify the target directory to point to the "public" subdirectory of the project, here
/sites/laravel.domain.xyz/example-app/public.
Link to this FAQ: https://faq.infomaniak.com/2119
Has this FAQ been helpful?