MyBB Community Forums

Full Version: Please never re-install your forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Over the years I have seen many people either asking about or actually proceeding to reinstall their MyBB forum from scratch and then importing a backup to restore their data, as an attempt to solve an issue. I'd like to explain why this is essentially pointless and is never the solution.

First, I'll explain what "installing" MyBB (or indeed, any PHP and MySQL software) actually means. People tend to associate installing software like MyBB to being like installing PC/Mac software, like Word or any other program you may use (as well as things like mobile apps). When this software is installed, it may write files to various locations on your computer, or change system configuration files, as well as setting up a location to store data for the program. Sometimes, you need to re-install software like this so it re-writes the files and may fix issues that have developed over time with the program, while leaving the saved data untouched.

However, this is not really how PHP/MySQL-based software works. When you "install" MyBB, or any other similar software such as WordPress, the primary thing it does is it creates and populates all of the database tables, for storing your board's users, forums, threads, posts, and everything else. It then adds some rows to some tables (for example an admin user to mybb_users, some default forums to mybb_forums, populates the smilies and attachment types, etc). This is what it means to install PHP/MySQL software.

A common misconception when a forum has an issue, is that the installation is somehow corrupted, and it needs to be installed fresh, the same as you might do with some software on your PC. However, as running the install script simply creates the database tables, all this would do is overwrite all your data, leaving you with an empty forum, losing all of your users and posts in the process.

When attempting to re-install a forum, you will be greeted with this warning page:

[Image: bwelVvx.png]

Special attention is drawn to the following text:

Quote:This option will delete any existing forum you may have set up and install a fresh version of MyBB.

You should choose this option to erase your existing copy of MyBB if you wish to start again.

You will then have to confirm this action:

[Image: NTyw78I.png]

Please heed these warnings, as beyond this, you will lose your data.

What people often ask if they can do, is to take a backup, install the forum fresh, and then import the backup, hoping that will fix the "corrupted" installation and resolve whatever problem was happening. However, by carrying out this process, all you will end up with is the exact same database you started with - you have taken a backup of your existing data, used the installer to create fresh empty tables which overwrote your original tables, and then immediately overwritten those fresh empty tables with your data backup, restoring the exact same data you had in the first place.

This means one of two things:

  1. the problem is with the database, but as you have re-imported a backup of the original database that had the issue, you will still have that issue, as the database is identical to how it was before
  2. the problem is not with the database, meaning the entire exercise was pointless

Either way, the problem has not been resolved, and has only introduced an unnecessary risk of your backup being incomplete or corrupted and losing all of your data for no reason.

Instead, you should look at your server error log to see if this gives you any clues as to what is causing the issue you are experiencing, and if that doesn't help, open a support thread where you can get help with diagnosing the issue.

But please, never re-install your forum Smile

The only slight and extremely limited exception to this is if the forum is brand new anyway and has no data but something went wrong with the installation process and starting again is quicker than fixing it, however this would very rarely be relevant.