Steps to Install a Laravel App on a Shared server
How to Install a Laravel App on a Shared server?
Step 1:
Create a database on the shared server using either MySQL Databases or MySql Database Wizard. ChemiCloud also supports PostgreSQL. Make sure you note down the Database name, Username and Password. This step is critical as the app won't connect to the Database without these details. While selecting User privileges, make sure you allow all the necessary privileges required by the app.
Step 2:
Create an App folder (preferably within Public_html) and set up an FTP account for the folder using the FTP accounts service found within Files. Alternatively, One can use the Cpanel upload service to dump the app files. However, ideally, all the file transfers should happen through FTP to avoid any form of malicious activity.
Step 3:
Configure an FTP client to connect to the App folder created. ChemiCloud supports FTP and SFTP protocols and allows configuration file downloads. Once configured, move the app files to the folder created on the server.
Step 4:
In the app folder, locate the .env file and Update the Database name, username and password.
Step 5:
To admin a domain or a sub-domain, click on the Domains service. Add domain name or subdomain and update the Document Root to {path}/{app_name}/public.
Step 6:
To configure, click on the terminal service (founder under 'Advanced' grouping). Now, run the following Commands:
cd {path}/{app_name}
php artisan cache:clear
php artisan view:clear
php artisan route:clear
composer dump-autoload
The configuration is now complete.
Step 7:
Continue on the terminal window and run migrations. Now, run the following commands to Run migration:
php artisan migrate
php artisan migrate: status
Hopefully the migration is succesful.
Step 8 (Optional):
If you have set up DB seeing, then run the following command to seed
php artisan DB:seed
The app is now ready for use; use the domain or subdomain to access the application. If you encounter issues, check the PHP version of the shared server by clicking on the 'Select PHP version' service under 'Software' Grouping.
Adopting Laravel in a web development company significantly enhances efficiency and code quality, thanks to its comprehensive suite of tools and elegant syntax. The framework's robust features and active community support enable developers to build scalable and secure applications swiftly. Laravel is a particular favourite of the top Web Development Company in Bangalore too. Ultimately, Laravel empowers web development companies to deliver exceptional digital solutions, meeting clients' needs effectively.