Skip to main content

How to move MyBB installations

Let’s see how to change your MyBB installation path if you have second thoughts.

Sometimes you may want to move a CMS from one folder to another. The reasons may be different, for example the installation of another CMS in parallel or adding a homepage other than the one provided by the CMS.

This method works for MyBB 1.6.x versions.
Notes for 1.8.x versions at the end of the post.

MyBB logo

Last week I’ve had to move a MyBB installation, a free platform to create forum boards.

Unfortunately moving all the files to a different folder wasn’t enough because some internal links have become invalid.

To fix this we must edit the MyBB settings file in which is defined some kind of relative root directory to where you installed the board.

Backup and edit

The file to edit is called setting.php and is located inside the inc folder of your MyBB forum installation. The changes to make are minimal but it’s always better to make a backup.

The values to change are just two:

$settings['bburl']
$settings['cookiePath']

Once you found them, simply change the value by entering the new location where you want to move the forum.

For example, if the original path was www.mywebsite.com/mybb/ and we want to move the board to www.mywebsite.com/forum/, change the value like this:

$settings['bburl'] = "mybb" ==> $settings['bburl'] = "forum"

If you want to move it to the root folder of your domain, leave the value empty.

$settings['bburl'] = ""

Remember that the same changes should be made for the $settings[‘cookiePath’] field.

Now save the setting.php file, re-upload it on your website via FTP if necessary and move your board to the new location.

Done! Your MyBB installation should now be reachable from the new path.

Notes for MyBB 1.8.x users

As reported by @NSRUSA, newer versions require a similar intervention to the inc/init.php file, which is always located in the inc folder.

Update 2019-04-22: added small note for 1.8.x users