Different types of site backups serve different situations. While InMotion offers a full Backup Manager, and cPanel has the capability for full account backups, there are times when a more precision backup solution is in order. It’s easy to create backups for MyBB using cPanel’s file management tools. It can be a good idea to make these when transferring just the site, or before experimenting with new plugins. Read on for details on how to carry out these backups.
Creating Backups for MyBB
The following steps will let you backup and restore your site. More consistent backups are better for the sake of security, but this type of backup is great to have in addition to ‘standard’ backups when you are experimenting with new site designs and want one extra layer of backups just in case something goes wrong.
Note: these steps go over how to backup your site without using Backup Manager or any of cPanel’s built in backup tools. You may find that one of those serve your purpose better, if you have them available.
Backup Your Database
- Head to phpMyAdmin in cPanel.
- Click on your MyBB forum’s database on the left.
- Click on the Export tab at the top.
- For our purposes, leaving the selection as Quick will be fine. If you’re a database pro, though, feel free to explore the Custom options!
- Leave the file as an SQL file. This will be easy to restore.
- Click Go and save the database file somewhere secure.
Backup Your Site Files
- In cPanel, open up File Manager.
- Find the site directory for your MyBB forum.
- Right-click on the directory and select Compress.
- For our purposes, there is no difference between a Zip or Tar archive, so leave Zip selected and click the Compress File button.
- Find the compressed site directory, right-click on it, and select Download. Save this archive somewhere secure.
Restoring Your Site
Restore Files to the Site Directory
- In cPanel, open up File Manager.
- If there is already an existing directory for an old or corrupted version of your site, right click on it and rename the directory. I like to add a date to the beginning of the name so that I know exactly when I switched out site versions.
- Click the Upload button towards the top of the File Manager. This will bring you to a screen where you can upload the site backup you’ve downloaded. Select the file that you need to upload and it should upload to your server. Click the Go Back option at the bottom to return to file manager.
- Find the file you uploaded, right-click on it, and select Extract.
- If you’re restoring a site directory, you probably don’t need to add a file path since the site was likely in your home folder. Leave the path blank if you are unsure and click Extract File(s).
- Close the informative box and, if all went well, your site files have been restored. Now, you’ll need to import the site’s database backup below.
Import the Database Backup
- Once logged into cPanel, go to phpMyAdmin.
- Click on your MyBB forum’s database entry on the left.
- Click on the Import tab near the top.
- On the import screen, press the Choose File button and select the database that you created above when you made your database backup.
- Leave everything else set to default and click Go at the bottom of the page.
- When the database has been imported successfully, you should see a message at the top of the page similar to: Import has been successfully finished, ## queries executed.
Troubleshoot Common Database Issue On Restore
If you’ve transferred a MyBB site from one server to another, uploaded the database, and are still receiving an SQL error, chances are that the database information in your configuration file (inc/config.php) does not contain the correct database information. Open that file in the editor in cPanel’s File Manager, and update the database name, user, prefix, and password to match the one set up in cPanel. You may need to reset the database password first to get everything to match.