
✅ Steps to Install a PHP Script on Hostinger hPanel
- Log in to hPanel
- Go to Hostinger and sign in.
- Select the hosting plan for your site.
- Upload Your PHP Files
- Open File Manager in hPanel.
- Navigate to the
public_htmlfolder (this is your website’s root). - Click Upload and select your PHP script files.
- If your script is zipped, upload the
.zipfile and use Extract in File Manager.
- Create a Database (if required)
- In hPanel, go to Databases → MySQL Databases.
- Create a new database, username, and password.
- Keep these credentials handy — you’ll need them for your script’s config file.
- Configure Your Script
- Find your script’s configuration file (often
config.phpor.env). - Edit it in File Manager to add your database details:
Php
$db_host = “localhost”;
$db_name = “your_database_name”;
$db_user = “your_username”;
$db_pass = “your_password”;
- Save changes.
- Find your script’s configuration file (often
- Run the Installation
- Visit your domain in a browser.
- If the script has an installer, it will guide you through setup.
- Follow prompts to finish installation.
- Test Your Site
- Check if pages load correctly.
- If you see errors, verify PHP version in hPanel → PHP Configuration and match it to your script’s requirements.
💡 Tip:
If your script needs a specific PHP version or extensions (like mysqli or gd), you can enable them in hPanel → PHP Extensions.
Hey guys, in this blog I will show you how to install PHP script in Hostinger. First, log into your Hostinger H panel. From the hosting section, click on manage. Then from the left menu, choose the domain where you want to install the PHP script. Next, click on file manager. Open the public_html folder. Then click upload at the top. Select file and choose your PHP script. Zip file from your computer. Then click open.
Once the upload is complete, right click on the zip file and select extract. Give your folder a name and click extract. Now open the extracted folder. Presstrl + a to select all the files. Then click on move. Double click the folder path until it shows public_html as the destination and then click move. This will transfer all your PHP files to the main public_html directory, which is your website’s root folder.
After the files have been moved, go back to your hosting or dashboard, and click on your domain link. You’ll now see that your PHP website is live and working. If it’s a simple PHP site, it will load instantly. But if it’s a premium or advanced PHP script, you may see an installation page. In that case, just follow the on-creen setup by clicking start installation.
The installer will guide you through the process. This usually includes entering your database name, username, password, and domain URL. Once the installation completes, your PHP script will be successfully set up on Hostinger. And that’s it.
- Login to hPanel → Select your hosting plan.
- Upload Files →
public_html→ Upload & extract.zipif needed.
- Create Database → MySQL Database + username + password.
- Edit Config File → Add DB credentials (
localhost, name, user, pass).
- Check PHP Version → Match script requirements in PHP Configuration.
- Enable Extensions → Turn on needed modules (e.g.,
mysqli,gd).
- Run Installer → Visit domain & follow setup prompts.
- Test Site → Verify pages load, fix errors if any.
│ 1️⃣ LOGIN │
│ – Go to Hostinger → hPanel → Select site │
└─────────────────────────────────────────────┘┌─────────────────────────────────────────────┐
│ 2️⃣ UPLOAD FILES │
│ – File Manager → public_html │
│ – Upload script (.zip) → Extract │
└─────────────────────────────────────────────┘┌─────────────────────────────────────────────┐
│ 3️⃣ CREATE DATABASE │
│ – MySQL Databases → Create DB, user, pass │
│ – Save credentials │
└─────────────────────────────────────────────┘┌─────────────────────────────────────────────┐
│ 4️⃣ CONFIGURE SCRIPT │
│ – Edit config.php / .env │
│ – Add DB details: │
│ host=localhost │
│ name=DB_NAME │
│ user=DB_USER │
│ pass=DB_PASS │
└─────────────────────────────────────────────┘┌─────────────────────────────────────────────┐
│ 5️⃣ CHECK PHP SETTINGS │
│ – PHP Version → Match script requirements │
│ – Enable needed extensions (mysqli, gd) │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ 6️⃣ RUN INSTALLER │
│ – Visit domain → Follow setup prompts │
└─────────────────────────────────────────────┘
┌─────────────────────────────────────────────┐
│ 7️⃣ TEST & BACKUP │
│ – Verify site loads │
│ – Backup files + DB │
└─────────────────────────────────────────────┘
Color-coded infographic version so it’s visually clear and easy to follow.
🎨 Color-Coded PHP Script Installation Guide — Hostinger hPanel
🟢 Step 1: Login
- Color: Green (Start)
- Action: Go to Hostinger → hPanel → Select your hosting plan.
🔵 Step 2: Upload Files
- Color: Blue (Setup)
- Action: File Manager →
public_html→ Upload.zip→ Extract.
🟠 Step 3: Create Database
- Color: Orange (Important)
- Action: MySQL Databases → Create DB, user, password → Save credentials.
🟣 Step 4: Configure Script
- Color: Purple (Customization)
- Action: Edit
config.phpor.env→ Add:
host=localhost
name=DB_NAME
user=DB_USER
pass=DB_PASS
🔴 Step 5: Check PHP Settings
- Color: Red (Critical)
- Action: PHP Version → Match script requirements → Enable extensions (
mysqli,gd).
🟡 Step 6: Run Installer
- Color: Yellow (Final Setup)
- Action: Visit your domain → Follow installation prompts.
⚪ Step 7: Test & Backup
- Color: White (Maintenance)
- Action: Verify site loads → Backup files + database.
💡 Pro Tip:
Use arrows and icons in your graphic — e.g., a green “play” icon for Step 1, a database icon for Step 3, and a wrench for Step 4 — to make it intuitive.
