Awesome! You’re totally done now with your PHP project. And the next challenge is how can you make this available all throughout the web? For starters, this could be challenging but after you read this article. I am definitely sure you will up your project in no time.
Step 1: Find a good hosting company that suits your needs.
It is better to make sure that the hosting company you wanted to use must be 24/7 and 99.9% SLA Uptime! Because who doesn’t want a website that goes down frequently. I also recommend searching for a company that has cPanel, because I swear it will make your life much more easier.
And if you don’t have any web hosting company in your mind you may want to look into our Web Hosting packages.
Step 2: ZIP your project
To make your deployment easier and faster, you must zip archive all your PHP files before transferring it over FTP. The reason why you need to archive it because for a PHP project there are chances that there will be more than 100 files you will upload, and you don’t want to overload the I/O of your server just because you’re uploading.
Step 3: Upload your ZIP file
I assume you’re using cPanel for uploading your project. All you need to do is go to File Manager and open the public_html. Once you’re inside, click the Upload button and drag and drop the ZIP file.
Once complete, return back to the public_html folder and Extract the archive.
That’s it! You should be able to access your project now. Go ahead and try to visit the domain you of your project. If you are having an issue with the database connection please continue below.
Step 4: Setup your MySQL Database
This step is optional, and you will only do this if you are using MySQL on your project. To do this, simply go to MySQL® Databases on your cPanel and fill up the New Database field under Create New Database
And click the Create Database button once you filled up the database name. Please be mindful of the prefix for your database name. In this case, my database name will be butete4layf_myFirstDatabase
Once added, go back to MySQL Databases and scroll down until you reached the MySQL Users, and this time we will create MySQL user for your database.
Fill up the Username and Password (make sure it is Very Strong) and then click the Create User button. Again be mindful with the prefix under your Username. In this case, your username will be butete4layf_myNewMySQLAccount
Once created, go back again to MySQL Databases and scroll down again until you reach the Add User To Database. Select the User and Database you previously created and click the Add button.
Inside the Manage User Privileges, check the ALL PRIVILEGES checkbox to allow full access, and click the Make Changes button to set the privileges to your user.
And there you have it! Your MySQL is now ready, and if you need to upload your SQL dump files you need to open the phpMyAdmin which can be located at the homepage of your cPanel. Make sure to update your Database Connection! 🙂
If you have questions or clarifications please don’t hesitate to leave a comment. If this helps you a lot please share this over your Social Media.