Knowledgebase

Preparing a Laravel Application for Shared Hosting Print

  • phplaravel, webhosting, php, database, uploads, cron, guide, howto
  • 0

What to establish first.

WHAT TO CHECK

The PHP version available, against the framework's requirement Which PHP extensions are present Whether terminal access is available on your plan Whether Composer can be run

WHY THOSE

Laravel requires specific extensions and a recent PHP version.

WHAT TO DO IF TERMINAL ACCESS IS UNAVAILABLE

Install dependencies elsewhere and upload them Run commands through cron, where necessary

WHAT TO PLAN

Where the application files will live How the public directory will be served How the database will be created How deployment will happen

WHAT NOT TO DO

Upload a Laravel project into the public directory as it stands.

WHY

Everything outside the public folder would become reachable by a browser, including your configuration file.

WHAT THAT EXPOSES

Database credentials, keys, and your entire source.

WHAT TO ARRANGE INSTEAD

Application files outside the served directory, with only the public contents served.

WHAT TO PREPARE LOCALLY

A working application, tested.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot