Shared Hosting

Traditional Deployment

Deploy your application using FTP clients (FileZilla) or ZIP uploads (cPanel). Ideal for standard shared hosting environments where containerization isn't available.

Step-by-Step Guide

1

Prepare for Production

Compile your assets to ensure CSS and JavaScript are optimized and minified.

npm run build
2

Exclude Development Files

When selecting files to upload, specifically exclude the node_modules/ directory. PHP dependencies in vendor/ should be included.

3

Upload Files

Upload the contents of your project root to the public_html (or equivalent) directory on your server.

Option A: ZIP Upload

Compress your project (excluding node_modules), upload via cPanel File Manager, and unzip.

Option B: FTP

Use FileZilla to transfer files. Ensure hidden files like .env and .htaccess are transferred.

4

Environment Configuration

Create or edit the .env file on the server.

.env (Production)
# Disable error display for security
SHOW_ERRORS="false"

# Set environment to production
APP_ENV="production"
APP_TIMEZONE="UTC"

# Update Database Credentials
DATABASE_URL="mysql://user:password@localhost:3306/prisma_php"
5

Verify Permissions

Ensure the web server has correct permissions. Folders should generally be 755 and files 644.

Directory Requirement
/prisma Read access for configuration.
/settings Read access for app settings.
/src Read access for application logic.

Recommended Structure

Your production file listing should look similar to this:

File Tree
public_html/
├── prisma/           # Core framework files
├── settings/         # Configuration
├── src/              # Your application code
├── vendor/           # PHP Dependencies
├── .env              # Environment variables
├── .htaccess         # Apache rules
├── bootstrap.php     # App entry point
├── composer.json
├── composer.lock
├── package.json
└── prisma-php.json

Secure .env

Prisma PHP's default .htaccess protects your sensitive files. Double-check that http://yourdomain.com/.env returns a 403 Forbidden error.

HTTPS & Cron

Enable SSL/HTTPS via your hosting panel. If you have scheduled tasks, set up Cron jobs pointing to your Prisma PHP CLI entry point.