Podcast Title

Author Name

0:00
0:00
Album Art

How to Deploy Your PHP Project to InfinityFree for Free

By 10xdev team August 01, 2025

In this article, I will show you how you can upload your PHP project to InfinityFree.

Signing Up and Creating an Account

First, you have to sign up on their website. Go to the InfinityFree website and click on the Sign Up Now button.

On the registration page, follow these steps: 1. Enter your email address. 2. Enter a unique password. 3. Accept the agreement. 4. Click on Create New Profile.

InfinityFree will send a verification email to your address. Go to your inbox and open the email. You can click the verification button or the link provided to confirm your account.

Once verified, you will be successfully signed in. The next step is to create a hosting account. From the home page, navigate to the account page and click Create an Account. You can create up to three accounts.

On the account creation screen: 1. Choose a Domain Name: Select the Subdomain option for a free domain. Enter a name for your subdomain, for example, tutorial-for-infinity. 2. Select a Domain Extension: You can choose from several available domain extensions. 3. Check Availability: Click the button to ensure the domain is available. 4. Account Details: You can provide an account label if you wish. The username will be generated automatically. Enter a strong password for the account. 5. Create Account: Click the Create Account button and solve the CAPTCHA to verify.

Your account will be created, and you'll be provided with a username. Click Finish.

After creation, if you visit your new domain immediately, you might see a default page. This is normal, as it can take some time for the account to be fully set up.

Let's return to the client area. Here, you can see your account details, including your username, password, and MySQL database details like the username, password, and hostname.

Uploading Project Files

While you can upload files using the File Manager link in the client area, this guide will show you how to do it via the Control Panel for more options.

  1. Click on Control Panel. A new page will open, which may look like a pop-up. Click I Approve to proceed.
  2. This is the main control panel, which has many functionalities. For a PHP project, we will focus on uploading files and the database.
  3. Click on Open File Manager.
  4. Inside the file manager, navigate into the htdocs folder. Do not upload your files to the root directory.
  5. You can delete the default files present in the htdocs folder.
  6. Click the Upload button. You will see options to upload files, a folder, or a zip archive. Choose the option that suits your needs.
  7. Select all your project files and begin the upload.

Note: The file manager can sometimes throw an error or fail to upload certain files. If this happens, you can cancel the process. Some files may have been successfully uploaded. You can then attempt to upload the remaining files in a second try. After the upload completes, it's crucial to check every single file and folder to ensure nothing is missing.

Creating and Importing the Database

Now that the files are uploaded, we need to set up the database.

  1. Go back to the control panel and find the Databases section. Click on phpMyAdmin.
  2. You will see a message stating that no database exists. You must first create one. Click the provided link to create a new database.
  3. Give your database a name (e.g., demo) and click Create Database.
  4. Your database will be created. You can find more details about it in the client area under MySQL Details.
  5. To upload your database file, click the Admin button next to your new database. This will open phpMyAdmin.
  6. Inside phpMyAdmin, you'll see that the database structure has no tables. Click on the Import tab.
  7. Click Choose File and select your local database SQL file.
  8. Click the Go button to upload it.

Once the import is successful, you can click on the Structure tab to see your imported tables.

Configuring the Database Connection

After uploading your files and database, you must configure your application to connect to the new database.

  1. In the file manager, locate your configuration file (e.g., config.php).
  2. Open the file for editing. The current settings are likely for a localhost environment and need to be updated.
  3. Find the following credentials in your InfinityFree client area and control panel:
    • DB Server (Hostname): You can find this in the client area under MySQL Details or on the database page in the control panel.
    • DB Username: Copy this from the client area.
    • DB Password: This is only available in the client area. You may need to click a "Show" button to view it.
    • DB Name: This is shown on the database page in the control panel.
  4. Copy and paste these new values into the appropriate variables in your configuration file.
  5. Save and close the file.

With everything uploaded and configured, you just need to wait for the hosting setup to complete. After about an hour, your domain should be live. You can test it by adding a record through your application and then checking the database in phpMyAdmin to see if the record was added successfully.

Securing Your Domain with SSL

You may notice a "Not Secure" warning in the browser's address bar. InfinityFree provides a free SSL certificate to fix this.

  1. In the control panel, click on Free SSL Certificate.
  2. Click New SSL Certificate.
  3. Enter your domain name (e.g., tutorial-for-infinity.epizy.com) without the http:// prefix and click Continue.
  4. You will be presented with over 3+ SSL certificate providers. I will select the GoGetSSL Certificate. Review the requirements and choose the one that fits your needs.
  5. Your SSL certificate order has been created. The next step is to add CNAME records to your cPanel.

You can try adding the records automatically by clicking the Set up CNAME records automatically button. However, sometimes this fails, and you have to add them manually.

To add CNAME records manually: 1. Go to your cPanel and scroll down to the Advanced section. 2. Click on CNAME Records. 3. You need to add the Record Name and Destination provided on the SSL setup page. 4. Copy the Record Name into the Source field and the Destination into the Destination field, then click Add.

After the CNAME record is added (either automatically or manually), you need to wait. It can take up to an hour for the changes to take effect. You will receive an email once the certificate has been issued.

Once you receive the email, open it and click the link to view your SSL certificate. You will be given a Private Key and a Certificate.

There are two ways to install the certificate: * Automatically: Click the Install SSL Certificate Automatically button. * Manually: Go to your cPanel, find the Security section, and click on SSL/TLS. Here you can paste the Private Key and Certificate manually and click the upload buttons.

The automatic installation is recommended. After installation, it can take up to 15 minutes for the certificate to become active.

Finally, go to your website. You may need to clear your browser cache or add https:// in front of your domain name and press Enter. The page will reload, the "Not Secure" warning will be gone, and you will see a lock icon indicating the connection is secure. Your website is now successfully and freely uploaded to InfinityFree.

Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Recommended For You

Up Next