Installing the Laravel Framework on your hosting package

With every package at mijn.host you have the option to install some frameworks. This article is about the Laravel framework.

What is Laravel?

Laravel is an open-source PHP framework for building web applications. Laravel uses the MVC (Model-View-Controller) architecture and is a great framework for quickly creating various applications.

In this knowledge base article, we explain how to quickly install the Laravel framework.

At mijn.host you can install Laravel in two ways. Via our software installer or via composer which is installed by default on our hosting. You can find that here: composer

Installing via the software installer.

Log in to DirectAdmin. If you don't know how to do that, click here

Click on the menu on the left and go to the Extra Features/Programs heading.

You will enter the Softaculous installer. Search for Laravel:

Choose your installation type. Quick or Custom. Quick is the easiest.

Choose quick install. You will arrive at this screen.

Choose a directory or install it in your root. In this example, we will install it in the laravelsite directory. Choose your version, where the higher the better. Then press install, after a few minutes it will be ready..

Now a Laravel site has been installed on our domain: https://mijn.website/laravelsite.

You will see the default installation page and you can get started.

Have fun with your new project.

Installing via composer

A slightly more common way is to install Laravel with composer.

PHP options
Please note. Laravel installation via composer requires proc_open and proc_close.

You can disable these in your PHP Version selector in DirectAdmin -> Select PHP Version and then under options

Log in to the server via SSH. Don't know how to do that? Read about it here: Connection via SSH

SSH:

Login: ssh -p26 username@mijn.website

Once you are logged in, execute the following commands.

Navigate to the directory where you want the installation folder. Always choose your domain root, so the public_html

Command:

cd /home/username/domains/mijn.website/public_html

Create a new project with composer.

Command: composer create-project laravel/laravel:^8.0 appnew

Now composer will create a directory appnew with a fresh Laravel installation.

Go to the directory: cd appnew

Test the development server with this command: php artisan serve

Have fun with your project. You still need to adjust the config so you can see the application live.

More info on how to proceed regarding the config: https://laravel.com/docs/8.x/installation

If you cannot get your Laravel application to work, we are happy to help you further. Please contact our support department.


Still have questions? Get in touch.