Special offer
.com Domain Name
English
+370 5 205 5502 sales@monovm.com

Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. In this tutorial we will explain how to install Laravel on cPanel.

19

Feb, 19

Installing Laravel on cPanel through SSH

Installing Laravel on cPanel through SSH

Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. Before installing Laravel, you must first install Composer. It is a tool which facilitates dependency management for PHP developers and programmers.

To begin downloading Composer installer file, enter following command.

wget https://getcomposer.org/installer

Installing Laravel on cPanel through SSH

Installing Laravel on cPanel through SSH

 

To check the downloaded installer file, enter the following command with –check parameter.

php installer --check

2- ssh-en

In order to install Composer through the installer file, use the php extension command without using any parameters.

php installer

3- ssh-en

By running this command, a phar file will be created with the name Composer.phar. To view the list of files and folder at current directory use ls command.

ls

4- ssh -en

 Also there is a possibility to view this file through the cPanel interface.

4- cpanel-en

 

To enhance your host security, we recommend to remove the installer file. In order to remove this file use the following command.

rm -f installer

5- ssh-en

5- cPanel-en

To viewing Composer commands, use the follwoing command:

php composer.phar

6- ssh

To create Laravel project in Composer run create-project command.

php composer.phar create-project laravel/laravel --prefer-dist

By running this command Laravel installation steps will be started. Wait until these steps are completed.

7- ssh-en

After completion of the installation the following message will be displayed:

Application key set successfully

8-ssh-en

After installing Laravel a folder with larvael name (which we set in previous command) will be created.

9- ssh-en

9- cpanel_en

10- cpanel-en

Given that web pages loading in cPanel are started from public_html folder and created projects in Laravel started from public folder, we must make a link between these two folders. This action will cause that site loading started from public folder directly.

11- cpanel-en

 

First of all remove public_html folder with below command.

rm –rf public_html

12- ssh-en

Now you must create public_html folder which linked to public folder into laravel folder. To do so, enter the command below:

ln –s laravel/public public_html

13- ssh-en

13- cpanel-en

At this step Laravel installation steps are finished and you can see Laravel default page when loading your domain name.

14-en