You built your PHP MySQL project locally on XAMPP. Now it's time to make it live. This guide walks you through every step — from creating your database to uploading your files — no server knowledge required.
Unlike Node.js frameworks, PHP runs natively on virtually every shared hosting server. Providers like Hostinger, Bluehost, and GoDaddy all support PHP + MySQL out of the box — no extra configuration, no runtime to manage.
| Technology | Works on Shared Hosting | What you need |
|---|---|---|
| PHP | ✓ Native | Upload .php files to public_html |
| MySQL | ✓ Included | Create DB via cPanel → phpMyAdmin |
| Node.js / Next.js | ✗ Needs server | Requires VPS or static export |
localhost/phpmyadmin, select your database, click Export, choose "Quick" format and download the .sql file. This is your full database backup.
.sql file, and click Go. Your tables and data are now live.
db.php (or wherever your DB connection is defined) and replace the local credentials with your live hosting credentials before uploading.
public_html → Upload all your PHP project files here. Make sure index.php is at the root of public_html.
// Local XAMPP config
$host = 'localhost';
$dbname = 'myproject';
$username = 'root';
$password = '';
// Live shared hosting config
$host = 'localhost'; // usually still localhost
$dbname = 'cpanelusername_dbname';
$username = 'cpanelusername_dbuser';
$password = 'your_strong_password';
myaccount_dbname). Copy the exact names from the MySQL Databases page.
localhost on shared hosting — the database server runs on the same machine as the web server, just like XAMPP.
ini_set('display_errors', 1); at the top of index.php to see the actual error.
C:\xampp\htdocs\... — use relative paths like ./css/style.css or root-relative paths like /css/style.css.
755 and file permissions to 644 via File Manager → right-click → Change Permissions.
Watch the complete video walkthrough — from XAMPP to live server — on the Thapa Technical YouTube channel with 600k+ subscribers.
Watch on YouTube/courses/backend/online-python-course.php — Python for backend devs