Or, to put it another way:
Migrating a WordPress-based TLD website and an integrated sub-directory-based phpBB forum, when each entity is driven by their own MySQL databases (and keeping the content intact, obv)
I thought I was going to have a bucketful of problems with this experiment, but amazingly it turned out to be problem free (if a bit fiddly on the phpBB side of things).
- Backup the website MySQL database
- Backup the forum MySQL database
- In one operation, backup the website content (including the forum content)
- Transfer the backups to a local disk or drive
- Create the virtual host and DNS Server/zone file creation for the TLD website (as per here)
- Copy the website and forum content in to the virtual host folder (nb: this will create the forum subdirectory)
- Create the TLD MySQL database (copy the database name and username from the wp-config.php file in your WordPress root, and give the new database the same password as the old one) nb, you may need to edit the wp-config.php file to reflect the new address of the MySQL database, typically it will be ‘localhost’ for the new database, but the legacy address in the wp-config.php file might be different
- Create the Forum MySQL database (copy the database name and username from the config.php file in the phpBB root, and give the new database the same password as the old one) nb, see above re addressing the MySQL database correctly
- Import in to the new TLD the MySQL database from your backed-up TLD database
- Import in to the new Forum the MySQL database from your backed-up forum database
- Change the routing (may be a zone file edit) in your domain registrar’s control panel, to point the TLD at its new host
- After a while, when the new host is active, your TLD website should be exactly as it was, though the forum won’t work yet, but don’t worry, we’re nearly there…
- Go in to your WordPress control panel and access the wp-united product that you have used to integrate the website with the forum
- Ignore any scary error messages that might be shouting at you
- Click on ‘change location’ under the phpBB location heading, and navigate to your forum root and click on the config.php file
- That should make the scary error messages go away. It should also (though this might take five minutes) sync the design and user details in your website and your forum (assuming you’ve set wp-united to do these things)
Your website content and design (and any bells and whistles you may have built in to it), and your forum content should be intact, and you should have successfully migrated your website and its integrated/interfaced forum to a new host with zero downtime, and no losses.
For email transfers, see this post (but you should give it a few hours, before you do, to allow the host change to propagate, before you config your new email users on your new server).