Laravel is a popular PHP framework that requires a few specific steps to install on your BurjHost account. Unlike WordPress, you cannot use a one-click installer. You will need SSH access or the command line.
Prerequisites:
-
A BurjHost plan that supports SSH access and the required PHP version (Laravel 10.x requires PHP 8.1+).
-
Composer (dependency manager for PHP).
Method 1: Installation via SSH (Recommended)
-
Log in to your account via SSH (see Article 52 for SSH access).
-
Navigate to your desired directory (e.g.,
public_htmlfor the main domain, or a subfolder):cd ~/public_html -
Install Laravel using Composer:
composer create-project laravel/laravel .
(The dot at the end installs it in the current directory. Remove the dot to install in a subfolder likelaravel-site). -
Set Permissions:
Laravel needs write access to thestorageandbootstrap/cachedirectories:chmod -R 775 storagechmod -R 775 bootstrap/cache -
Configure Environment:
-
Copy the example environment file:
cp .env.example .env -
Generate an application key:
php artisan key:generate
-
-
Edit the
.envfile to set your database credentials and app URL.
Method 2: Manual Upload (Without SSH)
If you don't have SSH, you can install Laravel locally and upload it:
-
Install Laravel locally using Composer on your computer.
-
Compress the entire folder into a ZIP file.
-
Upload the ZIP via cPanel File Manager and extract it.
-
Important: You may need to adjust file permissions via File Manager (folders to 755, files to 644).
Your Laravel app should now be accessible at your domain.