The EASIEST way to launch PHP projects to the cloud β no config headaches, just click and go!
PHDeploy is your all-in-one solution to deploy PHP sites instantly to Vercel and Render β even if they only officially support Node.js!
It handles the quirks for you:
- Vercel: Deploy PHP using serverless
/apiendpoints and a simple config file. - Render: Use a ready-to-go Dockerfile for full PHP stack deployments.
No more fighting with settings or manual uploads!
Just fork, upload your files, connect your repo, and watch your PHP app go live.
- β‘ One Click Deploy: Vercel & Render support out of the box.
- π Modern PHP: Uses PHP 8.2+ for maximum compatibility.
- ποΈ /api Power: For Vercel, just drop your PHP files into
/api! - π³ Dockerfile for Render: Zero config needed β works instantly.
- π¦ Web-based Archive Manager: Upload, unzip, and zip files right in your browser.
- π Resource Monitor: See RAM/Disk usage with a pretty UI.
- π Self-contained: No external dependencies.
- π Open Source & Free: MIT Licensed.
-
Fork this repo
Click the βοΈ Star button, then click Fork at the top right.
(You need your own copy to deploy and upload your PHP files!) -
Add your PHP files
- Upload your siteβs PHP files to the
/apidirectory of your forked repo. - Any
.phpfile in/apiinstantly becomes a public serverless endpoint. - Want a home page? Add
/api/index.php.
- Upload your siteβs PHP files to the
-
Push your changes
- Commit and push your changes to your GitHub fork.
-
Deploy to Vercel
- Go to Vercel.
- Import your forked repo, NOT the original!
- Or use the button below (replace the repo URL with your fork if prompted):
-
Done!
- Vercel will build and deploy your PHP endpoints β get your live URL instantly.
- Access endpoints at
https://your-vercel-url.vercel.app/api/yourfile.php.
Vercel uses a serverless architecture for PHP (and all other backends except Node.js):
- Each
/api/*.phpfile is run in a stateless, short-lived serverless function. - No persistent file storage: You can't write to disk or keep files between requests (uploads, zip, etc. won't persist).
- Limited execution time: Functions will be killed after a certain time (10s for Hobby, 60s for Pro).
- Limited memory/CPU: For heavy-duty PHP or long-running scripts, use Render!
- No background jobs, sockets, or cron jobs.
- Cold Starts: First request may be slower after inactivity.
Vercel is perfect for:
- Simple APIs, forms, contact pages, webhooks, and light websites.
- Demos, prototypes, and instant deployments with almost zero config.
Not good for:
- Apps needing file uploads, persistent storage, long scripts, or background processing.
π‘ The easiest: 1-Click Deploy!
OR deploy manually:
-
Fork this repo
- Click Fork above and make your own copy.
-
Upload your PHP files
- Place your site files in your fork (root or any directory you like).
-
Push to GitHub
- Commit and push your changes.
-
Go to Render
- Click "New Web Service", connect your forked repo.
-
1-Click Deploy
- Or use the button above for instant setup!
-
Done!
- Render detects the included
Dockerfileand sets up PHP Apache for you. - Your PHP site is now live, with full file system and persistent storage.
- Render detects the included
Render is better for:
- Full-featured traditional PHP apps (WordPress, Laravel, file uploads, etc.)
- Apps needing persistent storage, background jobs, or cron.
- Custom PHP extensions, Composer, or anything youβd do on a VPS.
Upload .zip, .rar, .gz files and extract them, or zip up folders for download β right from your browser!
Perfect for importing/exporting site contents or assets instantly.
Get real-time RAM and disk stats in a clean dashboard.
Great for checking your Render server health!
/
βββ /api/ # PHP endpoints for Vercel (put your PHP scripts here)
β βββ uz.php # Archive upload/unzip/zip tool
β βββ index.php # System resource monitor
βββ Dockerfile # Magic for Render.com deployment
βββ vercel.json # Vercel config (if needed)
βββ ...
- PHP Version: Edit the
Dockerfileif you need another PHP version. - Vercel Routes: Tweak
vercel.jsonfor custom routing or rewrites. - More Tools: Add your own PHP scripts into
/apiβ they become endpoints!
- No other repo makes deploying a PHP site to Vercel or Render this easy.
- No more uploading/extracting files by hand β use the built-in web tools!
- Zero lock-in, zero cost, zero learning curve.
If you found this helpful, please star this repo!
It helps others discover PHDeploy and motivates future updates.
PRs, issues, and feedback are welcome! Open an issue or submit a pull request.
MIT
FAQ
Q: Can I use this for any PHP project?
A: Yes! Just copy your PHP scripts into /api for Vercel, or anywhere for Render.
Q: Does it support Composer or frameworks?
A: For complex setups, use the Dockerfile and deploy to Render for best results.
Q: Is it secure?
A: This is a starter/project template. Secure your endpoints before going to production.
Q: How do I upload files on Vercel?
A: Vercel doesnβt support persistent file storage. Use Render for file uploads or anything that needs to save files.
Q: Can I use PHP sessions or cookies?
A: Yes, but remember: serverless functions on Vercel are stateless. Store session data externally if you need persistence.
Q: Can I use a database?
A: Yes! Both Vercel and Render work great with remote DBs like MySQL, PostgreSQL, or SQLite (on Render).
Q: How do I add more endpoints?
A: Just add more .php files to /api (for Vercel) or anywhere (for Render). Thatβs it!
Q: How do I update my site?
A: Just push new commits to your fork on GitHub β Vercel/Render will rebuild and redeploy automatically!
Made with π by maruf009sultan