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

 

Installing Laravel 11

To do this:

  1. Connect to the server via SSH (need help?).
  2. Navigate to the website directory by running the command “cd path-to-website” (e.g. cd sites/laravel.domain.xyz).
  3. Create a new project by running the command composer create-project laravel/laravel example-app.
  4. Edit the .env file 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
  5. Navigate to the project directory and deploy via SSH:
    cd example-app
    php artisan migrate
  6. Modify the target directory to point to the "public" subdirectory of the project, here /sites/laravel.domain.xyz/example-app/public.

Has this FAQ been helpful?