Your website runs perfectly on localhost (only you can access to your website), but now you want your friends, coworkers, and everybody to be able to see your achievement. Alternatively, you may have been dissatisfied with current hosting providers and now wish to try out 1Byte’s web hosting service.
Prerequisites
1) Web Hosting or Cloud Server
→ In this tutorial, I will be using Shared Hosting + cPanel
(If you want to upload your website to Cloud Hosting, please check this POST)
2) Domain name
→ A domain name is required for Web Hosting. If you don’t have a domain, purchase here.
3) Your website data
Let’s get started
Step 1: Config your domain point to your Shared Hosting
- Go to User Dashboard
- Select Domain at the left menu bar
- Select Manage button at the domain you want to point
- At the nameserver section, choose 1Byte DNS
Step 2: Basic check at cPanel control
- Go to User Dashboard
- Select Shared Hosting at the left menu bar
- Choose the Shared Hosting server where your website will be hosted
- Click on cPanel to go cPanel Dashboard
On the right side of the cPanel Dashboard, please be sure that your domain name is shown up in here
Step 3: Upload your website data into this Shared Hosting
At cPanel Dashboard, navigate to Files section and select File Manager
Go to the public_html directory (1), then upload your website data (2), finally extract the zip file (4)
Step 4: Try to access your domain name to see whether your website is up and running
Step 5: Setting up the database, and connecting the database to your website
NOTE: If your website is basic and does not need a database, you may skip this step entirely.
- Go back to cPanel Dashboard
- Navigate to Databases section and select MySQL® Databases
Inside the MySQL® databases, you need to create 3 things
1) Create a database for your website
2) Create a user for the database
3) Add the user into the database
4) Grant privileges to this user
Step 6: Import your website’s database into the Shared Hosting database via cPanel
- Go back to cPanel Dashboard
- Navigate to Databases section and select phpMyAdmin
Now import your database into phpMyAdmin on Shared Hosting
Step 7: Configure your database connection PHP file
You must first know the following information before proceeding with this step.
1) What port does phpMyAdmin use?
2) Which file should be used to establish a connection to MySQL?
3) What is the name, username, password of the database (already in Step 5)?
- DB_Name: yyxscwziwezmbmnu_ blog
- DB_Username: yyxscwziwezmbmnu_ admin
- DB_Password: *****
→ We will use this info to adjust the file dbconnect.php
After you have the aforementioned information, go to the Files section of your cPanel Dashboard, click File Manager, search for the PHP file used to connect to phpMyAdmin on Shared Hosting
As previously noted, the dbconnect.php file is used to connect to phpMyAdmin. And we need to update the information in the file as below
Step 8: Re-check again
Now you need to check to see if there are any more errors? whether your website can use the database from phpMyAdmin on Shared Hosting or not?
Conclusion
After reading this post, you should be able to upload your website to the 1Byte platform and move your existing website over to 1Byte.