Complete Tutorial: Deploying a Website on InfinityFree
InfinityFree is one of the most popular free web hosting platforms. It allows you to host HTML, CSS, JavaScript, PHP, WordPress, and MySQL websites without paying for hosting. It includes free subdomains, FTP access, MySQL databases, SSL support, and Softaculous for WordPress installation.
Step 1: Create an InfinityFree Account
- Visit InfinityFree
- Click Register.
- Verify your email address.
- Login to the Client Area.
Step 2: Create a Hosting Account
- Click Create Account.
-
Choose either:
-
A free subdomain (e.g.,
mywebsite.epizy.com) - Your own custom domain
-
A free subdomain (e.g.,
- Click Create Account.
- Wait for account activation (usually a few minutes).
Step 3: Open the Control Panel
After your hosting account is created:
- Go to Accounts.
- Click Control Panel beside your hosting account.
- InfinityFree will open VistaPanel, which functions similarly to cPanel.
Step 4: Prepare Your Website Files
Your website should be organized like this:
website/
├── index.html
├── about.html
├── css/
│ └── style.css
├── js/
│ └── script.js
└── images/
For PHP websites:
website/
├── index.php
├── config.php
├── assets/
└── includes/
Step 5: Upload Files
Option A: Using Online File Manager
- Open Online File Manager.
- Navigate to:
htdocs
- Delete any default files.
- Upload your website files.
- Ensure your homepage is named:
index.html
or
index.php
All website files must be uploaded into the htdocs directory.
Option B: Using FileZilla (Recommended)
Download:
Then:
- Login to InfinityFree.
- Open FTP Details.
-
Copy:
- FTP Host
- FTP Username
- FTP Password
- Open FileZilla.
- Enter:
Host: FTP Hostname
Username: FTP Username
Password: FTP Password
Port: 21
- Connect.
- Navigate to:
htdocs
- Drag your website files from your computer into the htdocs folder. FTP is the most reliable upload method on InfinityFree.
Step 6: Create a Database (For PHP or WordPress Sites)
If your site uses MySQL:
- Open MySQL Databases.
- Create a database.
- Create a database user.
- Assign the user to the database.
-
Note:
- Database Name
- Username
- Password
- Database Hostname
- Open phpMyAdmin.
- Import your SQL backup file.
Step 7: Configure Database Connection
Update your PHP configuration:
<?php
$host = "sqlXXX.infinityfree.com";
$user = "your_username";
$pass = "your_password";
$db = "your_database";
$conn = mysqli_connect($host,$user,$pass,$db);
?>
InfinityFree usually uses a specific database hostname rather than localhost.
Step 8: Connect Your Custom Domain
If you already own a domain:
Example:
ccyiglobalenterprise.com
- Go to your domain registrar.
- Change nameservers to those provided by InfinityFree.
- Add the domain inside InfinityFree.
- Wait for DNS propagation (up to 24–72 hours).
Step 9: Enable SSL (HTTPS)
- Open SSL/TLS section.
- Request a free SSL certificate.
- Install the certificate.
-
Force HTTPS using
.htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
InfinityFree supports free SSL certificates and HTTPS.
Step 10: Install WordPress (Optional)
InfinityFree includes Softaculous.
- Open Softaculous Apps Installer.
- Select WordPress.
- Click Install.
-
Enter:
- Site Name
- Username
- Password
- Finish installation.
WordPress can be installed without manually uploading files.
Common Errors and Solutions
| Problem | Solution |
|---|---|
| Blank page | Enable PHP errors and check file paths |
| 404 Error | Ensure files are inside htdocs |
| Database error | Verify DB hostname and credentials |
| Website not loading | Wait for DNS propagation |
| FTP connection failed | Verify FTP credentials |
| SSL not working | Install SSL and force HTTPS |
Recommended Workflow for Your CCYI Website
Since you manage websites and Moodle platforms:
- Design locally using WordPress or HTML.
- Test on XAMPP.
- Upload via FileZilla.
- Use a custom domain.
- Enable SSL.
- Configure Cloudflare for better performance.
- Regularly back up files and databases.
This approach works well for:
- CCYI Global Enterprise
- CCYI Digital Academy
- Portfolio websites
- Small business websites
- Student projects
If you want, I can also provide a step-by-step guide for deploying a WordPress website on InfinityFree with your own domain name from Nigeria (Whogohost, DomainKing, SmartWeb, etc.), including screenshots and DNS settings.
No comments:
Post a Comment