Access SSH #
- Log in to cPanel.
- Go to Advanced → Terminal (or use PuTTY/Termius/OpenSSH).
- If using an external client:
Upload Project Files #
- Upload your project ZIP file (
BravoMart-Admin.zip) to your subdomain folder using cPanel File Manager. - Extract it via SSH:
unzip BravoMart-Admin.zip -d ./
Ensure files are directly inside the folder (not nested).
Configure Environment File #
Duplicate .env.example as .env.production:
filename.js
cp .env.example .env.production
Update your API URL:
NEXT_PUBLIC_API_URL=https://api.yourdomain.com/api
Install Dependencies #
In the project root folder:
npm install
Build the Project #
npm run build
This generates optimized production files inside .next.
Verify Installation #
Visit your subdomain:
https://admin.yourdomain.com