Last Updated: February 25, 2016
· penguinpaul

Use MyBB as your website engine

My last ProTip instructed you on how to be able to use MyBB within your current website by including global.php. This tip will show you how to use MyBB as the software that powers your whole website!

As with last time, start off your PHP file with this:


Not only can you use $mybb->user, $db, and other MyBB variables, you also have access to such theme variables like $header, $headinclude, $footer, etc.

Let's continue out PHP file.

$page = "<html>
Your content here...

Here you have defined the contents of a page that will output using the MyBB theme. Put your content where you need it, then after that put


This will output your page using the MyBB theme!

My next Protip will show you how to go a step further and manage your custom pages from the MyBB Admin Panel.

Related protips

MyBB Bot