— all systems operational
HCWeb Hosting Centre
Migrations

Migrating a static HTML or PHP site to WHC

Step-by-step for moving a plain HTML site or a custom PHP application — without the WordPress-specific complications.

Published 5 min read

Most migration guides assume you’re moving WordPress. This one is for everyone else — static HTML sites, custom PHP applications, single-page sites, brochure sites, classic LAMP-stack projects without a CMS.

These migrations are usually faster than CMS migrations because there’s no database wrangling and fewer moving parts. Many finish in well under an hour.

What you’ll need

Before you start:

  • All your files — either FTP/SFTP access to your current host, or a zip of the entire web root
  • Any databases your site uses — even non-WordPress sites sometimes have a small MySQL database for forms or a custom backend
  • Your domain login — to update DNS records when you switch
  • A list of any cron jobs, .htaccess customisations, or environment variables — easy to forget about and easy to miss

If you don’t have FTP access to your current host (lost the password, host is unresponsive), most hosts can generate a full backup from their control panel. Grab that as a fallback.

Step 1: Get your hosting account ready

Log in to your WHC billing portal and provision a hosting plan if you haven’t already. Your welcome email contains the hosting panel login.

In the hosting panel:

  1. Add your domain to the account (Enhance prompts for this on first login)
  2. Note the temporary URL Enhance assigns — looks something like your-username.example.test. You’ll use this to preview the site before switching DNS.
  3. If you need a database, create it now: Databases → Create database → note the database name, username, and password

Step 2: Upload your files

Two options depending on the size of the site.

Option A — File Manager (good for small sites, under ~50 MB):

  1. Hosting panel → Files → open the domain’s web root (usually public_html/ or httpdocs/)
  2. Click Upload → drag and drop files, or upload a zip
  3. If you uploaded a zip, right-click → Extract

Option B — SFTP (good for larger sites or when you want to use a desktop tool like FileZilla or Cyberduck):

  1. Hosting panel → FilesSFTP Access → note the host, port, username, password
  2. Connect with your SFTP client
  3. Drag your files into the web root

Both methods preserve file structure, permissions, and timestamps. Use whichever is faster for the volume of files.

Step 3: Import your database (if you have one)

If your site uses MySQL:

  1. On your old host, export the database via phpMyAdmin → Export → SQL → Go
  2. On Enhance, open phpMyAdmin (Databases → click the database → phpMyAdmin)
  3. Import tab → choose the SQL file → Go

For most small databases this takes seconds. Larger databases (1 GB+) are faster via command-line import — open a ticket and we’ll do it for you.

Then update your application’s database connection settings to use the new credentials (usually in a config file like config.php, db.php, or .env).

Step 4: Update file paths and URLs

Hardcoded paths break in two common ways:

  • Absolute server paths (e.g. /home/oldusername/public_html/) — these change with hosting. Search your codebase for the old path and replace with the new one (you’ll find the new path in the hosting panel under file properties).
  • Absolute URLs (e.g. http://oldsite.com/images/logo.png) — if your site hardcodes URLs anywhere, search-and-replace to the new domain or to relative paths.

Use a tool like grep or your code editor’s project-wide search to find these. Common files to check: config.php, .env, header/footer templates, any include files.

Step 5: Set up special configurations

  • .htaccess — copy it over with your files. Check rewrite rules still match the new structure.
  • Cron jobs — recreate them in Enhance (Cron jobs section). The schedule syntax is standard cron.
  • PHP version — Enhance lets you pick PHP 8.3 or 8.4 per domain. If your code needs an older version, open a ticket; we can usually accommodate.
  • PHP extensions — most common extensions (curl, mbstring, gd, intl, etc.) are enabled by default. Check phpinfo.php if you need to verify something specific.
  • Environment variables — Enhance supports .env files in your web root or via the panel’s environment settings.

Step 6: Test on the temporary URL

Visit the temporary URL Enhance provided. Click through the site, check forms work, log in to any admin areas, verify database-driven pages display correctly.

Look for:

  • Mixed content errors (images or assets still pointing at the old host)
  • 500 errors (usually a path or PHP-version mismatch)
  • Database connection errors (config file wasn’t updated)

Fix anything broken here before you switch DNS. Once DNS is switched, real visitors hit the site and any breakage is visible to them.

Step 7: Switch DNS

When everything works on the temp URL, update DNS:

  • If your domain is registered with us: we’ll switch records on request, or you can edit them in the hosting panel
  • If your domain is elsewhere: at your registrar, point the A record (and AAAA if you use IPv6) at the IP shown in your Enhance welcome email

Most networks see the new DNS within 5 minutes. See our DNS setup article for the details.

Step 8: Cancel the old hosting (after a few days)

Don’t cancel immediately. Wait 3-5 days to be sure:

  • DNS has fully propagated globally
  • No emails or files are still arriving at the old host
  • Nothing you missed is still pointing back there

Then cancel the old host before the next renewal hits. Auto-renewals are sneaky — set a calendar reminder.

Common gotchas

  • Forms emailing from the old domain: many forms send via PHP mail(). Check the recipient address in your form-handling code.
  • External services with the old IP allowlisted: payment gateways, monitoring tools, third-party APIs. Update them with the new IP.
  • SSL warnings on first load: Let’s Encrypt SSL is auto-issued, but the issuance can take a few minutes after DNS resolves. If you see a cert warning right after switching, wait 10 minutes.

When to ask us for help

Open a ticket if:

  • Your site is > 5 GB or has tens of thousands of files
  • You’re not sure where your databases live or how to export them
  • The old host is unresponsive and you don’t have a backup
  • The site has a complex stack (Node.js, Python, Ruby, etc.) — we’ll discuss what’s supported

Most “I’m stuck mid-migration” tickets get resolved in 15-30 minutes. Ask early; don’t suffer alone.

Tags: migration php migration html migration static site custom site
Was this helpful?

Let us know — or open a ticket if you're still stuck.