Install Laravel on a DirectAdmin Server

Posted on April 19th, 2018

Install Laravel on a DirectAdmin Server

Laravel is an Open-Source PHP web framework for the development of web applications. Laravel framework includes dedicated dependency manager, utilities for application management and maintenance, different ways for accessing relational databases. As we all know that the PHP is the popular server scripting language around the world. Currently, the developers are building the complex websites and webapps, this might take much time from to start from the beginning. PHP frameworks have introduced the solution for this to help programmers. The Laravel framework has instant hosting and deployment system.


Let’s discuss few features of Laravel framework:

1) Authorization and Program Logic Technique

2) Blade Templating Engine

3) Different File Support

4) Security

5) Migration System Databases


Let’s discuss the steps to install Laravel framework on a Direct Admin server:

1) Login to your server via SSH as a root user and update your server to have everything well updated. Then install git and curl packages using yum utility using below commands.

# yum update

# yum install -y git curl


2) Install composer by using below commands, composer is a dependency manager for PHP through which we can install required libraries and dependencies you need for your project.

# curl -sS | php

# mv composer.phar /usr/local/bin/composer


3) Install the Laravel by following below commands; First, we need to remove the default files on the domain root folder created by the DirectAdmin and then switch to that directory;

# rm -rf /home/USERNAME/domains/LARAVEL_DOMAIN_NAME/public_html/*

# cd /home/USERNAME/domains/LARAVEL_DOMAIN_NAME/public_html/

PS: replace the USERNAME with the exact username and LARAVEL_DOMAIN_NAME with the domain name on which you need to install the projects.


4) Once done, install the Laravel using the Composer create-project tool.

# composer create-project –prefer-dist laravel/laravel  .

Once the installation completed, need to correct the ownership and permissions, for this just run below commands. Make sure to change USERNAME and LARAVEL_DOMAIN_NAME with the actual ones.



5) Configure DirectAdmin to change the document root from public_html to public folder as required by Laravel. For that login to your DirectAdmin as admin user and click on “Custom HTTPD Configurations” link under the “Extra Features” section. Select your domain on which you have installed Laravel and on the new window, you should update the document root in the “Httpd.conf Customization for” area:


Once done, click on ‘Save’ button to update the changes. That’s all, you have installed and Configured Laravel on your Direct Admin Server.


If you need any further help please do reach our support department.



One Response to “Install Laravel on a DirectAdmin Server”

  1. fastnet says:

    hi. i fallow. all your methode. but i get.: Forbidden
    You don’t have permission to access this resource.

Leave a Reply