Hostwizly
Find Hosting

How To Host PHP Website On Hostinger (2026 Guide)

Last Updated 13 September 2026 by Jarvis Silva

PHP powers over 75% of the dynamic web. Whether you are deploying a custom PHP/MySQL web app, an open-source portal, or a modern MVC framework, Hostinger's LiteSpeed-powered servers offer industry-leading PHP performance, one-click database management, and support for PHP 8.2+.

In this 2026 tutorial, we show you how to upload your PHP code to public_html, import your MySQL database via phpMyAdmin, and configure database credentials in minutes.

⚡ Quick Steps: Deploying PHP on Hostinger

  1. 1Log in to Hostinger hPanel and open Files > File Manager.
  2. 2Upload your zipped PHP files to public_html and extract them.
  3. 3Under Databases > Management, create a new MySQL database and import your .sql file via phpMyAdmin.
  4. 4Update your PHP database connection file with Hostinger's database name, user, and password (host: localhost).

Hostinger PHP Hosting: Up to 75% OFF + Free Domain

Run your PHP scripts on high-speed LiteSpeed web servers with OPcache, MySQL databases, unlimited free SSL, and daily backups from just $2.49/mo.

Get Now

1. Upload Your PHP Files via File Manager

  1. Log in to your Hostinger hPanel account, select your website, and open Files > File Manager.
  2. Hostinger File Manager tab in hPanel
  3. Open the public_html folder. Compress your project into a .zip file on your computer and upload it.
  4. Right-click the ZIP archive in File Manager and select Extract. Make sure your entry file (index.php) sits directly inside public_html.

2. Create and Configure MySQL Database

If your PHP application uses MySQL or MariaDB to store users, articles, or orders, set up your database in hPanel:

  1. Navigate to Databases > Management in hPanel.
  2. Hostinger MySQL database creation and management
  3. Fill in:
    • MySQL Database name: (e.g., u123456789_app)
    • MySQL Username: (e.g., u123456789_admin)
    • Password: Generate a strong database password
    Click Create.
  4. Next to your new database, click Enter phpMyAdmin to import your database tables using the Import tab.
  5. Open your database connection script (e.g., config.php or db.php) in File Manager and update:

// PHP MySQL Database Connection in Hostinger

$host = "localhost";

$db_name = "u123456789_app";

$username = "u123456789_admin";

$password = "YOUR_DATABASE_PASSWORD";

$conn = new mysqli($host, $username, $password, $db_name);

3. Configure PHP Version & Memory Settings

Hostinger gives you full granular control over PHP modules and environment variables:

  • Go to Advanced > PHP Configuration in hPanel.
  • Under the PHP Version tab, choose PHP 8.2 or PHP 8.3 for maximum security and execution speed.
  • Under the PHP Options tab, you can enable common extensions like curl, gd, mbstring, and openssl.

Frequently Asked Questions

Which PHP versions are supported on Hostinger shared hosting?

Hostinger supports modern PHP versions including PHP 8.1, 8.2, 8.3, and 8.4, as well as legacy versions (PHP 7.4). You can switch PHP versions with one click in hPanel under Advanced > PHP Configuration.

Can I host a Laravel or CodeIgniter PHP framework website on Hostinger?

Yes! Hostinger shared hosting fully supports Laravel, CodeIgniter, and custom PHP applications. You just need to set the public directory as the root folder in hPanel or configure an .htaccess rewrite rule.

Where is the MySQL database host for PHP in Hostinger?

For almost all shared hosting accounts on Hostinger, your MySQL database host is simply 'localhost'. You do not need to enter an external IP address.

How do I increase PHP memory limit or upload_max_filesize on Hostinger?

In hPanel, navigate to Advanced > PHP Configuration > PHP Options tab. Here you can adjust memory_limit (up to 1024M), upload_max_filesize, max_execution_time, and post_max_size with zero coding required.

Related Tutorials:

About the author

I am Jarvis Silva, a tech enthusiast. I have 5 years of experience in website hosting and development, Now sharing all my knowledge related to web hosting and other various tech on the internet through Hostwizly.

Related Articles

How To Point Hostinger Domain To AWS EC2

How To Connect Hostinger Domain To Vercel

How To Check MySQL Version In Hostinger

Host Django Website On Hostinger VPS

How To Add SPF Record In Hostinger

How To Increase WP Memory Limit In Hostinger

How To Download Files From Hostinger File Manager

How To Find FTP Password In Hostinger

How To Add Signature In Hostinger Webmail (2026 Guide)

How To Connect Namecheap Domain To Hostinger

How To Add DKIM Record In Hostinger Email

How To Add DMARC Record In Hostinger

How To Transfer Domain From Wix To Hostinger

How To Switch From Hostinger Website Builder To Wordpress

How To Find IP Address In Hostinger (2026 Guide)

How To Purchase Domain And Hosting From Hostinger

How To Install Wordpress In Hostinger

How To Extract Zip File In Hostinger (2026 Guide)

How To Install Wordpress Theme In Hostinger

How To Backup Emails From Hostinger

How To Connect Hostinger Domain To Shopify

How To Setup Hostinger Email On Outlook (2026 Guide)

How To Setup Hostinger Email On Gmail (2026 Guide)

How To Add TXT Record In Hostinger

How To Add CNAME Record In Hostinger

How To Set A Cron Job In Hostinger

How To Install Wordpress On Subdomain In Hostinger

Deploy Angular App On Hostinger Shared Hosting

How To Change PHP Version In Hostinger

How To Install Moodle On Hostinger

Can You Get Free Hosting On Hostinger? (2026 Truth)

Difference Between Hostinger.com And Hostinger.in

Host Laravel Project On Hostinger Shared Hosting

How To Host Node.js App On Hostinger (2026 Guide)

Host React App On Hostinger Shared Hosting

Is Hostinger Good For Buying A Domain Name? (2026 Review)

How to add hostinger domain to netlify

How To Transfer Domain From Hostinger To Godaddy

How To Uninstall WordPress In Hostinger (2026 Guide)

How To Connect Godaddy Domain To Hostinger

How To Change Server Location In Hostinger (2026 Guide)

How To Host Next.js On Hostinger (Static & SSR 2026 Guide)

How To Create Subdomain In Hostinger (2026 Guide)