GIT’s Clone Project Laravel tutorial


Assalamualikum, Friends of #Bacanews Wherever you are, this time I will discuss some important things for the survival of your website in the future. Please see the article below.

Installing Laravel on cPanel can be done in several ways. One of them is by cloning the Laravel project from Git.

Laravel project clones allow you to copy Laravel projects stored on GitHub directly into cPanel. But still, there are configurations that must be done to clone a project. Then, how do you do that?

Congratulations on the right page! We will share the Laravel clone project tutorial from Git in this article. Come on, follow the steps!

Also Read: How to Upload Laravel to Hosting

How to Clone Project Laravel from Git

The Laravel clone project from Git can be done in just 4 easy steps, namely:

  1. Enter cPanel
  2. Creating a Repository in Git Version Control
  3. Install Dependency
  4. Regulatory Environment

To start cloning a Laravel project from Git, prepare the Git repository URL that will be cloned first. If so, let’s just look at the detailed explanation!

1. Login cPanel

The first step to clone a Laravel project from Git is to login to cPanel hosting first.

Once you are on the cPanel page, go to the menu Git Version Control. You can also search for it directly by typing Git in the search feature at the top right of the cPanel display.

2. Create a Repository in Git Version Control

After entering the Git Version Control page, you must create a repository to store the Git project that will be cloned by clicking the button Make.

Next, you will be asked to fill in the repository details in the form below:

  • Duplicate Repository : Enable the / Enable toggle if you want to clone a Git project.
  • Clone URL : Enter the URL of the Git project to duplicate. URLs usually start with http: //, https: //, ssh: // or git: //
  • Repository Path : Select the location / directory where the project will be saved. If no path is found, the system will create a new directory to store the project.
  • Repository Name : Enter the name of the repository, this section is the display name only, does not affect functionality.

Make sure all fields are filled in correctly, then click Make to start the clone process.

If the clone process is complete, the system will display a list of repositories that have been created as shown below.

3. Attach Addiction

Even though the clone has been successfully executed, the Laravel project cannot yet be run. You need to install all dependencies and libraries using Composer as dependency manager.

In order to run Composer, you must have access to the SSH terminal on your hosting.

If your hosting package supports SSH features, you can immediately open a terminal and enter the Laravel project directory. Then, run the command:

composer install

Now, if the output is like the image below, then Composer has been successfully installed.

The speed of the installation process will depend on the number of dependencies installed and your hosting connection.

4. Environmental Settings

After successfully installing composer, you will need to create an .env in the Laravel project root directory. To create a file .env, You can run the following commands on the terminal.

cp .env.example .env

To avoid errors when migrating the database, you must make database settings on the file .env which has been made. Enter the settings like this:

Customize the database name, username and password that you have. If so, save changes with the click of a button Save changes located at the top right of the screen.

Every time you make changes to the file .env, You are prompted to run the command:

php artisan config:cache

The above command aims to clear the previous config and cache so that the new configuration can be read by Laravel. Later the output that will appear is:

Then, run the below command to generate a key.

php artisan key:generate

After the key has been successfully set, perform a database migration by running the following command.

php artisan migrate

The image above shows that the database was successfully migrated. Now, you can directly access the cloned git project via a browser by accessing the website domain.

What if an error occurs during the setup environment?

Don’t panic if something goes wrong access is denied for the user when you migrate the database as shown below:

You can easily solve this error. Go to your Laravel project directory, then Edit the file AppServiceProvider.php that’s in the folder / app / Providers.

Paste the code below in the file AppServiceProvider.php, then save the changes.

use IlluminateSupportFacadesSchema;

 * Bootstrap any application services.
 * @return void
public function boot()


How easy enough, right? With just 4 steps, the Laravel project clone has been successfully done using your cPanel.

The Laravel clone project from Git requires access to a hosted terminal in order to install dependency and setting environment. So make sure the hosting service you use provides SSH access.

Niagahoster has Personal Package and Business Package with SSH access as a built-in feature that can be used immediately. Interestingly, you can enjoy these features starting with 27 thousand / month only!

Another plus, you will get a fast server LiteSpeed which makes the website easily accessible and guarantees security from Malware thanks to its protection Cloudflare Protection and Imunify360.

Hopefully the guide information above is useful for you. Don’t hesitate to leave a question in the comments column if there is a step explanation that is not clear, huh.

Tips and Triks

GIT’s Clone Project Laravel tutorial

#GITs #Clone #Project #Laravel #tutorial