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.

The Git Version Control menu in cPanel

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.

Baca juga :  Tingkatkan Conversion Rate Anda dengan 5+ Tips CTA ini!
laravel clone project from git

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

Fill in the new repository details form in the Git Version Control menu
  • 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.

Successfully created a new repository in Git Version Control

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.

Baca juga :  Desain Website dan Tips Penting Desain
run the composer installation

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:

Edit the database section in the .env file

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:

clearing cache with php artisan config: cache

Then, run the below command to generate a key.

php artisan key:generate
Generate key with php artisan key: generate

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

php artisan migrate
Database migration with 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.

Baca juga :  6+ Cara Cek Responsive Website dengan Mudah! [Terbaru]
The Laravel clone project from git was successful

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:

Error Access Denied For User when cloning project laravel

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.

Editing the app / Providers / AppServiceProvider.php file

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.

Tema WordPress Berita

Tips and Triks

GIT’s Clone Project Laravel tutorial

#GITs #Clone #Project #Laravel #tutorial


Leave a Reply

News Feed