How To Setup Projects V3.0

The projects with V3.0 are all built with Laravel V11. Which will have no quick installer for security purposes.

So, you will have two different project files for setting up. One file will give you project + SQL and another will only have the project file.

SQL file is given to set the project on shared hosting. If you have access to SSH, then better use the SSH migration command to properly set the project.

Securing Laravel Project Setup with SSH

SSH Login and Project Setup:

Setting Up Existing Laravel Project with SSH (Migrations and Seeding):

Assuming you have an existing Laravel project downloaded (or cloned using Git) and SSH access to your server:

Connect to Server: Open your SSH client and establish a connection using the server hostname, username, and password (or SSH key).

Navigate to Project Directory: Use the cd command to reach your Laravel project’s root directory on the server:

cd /path/to/your/laravel/project

Install Composer (if not pre-installed): If Composer isn’t already installed on your server, download the installer with curl and run the PHP installation:

curl -sS https://getcomposer.org/installer | php
php composer.phar self-update

Replace composer.phar with composer if it’s available in your PATH environment variable.

Install Dependencies: Run Composer to install all project dependencies defined in your composer.json file:

composer install

Configure Database Settings (if not already set up): Ensure your Laravel project’s .env file contains correct database connection details (host, database name, username, password) for your server’s database.

Run Migrations: Execute the Artisan command to apply all pending database migrations:

php artisan migrate

This creates or modifies database tables based on your defined migrations.

Seed Database (Optional): If you have seed files to populate your database with initial data, run the Artisan command with the specific seeder class name (replace InitDbSeeder with your actual class name):

php artisan db:seed --class=InitDbSeeder

Remember to adjust the commands and file paths based on your project’s specific configuration.

Related Posts