Bravo Mart

View Categories

cPanel Setup (CLI)

1 min read

Access SSH #

  1. Log in to cPanel.
  2. Go to Advanced → Terminal (or use an SSH client like PuTTY).
  3. Connect using your cPanel username and password if using an external client:

Create a MySQL Database and User #

You can do this via cPanel → MySQL Databases (GUI), even if installing via CLI.

  1. Create a new database (e.g., quick_ecommerce_api).
  2. Create a new database user with a strong password.
  3. Assign full privileges to this user on the new database.

Upload or Clone Project Files #

Option 1 — Upload Zip file via cPanel #

  1. Upload Quick-Ecommerce-API.zip to your subdomain folder (/home/username/admin or /public_html/admin).
  2. Extract the zip file from CLI:
unzip Quick-Ecommerce-API.zip -d ./ 

Ensure your Laravel files are directly inside your subdomain folder (not nested).

Install Dependencies via Composer #

Inside your Laravel API folder:

cd admin      # or the folder where you uploaded
composer install --no-dev --optimize-autoloader

Configure Environment File

Set File Permissions #

chmod -R 755 .
chmod -R 775 storage
chmod -R 775 bootstrap/cache

If permission issues continue, you may need to use:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R 775 storage bootstrap/cache

Run Laravel Commands #

📄
filename.js
php artisan key:generate
php artisan storage:link
php artisan config:cache
php artisan route:cache
php artisan view:cache

Troubleshooting #

  • 500 Error: Recheck folder permissions for storage and bootstrap/cache.
  • Database error: Ensure .env credentials match the cPanel database settings.
  • Composer not found: Ask your host to enable Composer or install it locally and upload vendor folder manually.

Installer Access (Laravel #

Open your browser and go to either of these URLs:

https://your-domain.com

https://your-domain.com/public

Leave a Reply