Step by step guide to move or host Xenforo forum on WPEngine where WordPress is at the root of a domain and XenForo inside forum subfolder.
WPEngine is one of the best WordPress managed hosts. So my client wanted me to move his WordPress site along with the Xenforo forum to WPEngine. (I do recommend WPEngine as well)
Here are the four steps to move or host the Xenforo forum on WPEngine, where WordPress is at the root of a domain and Xenforo inside the forum subfolder.
If you wish to just add a new forum to your WPEngine hosted WordPress site, only upload the files using sFTP like Filezilla to WPEngine.
If you are moving your WordPress + Xenforo from other hosts, WPEngine provides an auto migration script as a plugin in WordPress, which backs up your WordPress data and moves them over to WPEngine. Still, it will not offer you an option to move other scripts like Xenforo to move over.
You have to manually backup forum files from the existing host in a compressed format. However, you can’t upload the same using sFTP in compress format because WPEngine does not provide a CPanel like file manager where you can uncompress the folders on the server. So you have to uncompress and then upload the files. Uploading a forum with a lot of data can be a big task.
So here is a trick to move the forum using WPEngine’s auto migration plugin.
All you have to do is copy the forum folder into the wp-content folder using the file manager at your old host. It will then be moved over to the WPEngine server in the auto migration script. Once the folder is there in WPEngine, use Filezilla to move the content back to where it should be to the root of the domain.
Hurray!! Now you have moved your forum files to WP Engine.
Once you have moved the files, now it’s time to move the database. I prefer to keep WP and XF in the same database as it helps with a single sign-on feature if needed in the future, but even if you have them on a separate database, you may need to move them to a single database on WPEngine.
Take a backup of the XenForo database from the old server. Use tables that start with xf_. If you aren’t sure, you can back up the whole database as well. It will overwrite the WP tables when you import, and once you have settled things with the forum, you can move WP once again using the auto migration script. It will remove the overwrites done from your manual SQL backup restore operation on WordPress tables.
You can log in to WPEngine, and for each of the WordPress install, in your account, you can see a phpMyAdmin link in the left navigation.
Import your forum database backup. If your forum backup is more significant than 500MB allowed upload limit in phpMyAdmin, you can use the big dump to restore or can even use MySQLDumper to backup and restore the database.
3. Xenforo Config
We have the database and the files on WPEngine. Now it’s time to connect to the database by changing the config files of Xenforo.
Ideally, you can open the WordPress config file and set the credentials for database connection and set them in Xenforo config. Still, at times WPEngine resets the password for your WordPress and updates the config file with the new password. It happened with my client, and WPEngine people did this because they had an attack on their server, and some data were leaked.
Such incidents can break your forum and so it is better to be reading the details from the wp-config file and use those details in xenforo.
Just add the following text at the top of the Xenforo config just after the opening PHP tag.
define('WP_PATH', dirname(dirname(dirname(__FILE__)))); require_once(WP_PATH.'/wp-config.php');
Now for the database connection details, use the following.
$config['db']['host'] = DB_HOST; $config['db']['port'] = '3306'; $config['db']['username'] = DB_USER; $config['db']['password'] = DB_PASSWORD; $config['db']['dbname'] = DB_NAME;
Remember that DB_HOST is without quotation marks.
4. Caching Issue
Once you have your forum up and running on xenforo, it can have issues with caching. Users may not be able to login because the pages are cached, and users logged in may see the cached login page of XenForo.
Open a support ticket and let them know to disable caching for the forum folder.
Remember to check file uploading in the message editor or sending emails from Xenforo works.
That’s it. Now you can run a Xenforo from WPEngine hosting.
Remember, WPEngine will not support or upgrade your Xenforo because they are just managed hosts for WordPress. Installing xenforo is not against the TOS of WPEngine usage or anything, but it is only covered under the managed hosting that they provide for WordPress. You are OK to install or use any custom script in your hosting space provided.
Readers who read this article also read …