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
Prepare for Production
Compile your assets to ensure CSS and JavaScript are optimized and minified.
npm run build
Exclude Development Files
When selecting files to upload, specifically exclude the node_modules/ directory. PHP dependencies in vendor/ should be included.
Upload Files
Upload the contents of your project root to the public_html (or equivalent) directory on your server.
Compress your project (excluding node_modules), upload via cPanel File Manager, and unzip.
Use FileZilla to transfer files. Ensure hidden files like .env and .htaccess are transferred.
Environment Configuration
Create or edit the .env file on the server.
# 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"
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:
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.