Installation Guide

Choose your setup method below. Each guide includes a video tutorial and detailed written instructions. Follow the steps carefully in order.

Video Tutorial
Step-by-Step Instructions
1

Download & Install XAMPP

XAMPP is a free software package that installs Apache (web server), MySQL/MariaDB (database), and PHP on your computer. This allows you to run PHP projects locally without any hosting.

  • Go to the official XAMPP website and download the latest version for your operating system (Windows, macOS, or Linux)
  • Make sure to download the version with PHP 8.0 or higher — this project requires PHP 8+
  • Run the installer and keep all default settings — click Next through each screen
  • Choose the installation directory (default is C:\xampp on Windows)
  • Wait for the installation to complete and click Finish
Download XAMPP
2

Start Apache & MySQL Services

After installing XAMPP, you need to start two services that are required to run PHP projects:

  • Apache — This is the web server that processes PHP files and serves your website in the browser
  • MySQL — This is the database server that stores all your project data (users, settings, files, etc.)

Open the XAMPP Control Panel from your Start Menu or Applications folder. You will see a list of services. Click the Start button next to both Apache and MySQL. When they are running successfully, their names will turn green.

Apache won't start? This usually means port 80 is already in use by another program (like Skype, IIS, or another web server). To fix this: Open XAMPP Control Panel → Click Config next to Apache → Open httpd.conf → Change Listen 80 to Listen 8080 → Save and restart Apache. Your project URL will then be http://localhost:8080/ instead.
Important: You must start Apache and MySQL every time you want to work on your project. They don't run automatically after a computer restart.
3

Open phpMyAdmin & Create a New Database

phpMyAdmin is a web-based tool for managing MySQL databases. You will use it to create an empty database for your project. Follow these sub-steps carefully:

  • Open your web browser (Chrome, Firefox, Edge, etc.)
  • Type http://localhost/phpmyadmin in the address bar and press Enter
  • phpMyAdmin will open — you'll see a list of existing databases on the left sidebar
  • Click "New" at the top of the left sidebar
  • In the "Database name" field, type a name for your database (e.g. rameez_scripts)
  • In the "Collation" dropdown, select utf8mb4_general_ci (this supports all languages and emojis)
  • Click the "Create" button
Write down the database name you chose — you will need to enter it in the .env file in Step 5. You do NOT need to create any tables — the setup script will do that automatically in Step 6.
4

Copy Project Files to XAMPP htdocs Folder

The htdocs folder is where XAMPP looks for your website files. Any folder you place inside htdocs becomes accessible in your browser at http://localhost/folder-name/.

  • If you downloaded the project as a .zip file, first extract/unzip it
  • Copy the entire extracted project folder
  • Paste it into the htdocs directory

The htdocs location depends on your operating system:

# Windows C:\xampp\htdocs\your-project-folder\ # macOS /Applications/XAMPP/htdocs/your-project-folder/ # Linux /opt/lampp/htdocs/your-project-folder/
Use a simple folder name without spaces or special characters (e.g. rameez-scripts or my-project). This makes the URL easier to type in the browser.
5

Configure the .env File (Database Credentials)

The .env file is the environment configuration file that stores your database connection details. The project reads this file to know how to connect to your MySQL database. Open this file with any text editor (Notepad, VS Code, Sublime Text, etc.).

You will see these variables — update them with your database details:

# Database Configuration for XAMPP DB_HOST=localhost # The database server address (always localhost for XAMPP) DB_NAME=rameez_scripts # The database name you created in Step 3 DB_USER=root # Default XAMPP username is "root" DB_PASSWORD= # Default XAMPP password is blank (leave empty)

Here's what each variable means:

  • DB_HOST — The server where your database is running. For XAMPP, this is always localhost
  • DB_NAME — The exact name of the database you created in phpMyAdmin (Step 3)
  • DB_USER — The MySQL username. XAMPP's default is root
  • DB_PASSWORD — The MySQL password. XAMPP's default is empty (no password), so leave it blank after the = sign
Common mistake: Make sure there are no extra spaces before or after the = sign, and no quotes around the values. The format should be exactly DB_NAME=rameez_scripts with no spaces.
6

Run setup.php — Automatically Create All Database Tables

The setup.php script is included with the project. When you run it, it will automatically:

  • Connect to your database using the credentials from the .env file
  • Create all required database tables (users, files, settings, payments, etc.)
  • Insert default configuration data and admin accounts
  • Set up all indexes for optimal performance

To run it, open your browser and go to:

http://localhost/your-project-folder/setup.php

Wait for the script to finish. You should see green success messages for each table that was created.

No manual table creation needed! The setup script handles everything. You only need to create the empty database in Step 3 — all tables, columns, and data are created automatically by this script.
Getting errors? If you see red error messages, the most common causes are: (1) Wrong database name in .env — double-check it matches Step 3. (2) Apache or MySQL is not running — go back to Step 2. (3) The .env file has extra spaces or typos. Fix the issue and refresh the page to try again.
7

Access Your Project — You're Done!

Your PHP project is now fully set up and running on your local computer. Open your browser and go to:

http://localhost/your-project-folder/

You should see the project's login page or homepage. Your project is now running locally and you can start using it!

What's next? Log in with the default credentials (if provided with your project), explore the admin panel, and start customizing the project to your needs. If you need to send emails (password reset, notifications), continue to the SMTP Configuration tab above.
Video Tutorial
Don't have hosting yet? Get 20% OFF on Hostinger using our referral link — Buy Hostinger with 20% Discount. Affordable, fast, and perfect for PHP + MySQL projects.
Step-by-Step Instructions
1

Log in to Hostinger hPanel

Hostinger uses its own control panel called hPanel (not cPanel). This is where you manage your website, databases, files, and settings.

  • Go to hpanel.hostinger.com in your browser
  • Log in with your Hostinger account email and password
  • You'll see a list of your websites/domains — click on the domain where you want to install this project
  • This will open the dashboard for that specific website
2

Create a MySQL Database

You need to create a database on Hostinger's server to store all your project data. Follow these steps:

  • In the left sidebar of hPanel, go to Databases → MySQL Databases
  • Under "Create New MySQL Database and Database User", you'll see three fields:
  • Database Name — type a name (e.g. rameez_scripts). Hostinger will automatically add a prefix like u123456789_
  • Username — type a username. Hostinger will also add the same prefix
  • Password — click Generate for a strong password, or type your own
  • Click "Create"
Important — Save these 3 credentials now! After creation, Hostinger will show you the full database name (e.g. u123456789_rameez_scripts), full username, and password. Copy all three and save them somewhere — you will need them in Step 4 for config.php.
Note about the prefix: Hostinger automatically adds your account prefix (like u123456789_) to both the database name and username. You must use the full name with the prefix in your config file, not just the short name you typed.
3

Upload Project Files to Hostinger

The public_html folder on Hostinger is the root directory of your website — any files placed here will be accessible at https://yourdomain.com/. Here's how to upload your project:

  • In hPanel, go to Files → File Manager
  • Navigate to the public_html folder (click on it to open it)
  • If you want the project at your main domain (yourdomain.com), upload files directly into public_html
  • If you want it in a subfolder (yourdomain.com/project), first create a new folder inside public_html
  • Click the Upload button (top toolbar) and select your project .zip file
  • After the upload finishes, right-click on the .zip file and select "Extract"
  • Make sure all files are in the correct directory (not nested in an extra subfolder)
Pro tip: Always upload as a single .zip file and extract on the server. This is 10-20x faster than uploading hundreds of individual files. After extracting, you can delete the .zip file to save disk space.
4

Configure the config.php File (Database Credentials)

Unlike localhost where we edit the .env file, on Hostinger you need to update the config.php file with your database credentials. Here's how:

  • In File Manager, find and open config.php (click on it, then click Edit in the top toolbar)
  • Look for the database configuration section near the top of the file
  • Update the four values with your Hostinger database credentials from Step 2:
// Database configuration — update these with your Hostinger credentials $host = 'localhost'; // Keep as localhost on Hostinger $dbname = 'u123456789_rameez_scripts'; // Full database name WITH prefix $username = 'u123456789_rameez_scripts'; // Full username WITH prefix $password = 'YourStrongPassword123'; // The password from Step 2

Here's what each variable connects to:

  • $host — The database server. On Hostinger, this is always 'localhost'
  • $dbname — The full database name including the Hostinger prefix (e.g. u123456789_rameez_scripts)
  • $username — The full database username including the prefix
  • $password — The database password you set or generated in Step 2

After editing, click Save (or press Ctrl+S) in the File Manager editor.

Common mistake: Using the short name (e.g. rameez_scripts) instead of the full name with prefix (e.g. u123456789_rameez_scripts). Always use the complete name as shown in hPanel after database creation.
5

Run setup.php — Automatically Create All Database Tables

Just like on localhost, the setup.php script will automatically create all the database tables your project needs. Open your browser and go to:

https://yourdomain.com/setup.php

Wait for the script to finish processing. You should see green success messages confirming each table was created successfully.

All tables are created automatically! You only created the empty database in Step 2. The setup.php script creates all tables, columns, indexes, and default data. No manual SQL work is needed.
Seeing errors? The most common cause is incorrect credentials in config.php. Go back to Step 4 and double-check: (1) You're using the FULL database name and username with Hostinger prefix. (2) The password is correct — copy-paste it to avoid typos. (3) The host is set to localhost.
6

Access Your Live Project — You're Done!

Your PHP project is now live on the internet! Visit your domain to see it:

https://yourdomain.com/

You should see the project's login page or homepage, now accessible to anyone on the internet.

SSL/HTTPS: Hostinger provides free SSL certificates. If your site shows as "Not Secure", go to hPanel → Security → SSL and make sure SSL is installed and active. It may take a few minutes to activate. Once active, your site will use https:// automatically.
What's next? Log in with the default credentials, explore the admin panel, and configure your project settings. If you need email functionality (password resets, notifications), continue to the SMTP Configuration tab above.
Video Tutorial
Step-by-Step Instructions
1

Why Do You Need SMTP?

SMTP (Simple Mail Transfer Protocol) is the standard method for sending emails from a web application. Your PHP project uses email for several important features:

  • Password Reset — When users forget their password, a reset link is sent via email
  • Email Verification — Confirming that a user's email address is real and belongs to them
  • Notifications — Sending alerts about new files, purchases, or account activity
  • Contact Forms — Receiving messages from visitors who fill out your contact form

Without proper SMTP configuration, PHP's built-in mail() function will fail or emails will go straight to spam. SMTP uses authenticated servers (like Gmail or Hostinger) to send reliable emails that actually reach the inbox.

Option A: Gmail SMTP
2

Generate a Gmail App Password

Gmail requires a special App Password for third-party applications (like your PHP project). You cannot use your regular Gmail password — it will be rejected for security reasons. Follow these steps:

  • Go to myaccount.google.com and sign in to your Gmail account
  • Click on Security in the left sidebar
  • Under "How you sign in to Google", make sure 2-Step Verification is ON. If it's off, you must enable it first (Google requires this before allowing App Passwords)
  • After enabling 2-Step Verification, go back to the Security page
  • Search for "App Passwords" in the search bar at the top, or find it under 2-Step Verification settings
  • Click on App Passwords
  • Under "Select app", type a name like "My PHP Project"
  • Click Create
  • Google will show you a 16-character password (like abcd efgh ijkl mnop). Copy this immediately!
Important: Google only shows the App Password ONCE. If you close the window without copying it, you'll need to generate a new one. Also, NEVER use your regular Gmail password for SMTP — it will be rejected.
3

Gmail SMTP Settings

Use these exact settings when configuring Gmail SMTP in your project:

SMTP Host: smtp.gmail.com SMTP Port: 587 Encryption: TLS SMTP Username: your-email@gmail.com # Your full Gmail address SMTP Password: abcdefghijklmnop # The 16-char App Password from Step 2

What is TLS? TLS (Transport Layer Security) is an encryption protocol that secures the connection between your server and Gmail's server. Port 587 with TLS is Gmail's recommended method — it encrypts your email data during transmission so nobody can read it in transit.

Option B: Hostinger SMTP
4

Hostinger Email SMTP Settings

If you're hosting on Hostinger and have created an email account there (e.g. info@yourdomain.com), you can use Hostinger's own SMTP server instead of Gmail. This is recommended for production websites because emails come from your own domain, which looks more professional and has better deliverability.

SMTP Host: smtp.hostinger.com SMTP Port: 465 Encryption: SSL SMTP Username: info@yourdomain.com # Your Hostinger email address SMTP Password: your-email-password # The password for that email account
When to use which? Use Gmail SMTP for testing on localhost or small projects. Use Hostinger SMTP for live/production websites — emails from your own domain (info@yourdomain.com) look more professional and are less likely to be marked as spam.
Testing
5

Test Your Email Configuration

After configuring SMTP, you should test to make sure emails are being sent and received correctly:

  • Try the password reset feature — enter your email on the forgot password page and check if you receive the reset email
  • Try the contact form — send a test message and see if it arrives
  • Check your inbox AND spam/junk folder — the first few emails might go to spam until your domain builds reputation

Common issues and fixes:

  • Emails not sending at all — Double-check your SMTP host, port, username, and password. One wrong character will cause failure
  • Emails going to spam — Configure SPF, DKIM, and DMARC DNS records for your domain. These prove to email providers that you're a legitimate sender
  • "Authentication failed" error — For Gmail, make sure you're using the App Password (not your regular password). For Hostinger, verify the email account exists and the password is correct
  • Connection timeout — Your hosting might block the SMTP port. Contact your hosting provider to unblock port 587 (Gmail) or 465 (Hostinger)
Success! If your test email arrives in the inbox, your SMTP is configured correctly. All email features in your project (password reset, notifications, contact form) will now work automatically.

Need Help?

Stuck on any step? Contact us on WhatsApp for quick assistance or watch more tutorials on YouTube.

WhatsApp Support YouTube Channel