Quick BB
PHP 8.2+ & MySQL Buy license · $79.95
Maintenance

How to Move Your Forum to a New Web Host

Move a PHP and MySQL forum to a new host step by step: lower DNS TTL, back up, copy files and database, test with a hosts file, then switch DNS.

Updated 5 minute read The Quick BB team

Moving a forum to a new web host sounds daunting, but for a self-hosted PHP and MySQL forum it comes down to copying files, copying the database, updating one configuration file and pointing your domain at the new server. With a little planning, members see a short maintenance notice and nothing else. This guide walks through the move step by step, including how to handle DNS so the switch is quick.

Check the new host first

Before you buy, confirm the new hosting plan can run your forum. For Quick BB, that means PHP 8.2 or newer, MySQL 8.0 or newer or a compatible MariaDB, the PDO MySQL extension and utf8mb4 support, on Apache or LiteSpeed (Nginx works with the supplied instructions). Ordinary shared hosting is fine. The requirements guide lists what to ask the host.

Also check:

  • Disk space for your database, attachments and backups, with room to grow.
  • Upload and PHP memory limits suitable for your attachment sizes.
  • Whether the host includes free SSL certificates.
  • Whether outgoing email or SMTP is allowed, so registration emails still work.

Lower your DNS TTL a day or two ahead

DNS records have a TTL (time to live) that tells resolvers how long to cache them. If your TTL is several hours, some visitors will keep reaching the old server for that long after you switch. Common advice is to lower the TTL on your domain's A record (and any www record) to about 300 seconds (5 minutes) at least 24 hours before the move, ideally 48. Lowering it on the day itself does not help much, because resolvers still hold the old, longer value.

After the move is confirmed working, raise the TTL back to its normal value.

Step 1: Announce and schedule

Pick a quiet time and post an announcement a few days ahead with the date and expected downtime. Explain that any posts made during the switch window might be lost, so members should hold off for an hour.

Step 2: Set up the new server

  1. Add your domain to the new hosting account.
  2. Create an empty MySQL database and a database user with full privileges on it. Note the database name, user, password and host. See how to create a MySQL database.
  3. Set the PHP version for the domain to a supported release. See which PHP version to use.

Step 3: Close the forum and take a final backup

Close the board or enable maintenance on the old host, so nothing changes during the copy. Then take a complete backup:

  • Database: use the forum's built-in backup or export the database with your host's database tool. Built-in backups that work in chunks, as Quick BB does, help with large databases on shared hosting.
  • Files: download the whole forum folder, including uploads, attachments, avatars and the configuration file. Compressing it into a ZIP in the file manager first makes the download faster and keeps file names intact.

The backup and restore guide covers both in more detail.

Step 4: Copy everything to the new host

  1. Upload the forum files to the new server by FTP or the file manager. If you uploaded a ZIP, extract it on the server.
  2. Import the database into the new empty database, using the new host's database tool or the forum's protected restore. Make sure the import uses utf8mb4 so emoji and accented characters survive.
  3. Edit the forum's configuration file with the new database name, user, password and host. On many hosts the host is still localhost, but some use a separate database server name, so check.
  4. Check folder permissions on upload directories so the web server can write to them.

Step 5: Test before switching DNS

You can test the new copy before the world sees it by editing the hosts file on your own computer to point your domain at the new server's IP address. Your computer then loads the new server while everyone else still sees the old one. Check:

  • The index, a forum, a long thread and a member profile.
  • Logging in, posting, Quick Reply and uploading an attachment.
  • Friendly URLs, which depend on the server's rewrite rules. If thread links return 404 errors, the rewrite configuration (for example .htaccess on Apache or LiteSpeed) did not come across or the module is disabled.
  • Sending a test email from the SMTP settings. Use the test email button if your software has one.

Remove the hosts file entry when you are done.

Step 6: Switch DNS and reopen

  1. Update your domain's A record (and www record) to the new server's IP address. If you are moving the whole domain to the new host's name servers instead, update the name servers at your registrar.
  2. Install or confirm the SSL certificate on the new host.
  3. Reopen the forum on the new server.
  4. Leave the old forum closed, with a notice, until traffic to it stops.

With a short TTL, most visitors should reach the new server within minutes, though a few resolvers may take longer. Changing name servers usually takes longer to settle than changing an A record.

Email records live in DNS too. If you move name servers, copy your MX records and any SPF, DKIM and DMARC records to the new DNS zone first, or your domain's email may stop working.

Step 7: Tidy up

  • Check the server error log on the new host for a few days.
  • Re-enable scheduled tasks if the host supports cron. Some software works without cron but uses it when available.
  • Run a fresh backup on the new host and download it.
  • Raise the DNS TTL back to its usual value.
  • Keep the old hosting account for a week or two as a safety net, then delete the forum files and database from it, since they contain member data.

If you are also changing forum software, do the host move first and the software migration afterward; see how to migrate a forum to new software. If you are starting fresh on the new host instead, the quick start covers installing from scratch.

Frequently asked questions

When should I lower my DNS TTL?

Lower it to around 300 seconds at least 24 hours before the move, ideally 48. Lowering it on the day does not help much because resolvers still cache the old value.

How can I test the new host before switching DNS?

Edit the hosts file on your own computer to point your domain at the new server's IP address. Only your computer sees the new server until you change DNS.

Why do thread links show 404 errors after moving?

Friendly URLs rely on server rewrite rules. Check that the rewrite configuration file came across and that rewriting is enabled on the new server.

Get three guides like this every month, plus software update notices.Subscribe →