How to Deploy Any Script on cPanel or VPS Server
Deploying your downloaded PHP scripts on a shared cPanel hosting account or a dedicated Linux VPS is straightforward when following these standardized steps.
1. Upload & Extract Files
Access your hosting control panel (cPanel, DirectAdmin, or Plesk) or connect via SFTP:
- Navigate to your document root (usually
public_htmlor a subfolder if setting up a sub-domain). - Upload the downloaded project archive and extract it.
- Ensure files are directly placed inside your web root so that
index.phpsits in the root path.
2. Create a MySQL Database & User
- Open MySQL Databases in your hosting panel.
- Create a new database (e.g.
u123_marketplace). - Create a new database user with a strong password.
- Associate the user with the database and grant ALL PRIVILEGES.
3. Import the SQL Schema
- Open phpMyAdmin from your control panel.
- Select your newly created database from the left sidebar.
- Click on the Import tab at the top.
- Choose the
database.sqlfile included with your download and click Go / Import.
4. Configure Database Credentials
Locate the configuration file (usually config/config.php or .env) and update:
DB_HOST:localhost(or your database server IP)DB_NAME: Your database nameDB_USER: Your database usernameDB_PASS: Your database user passwordBASE_URL:https://yourdomain.com
5. Verify PHP Version
Make sure your hosting PHP version is set to PHP 8.0, 8.1, or 8.2 with pdo_mysql, curl, zip, and fileinfo enabled.
Explore more articles
Need setup assistance, code explanations, or server tutorials?
Was this article helpful?
0 developers found this helpful • Submit your feedback to notify our admin desk
Thank you! Your feedback has been sent directly to the Admin Desk.
Admin notification generated with your details and rating.