MyBB Documentation


The 1.6 Documentation is no longer maintained and some information may be outdated.

The MyBB 1.6 series reached end of life on October 1, 2015.

This means there will be no more security or maintenance releases for these series and forums running these versions of MyBB may be at risk of unfixed security issues. All administrators are strongly encouraged to upgrade their forums to the latest release of MyBB as soon as possible.

MyBB is being improved with every released version, and performing very good just out of the box. This page is for documentation purpose only, for most of the boards.


In a standard installation of MyBB, we already cache the most frequently accessed items (a list of forums, user groups, birthdays etc) to either the database or the file system. While this is a great speed and optimization improvement, having this information stored in memory on the server is quicker once again.

MyBB also has the ability to store cached information using built-in shared memory caching from PHP modules such as X-Cache and eAccelerator and also has the ability to interface with memcached servers for cache storage.

Delayed thread views counter updates

MyBB keeps track of whenever a user views a thread to provide the number of views it's received. For larger forums, constantly updating this in the threads table meant tables were locked by the database server and posting time & modification would be affected.

It's now possible to have the number of views a thread receives updated in batches by the automated task scheduling system. The number of views a thread receives can now optionally be updated every X minutes instead of instantly.

Delayed mass mails through the mailqueue table

The Mass Mail functionality allows you to send messages to multiple users of your forum. Note that you can also send these messages as personal messages at the forum itself.

The Mass Mail Queue will show you the current messages that are queued for delivery. Note that the email delivery will run according to your settings under Tools for your MyBB installation. If you would like to force the delivery this can also be done via Tools -> Task Manager -> Clicking the Clock button for Mass Mail.

The mybb_mailqueue table handle the mass mails queue.

MyBB also contains built-in support for master/slave replication support. Larger forums requiring more than one database server will be able to set up automatic replication between their servers and have all write queries fed off to a separate master server. All slave servers being updated from the master.

Please note that this should be used only by large board owners, small to medium boards shouldn't worry about that.

As an example, if I had two MySQL servers, the code in inc/config.php for databases would look something along the lines of this:

$config['database']['type'] = 'mysqli';

$config['database']['read']['database'] = 'mybb';
$config['database']['read']['table_prefix'] = 'mybb_';
$config['database']['read']['hostname'] = 'localhost_read_address';
$config['database']['read']['username'] = 'root';
$config['database']['read']['password'] = '******';

$config['database']['write']['database'] = 'mybb';
$config['database']['write']['table_prefix'] = 'mybb_';
$config['database']['write']['hostname'] = 'localhost_write_address';
$config['database']['write']['username'] = 'root';
$config['database']['write']['password'] = '******';

You could even have multiple read and write databases like:

$config['database']['type'] = 'mysqli';

$config['database']['read'][]['database'] = 'mybb';
$config['database']['read'][]['table_prefix'] = 'mybb_';
$config['database']['read'][]['hostname'] = 'localhost_read_address';
$config['database']['read'][]['username'] = 'root';
$config['database']['read'][]['password'] = '******';

$config['database']['read'][]['database'] = 'mybb';
$config['database']['read'][]['table_prefix'] = 'mybb_';
$config['database']['read'][]['hostname'] = 'localhost_read_address2';
$config['database']['read'][]['username'] = 'root';
$config['database']['read'][]['password'] = '******';

$config['database']['write'][]['database'] = 'mybb';
$config['database']['write'][]['table_prefix'] = 'mybb_';
$config['database']['write'][]['hostname'] = 'localhost_write_address';
$config['database']['write'][]['username'] = 'root';
$config['database']['write'][]['password'] = '******';

$config['database']['write'][]['database'] = 'mybb';
$config['database']['write'][]['table_prefix'] = 'mybb_';
$config['database']['write'][]['hostname'] = 'localhost_write_address2';
$config['database']['write'][]['username'] = 'root';
$config['database']['write'][]['password'] = '******';

Now, in the event that you do have multiple read / write servers setup in the config, MyBB would connect to all the write servers so it can update all of them, and select 1 read server at random. I wish we could easily detect the load of the read servers and pick the lowest one, but unfortunately that’s not very practical yet.

If you are going to have multiple read and write servers, you should put your read servers on a load balancer rather than in MyBB’s config file. The only difference is you would point the read array towards your load balancer.

GZip compression, browser cache and more.

See ACP -> Board Settings -> Server Optimization Options

Another performance optimization idea is making better use of spriting to reduce http requests

If you're own a big board you would like to join this group (requires a board with at least 100K posts). To join, please visit Group Memberships at the community forums.

Performance related issues

MyBB Features
Archive Mode - Attachments - Multiquote - MyCode - Polls - Private Messages - Reputation - RSS Syndication - Search Engine Friendly URLs - Smilies - Subscriptions - User Groups - User Referrals - Warning System
This is obviously not the complete feature list. See Features.

Edit this page on GitHub