How to migrate/upload a Laravel website/project on N99panel

Step 1 : Prepare archive of the Laravel website/project files/folders. This archive has to be of the folder containing the Laravel setup, for e.g. if our setup looks like the following

public_html
           |__ app (folder)
           |__ bootstrap (folder)
           |__ .... (other folders)
           |__ .env (file)
           |__ composer.json (file)
           |__ .... (other files) 

We would make the archive or a zip/gz/bz2 file of the public_html folder. Typically on your PC you would right-click on public_html folder and do the necessary steps to prepare the archive.

Also you need to get the SQL file corresponding to your project setup. That you can easily get/export from PHPMyAdmin which most likely would be installed on your system or the system from where you are migrating from.

Step 2 : Now in N99panel, create a user and a Website/VHost under it

Step 3 : Also now create a MySQL DB and a user pair. The same DB would be populated/used later

Step 4 : Upload both the archive file and the sql (can be zipped) file into the user directory using a SFTP client like FileZilla

Step 5 : Now under N99panel dashboard, click on 'VHosts/Websites'

Step 6 : You will see the list of all the VHosts. Please click 'Details/Manage' link against the appropriate VHost/Website

Step 7 : Now click on ‘Restore an Archive to the VHost’ .


Step 8 : Now you would be prompted to enter the uploaded archive file name. Click Submit to restore the archive.

Restoration of large archives can take time. Please ensure from from Dashboard » Tasks, that all the requisite tasks are completed before going on to the next steps.

Step 9 : Restore the uploaded SQL file to the DB. For a new Laravel setup, this step may not be required.

Step 10 : Modify the .env file of your Laravel project with the appropriate settings especially w.r.t. MySQL

Step 11 : Now if you are using Laravel 8 or before, and if index.php files are present in both the Laravel setup directory, and the public directory within it, your Laravel project should be able to work now.

For Laravel 9 and 10, index.php may not be present in the Laravel setup directory, but the public folder within the base directory will contain the index.php (the start point). Under Laravel 9 and 10, this ensures better security when the document root of the web-server points to that public folder. To make the document root to point to the public folder, we would need to extend the root dir