Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Install Laravel on Infomaniak hosting

This guide concerns Laravel, an open-source web framework written in PHP that follows the model-view-controller (MVC) principle. 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 site directory by running the command “cd path-to-site” (for example cd sites/laravel.domain.xyz).
  3. Create a new project by running the command composer create-project laravel/laravel example-app.
  4. Modify the .env file at the root of the hosting to update the connection parameters to 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 rights to this database
    • DB_PASSWORD= their password
  5. Navigate to the project directory and publish 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.

 

If needed, local partners referenced by Infomaniak can handle these procedures: launch a free call for tenders; they take care of everything, freeing you from technical details — also discover the role of the host.


Has this FAQ been helpful?