Laravel Shared Hosting

From HaFrWiki
Revision as of 15:12, 12 July 2022 by Hjmf (talk | contribs) (Created page with "{{TOCright}} Laravel is not suited for Shared Hosting Servers. However it is possible according an article on Laravel Article <ref>https://laravelarticle.com/deploy-laravel-o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Laravel is not suited for Shared Hosting Servers. However it is possible according an article on Laravel Article [1]

This article focuses on the shared hosting on One Hosting [2]

Introduction

Shared hosting is very popular (Budget hosting), but will not provide the user from ssh access. On One you have ssh access, but the possibility of running commands is limited.

Welcome on the One.com SSH service 

This service offers an environment for you to interact with your files in your
web space, either directly using your shell, or by using secure file transfer
protocols such as SFTP, SCP, RSYNC over SSH.
...  

So you can not deploy or run artisan commands like php artisan serve.

Deployment Steps

  1. Remove the public from the URL.
  2. Export database from the local environment.
  3. Do ZIP your Laravel project.
  4. Create a database in your cPanel.
  5. Import the local exported database into a shared hosting database.
  6. Upload project ZIP file to public_html folder and extract.
  7. Update database details into the config file.
  8. Some security setup.

Remove Public

Export Database

ZIP or SFTP Files

See also

top

Reference

top

  1. https://laravelarticle.com/deploy-laravel-on-shared-hosting LaravelArticle], Deploy Laravel on shared hosting.
  2. One.com, Shared Hosting Provider.