Hostwizly

How to host PHP website on Hostinger

Published 14 August 2023 by Jarvis Silva

Made a website using php want to host it then Hostinger is the best web hosting to host your php website and in this tutorial we will see how to host php website on Hostinger.

Hostinger is one cheapest web hosting out there for php made websites, In this tutorial we will host our php website on hostinger's shared hosting plan which provides great features at low cost you can also see other hosting plan of Hostinger if you want.

You can use our web hosting cost calculator to analyze pricing plans of multiple web hostings including Hostinger. So now without wasting any more time let's host our php website.

1. Create an Hostinger account

  • Use this Hostinger discount link and get around 50-70% discount on premium web hosting plan of Hostinger.
  • Choose a hosting plan that suits your needs. The Premium Single Shared Hosting plan is a great starting point for small projects, You can host multiple websites and also get a free domain.
  • Complete the registration and checkout process.

2. Setting up domain

  • Login to Hostinger hpanel.
  • If you had purchased the premium shared hosting plan you would get a free domain you can use it or add a domain from other domain providers.
  • If you are using domain from another provider then you need to point the domain nameservers to hostinger nameservers follow this guide: point domain to Hostinger.

3. Uploading your php code to Hostinger server

After setting up domain follow the below steps:

  • Go to Hostinger dashboard of the website.
  • Under files section click files and under that click on file manager.
  • Hostinger file manager tab
  • Now click on access all files of your website.
  • It will open the file manager, in that there will public_html folder you need enter all your php code inside it.
  • Now go inside the public_html folder.
  • Now zip your entire php code folder.
  • Drag and drop the zip folder inside public_html folder.
  • Right click on the zip folder and click extract.

Now if you visit your website at your domain you should see your website running but if you are using a mysql database you will see a database error then you need to create one in Hostinger and connect it to your php website, Hostinger provides free mysql database which you can use so let's see how to configure it.

Read: Host next js website on Hostinger.

Configure database

Now this only applicable if your website is using mysql database so follow the below steps to configure your database:

  • In your Hostinger dashboard go to database section and click management you should see below page.
  • Hostinger databases section
  • Create a new database by entering your database name, username and password.
  • New database will be created for you can click phpmyadmin and create your tables or import your existing database.
  • Make sure your name and password you used for creating a database at Hostinger is same in your php website code.

Now if you followed every step properly and visit your website you should see your website working and if you still see errors and cannot get your php website running contact Hostinger support they will help you host your website.

I hope you found this tutorial helpful and you were able to host your php website in Hostinger successfully thank you for reading Happy hosting :)

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 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

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 Of Website In Hostinger

How To Purchase Domain And Hosting From Hostinger

How To Install Wordpress In Hostinger

How To Extract Zip File In Hostinger

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

How To Setup Hostinger Email On Gmail

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

How To Get FREE Hosting On Hostinger

Difference Between Hostinger.com And Hostinger.in

Host Laravel Project On Hostinger Shared Hosting

Host Node JS On Hostinger

Host React App On Hostinger Shared Hosting

Is hostinger good for buying domain?

How to add hostinger domain to netlify

How to transfer domain from hostinger to godaddy

How to uninstall wordpress in hostinger

How to connect Godaddy domain to Hostinger

How to change server location in Hostinger

How To Host Next JS Website On Hostinger

How to create subdomain in hostinger