Deployment Guide for Link Datacenter
This guide outlines the steps to deploy your PHP application to Link Datacenter hosting (business.linkdatacenter.net).
Deployment Flowchart
1. Prepare Your Application
- Locate your project files in
c:\xampp\htdocs\mattress. - Select all files (folders
admin,assets,config, etc., and files likeindex.php). - Right-click > Send to > Compressed (zipped) folder. Name it
website.zip.
2. Create MySQL Database
Link Datacenter typically uses cPanel or Plesk. Follow the steps for your specific panel.
Option A: cPanel (Linux Hosting)
- Log in to your hosting account (e.g.,
https://business.linkdatacenter.net/cpanel). - Go to Databases > MySQL Database Wizard.
- Step 1: Create A Database.
- Enter a name (e.g.,
mattress_shop). - Click Next Step.
- Note down the full database name (usually
prefix_mattress_shop).
- Enter a name (e.g.,
- Step 2: Create Database Users.
- Username: Enter a username (e.g.,
shopuser). - Password: Generate a strong password. Copy this password somewhere safe.
- Click Create User.
- Username: Enter a username (e.g.,
- Step 3: Add User to Database.
- Check ALL PRIVILEGES.
- Click Make Changes.
Option B: Plesk (Windows Hosting)
- Log in to your Plesk panel.
- Go to Databases > Add Database.
- Fill in the details:
- Database name:
mattress_shop. - Database server: Default (usually localhost:3306).
- Related site: Select your domain.
- Database user name:
shopuser. - Password: Generate and save a strong password.
- Database name:
- Click OK.
3. Import Database Schema
- Open phpMyAdmin from your control panel (cPanel or Plesk).
- Select your newly created database from the left sidebar.
- Click the Import tab at the top.
- Click Choose File and select
c:\xampp\htdocs\mattress\database.sqlfrom your computer. - Click Go at the bottom.
- Success message will appear.
Database Schema Diagram:
4. Upload Files
- Go to File Manager in your control panel.
- Navigate to the
public_htmldirectory (orhttpdocsin Plesk).- Delete any default "Coming Soon" or
index.htmlfiles.
- Delete any default "Coming Soon" or
- Click Upload.
- Select your
website.zipfile. - Once uploaded, right-click
website.zipand choose Extract (or Decompress). - Ensure all files are in the root of
public_html(not inside a subfolder likewebsite). If they are in a subfolder, select all, move them topublic_html, and delete the empty folder.
5. Connect App to Database
You need to edit config/db.php on the server to use the new database details.
- In File Manager, find
config/db.php. - Right-click and choose Edit.
- Update the variables with the info from Step 2:
- Click Save Changes.
6. Final Verification
- Visit your domain (e.g.,
www.yourbusiness.com). - Test the following:
- Homepage loads correctly.
- Click on a product.
- Try to add an item to the cart.
- Try to log in / register (if functionality exists).