-
Go to InfinityFree.
-
Click on the Register button.
-
Fill in your email address, password, and agree to the terms of service.
-
Click on the Sign Up button.
-
Verify your email address by clicking on the link sent to your email.
-
Log in to your InfinityFree account.
-
Click on the Create Account button.
-
Choose the option which costs $0.
-
Enter the Subdomain name, choose domain extension and Check Availability.
-
Choose I approve below the Email Consent and click Create Account.
-
Once the nameservers are updated, click on the Create Account button.
-
Wait for the account to be created and your domain to be set up.
-
Click on the File Manager.
-
Open htdocs folder, delete any files present and upload your 4 files (HTML, CSS, JS and PHP).
-
Navigate to the database tab in the Cpanel and click on the MySQL Databases
-
Create a database by any name (E.g. WeatherData) and click on create database
-
Now, the database is finally created.
-
Note down the MySQL DB name somewhere safe (E.g. Notepad).
-
Navigate back to the Cpanel (mentioned above)
-
On the right side of Cpanel you be able to see account details section
-
Copy all the required credentials and save somewhere like Notepad.
- MySQL Hostname
- MySQL Username
-
You will need password too, for that navigate back to this website Dashboard
Copy the password too.
-
Put the saved MySQL hostname in servername (or hostname) variable
-
Put the MySQL username in the username variable
-
Likewise put the saved password in the password variable.
-
Comment out the createDB query (if exists)
-
Put your previously saved database name in the select_db query
-
Save the changes
Previously, we had hosted the weather app locally on your device and on JavaScript we had used the localhost/connection.php path to fetch data but since we are hosting the website on a server so we have to change the path now.
-
Open your JavaScript file.
-
Navigate to this line of code
-
Remove the localhost part and only leave /connection.php?q={city} part.
-
Save the file
If you feel any trouble, contact us on Discord.


















