The method for deploying a Laravel 8 application on shared hosting (cPanel) in the absence of SSH is as follows:
Upload your Laravel application files through FTP to the root directory of your shared hosting account.
Create a new MySQL database and user through cPanel's MySQL Database Wizard.
Configure the database settings in the Laravel .env file according to the database name, user, and password you created in step 2.
Set file permissions for Laravel's storage folder to 775 or 777 to ensure Laravel can write to the folder.
Change the document root of your domain to the public folder of your Laravel application.
Modify the .htaccess file in the public folder by adding the following code to prevent access to specific file types:
<FilesMatch "\.(env|json|config.js|config.php|git)">
Order deny,allow
Deny from all
</FilesMatch>
Finally, visit your domain to ensure the Laravel application is properly deployed and configured.
Note: Without SSH access, you may not be able to use some advanced deployment methods that require command line access, such as using Git for deployments or installing Composer packages directly on your server.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-12-16 11:00:00 +0000
Seen: 22 times
Last updated: Oct 06 '21
Why is the search function in PHP & MYSQL not providing relevant results?
How can a web application be developed to send distinct emails upon clicking the SUBMIT button?
Is it possible that the search bar is not able to match data in PHP and MYSQL?
What is an Ansible role that includes integrated modules?
How can Yii2 be connected to a remote MySQL database through SSH?
What is the process for resolving dependencies when installing mysql on ubuntu?