Guide on How to Install Laravel Framework via SSH

Laravel is an open source PHP-based web application framework that uses the Model-View-Controller concept. Laravel is under the MIT license, using GitHub as a code sharing platform.



The installation is very easy, here's the guide:

1. login to your server using an SSH connection.

2. Next, enter the home hosting directory.

3. Next, enter the install command "composer global require laravel/installer" as shown below:

$ composer global require laravel/installer



4. After the installation process is complete, we enter the .composer/vendor/bin directory as shown below:

$ cd .composer/vendor/bin/

 

5. Next we create a directory that we will make the specific directory of our Laravel. For example, we create a public directory and set the permission to 755 as shown below:

$ mkdir public $ chmod 755 public/

 

6. Next we can install Laravel by issuing the create-project Composer command and if successful it will appear like the example image below:

$ composer create-project --prefer-dist laravel/laravel:^7.0 public





7. When finished, to make it easier we move our project location to the public_html directory (optional / as needed)

$ mv public/ /home/nama_hosting/public_html/

 

8. Next, we index and one way we can use the htaccess file confiugation as shown below:

$ touch /home/nama_hosting/public_html/.htaccess $ nano /home/nama_hosting/public_html/.htaccess

For the htaccess script we can use the command as below:


9. If all processes are complete, you can check via web browser and make sure there is no error message, for example the image below:




Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.