Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Addiction / / MyBB Mega Thread // Installation / / Security & More!

Hello, and welcome to my mega thread on MyBB. I decided to go ahead and make this as I see a lot of MyBB threads made here every day, and a lot of them are easy fixes, if you know what you are doing. However, a lot of people do not know what they are doing and I would like to remedy that. In this tutorial we will cover a whole range of topics, from installing your copy of MyBB to getting it running smoothly and ready for release. So sit back, enjoy, and I hope I help!

[img]http://www.imgdumper.nl/uploads6/51338a352c71d/51338a352bb81-seper.png[/img]

Contents
  • Installing MyBB Properly
  • Essential Plugins
  • Forum Security
  • Mini/Other Tutorials

[img]http://www.imgdumper.nl/uploads6/51338a352c71d/51338a352bb81-seper.png[/img]

Installing MyBB Properly


In this section, we will go over how to properly install your copy of MyBB onto your domain. Before we begin the installation, you will be required to make an SQL database in your cPanel of your hosting provider.
  • In cPanel, go to MySQL® Database Wizard, and enter a new database name, for example = tutorial_mydb, then click next.
  • Add a database user, for example = tutorial_myuser, create a password and click create.
  • If there is an option to check 'All Privileges' then make sure and click it, if not then we are done.

Installation Guide


  1. Download the latest version of MyBB
  2. Extract the file you downloaded, and you will find two folders, Documentation and Upload.
  3. To keep things simple, go inside the Upload folder and zip archive everything in it to create a Upload.zip file.
  4. Go into your cPanel account, go in File Manager, navigate to where you want to install MyBB. For example, I will install MyBB at example.com/forum/ so I created a new folder at the root domain called “forum” and uploaded the Upload.zip file there.

[img]http://gaming-lounge.net/images/mybb1.jpg[/img]

4. Afterward, select the Upload.zip file and Extract the file, delete Upload.zip. Should be like this now (you might need to Reload the directory to see):

[img]http://gaming-lounge.net/images/mybb2.jpg[/img]

CHMOD these files


/cache: 777
/cache/themes: 777
/inc/config.php: 666 (rename “config.default.php” to config.php)
/inc/settings.php: 666
/uploads: 777
/uploads/avatars: 777

To CHMOD files, right click them and write the number in the box that pops up.

5. Time to run the installer to install MyBB, go to www.example.com/install/ if your forum is at the root of your domain, or www.example.com/yourforum/install/ if it’s in a subdirectory.

6. Welcome: The installer will begin to install MyBB. Check/Uncheck “Send anonymous statistics about your server specifications to the MyBB Group”, click Next.

7. License Agreement: View the license agreement to install MyBB. Click Next.

8. Requirements Check: Check to make sure you meet the requirements to install MyBB, they should be all green like this:

[img]http://gaming-lounge.net/images/mybb3.jpg[/img]

Your web hosting provider should already have PHP and MySQL installed. If it displays a file or directory is not writable, check to make sure you CHMOD the correct files and directories mentioned earlier. If all is well, click Next.

9. Database Configuration:

Database Engine: Best to use MySQL Improved if available to install MyBB, the database engine should be automatically chosen for you.
Database Server Hostname: usually localhost. Unless your web hosting provider has MySQL installed on a different server, leave this as is.
Database Username: Enter the database you created earlier here.
Database Password: Enter the database user password you generated earlier here.
Database Name: Enter the database name you created earlier here.

You can leave the MySQL Improved Table Settings alone. Here’s an example screenshot of what it should look like now:

[img]http://gaming-lounge.net/images/mybb4.jpg[/img]

When you’re done, click Next.

10. Table Creation: Database tables are being created to install MyBB. Click Next.

11. Table Population: The installer inserts default data in the database to install MyBB. Click Next.

12. Theme Insertion: The installer inserts theme and template files to install MyBB. Click Next.

13. Board Configuration: Best to leave most of these details alone to install MyBB except to change Forum Name and Website Name to your new forum name. You can change contact email to your preferred email address so users to contact you. Another example screenshot:

[img]http://gaming-lounge.net/images/mybb5.jpg[/img]

When you’re done, click Next.

14. Administrator User: Last step to install MyBB, pretty simple. Enter your new username, password and email you’ll use on your new forum. Afterward click Next.

Finish Setup: MyBB has now been installed successfully! You can now view your board or go into the Admin Control Panel to edit your forum.

[img]http://www.imgdumper.nl/uploads6/51338a352c71d/51338a352bb81-seper.png[/img]

Essential Plugins


[img]http://www.imgdumper.nl/uploads6/51338a352c71d/51338a352bb81-seper.png[/img]

Security Tips


Rename Your Admin Directory

To do this, enter your web host's control panel and go to the File Manager. Alternatively, you can use an FTP program like FileZilla. Find the directory called 'admin', and simply rename it to something else (it is suggested to rename it to something cryptic, like 87y2ut).

Then, find the config.php file in the 'inc' directory. Look for the following code:

Code
/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/

$config['admin_dir'] = 'admin';

Change the 'admin' text to whatever you changed the directory name to.

.htaccess Protect Your Admin Directory

Renaming the admin directory is just step 1 of 3 different processes you can use to rename your directory. The following code snippet will check for somebody's IP address. If their IP address does not match the one that you specify, they will be redirected to your index.

To do this, create a .htaccess file in your admin directory. Add the following code:

Code
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^12\.345\.678\.9
RewriteRule .* http://www.testing.com [R=301,L]

Change 12\.345\.678\.9 to your IP address (using the format specified), and http://www.testing.com to the domain you wish to redirect other people.

Password Protect Your Admin Directory

This is the simplest method of protecting your admin directory. This adds an additional requirement to getting access to the admin directory. Now, people will need an administrative account, correct user password, AND the directory password.

If you use DirectAdmin, go to 'Password Protected Directories' directories. Then, click on 'Find a Directory to Password Protect'. Go to your MyBB root folder, and click 'Protect' next to your admin directory.

Then, follow the instructions on the screen to set up a password.

If you use cPanel, go to 'Password Protect Directories' under Security. Then, click on the icons to open up directories until you find the admin directory. Then, click on it.

You will be given the option to set up individual user accounts, which might be a good idea to be able to manage who gets access and who doesn't.

NOTE: If an administrator on your board who had access gets fired, quits, or retires, I suggest you change the password. For this reason I prefer the cPanel method of different users, because you can then simply delete their access privileges.

Other Stuff



Useful template codes
Code
{$welcomeblock} - Include welcomeblock (user/guest view of the member bit)
{$mybbversion} - Displays softwares version
{$modcplink} - Displays link to Mod CP
{$admincplink} - Displays link to Admin CP (exclude for clients safety - reinstate it if requested)

{$mybb->settings['bbname']} - Displays boards name
{$mybb->settings['bburl']} - Displays URL to the board (use always when you have to link to something)
{$mybb->settings['homename']} - Displays homepage name (the one in the footer's menu)
{$mybb->settings['homeurl']} - Displays URL to the homepage site (the one in the footer's menu)

{$mybb->user['username']} - Displays users username
{$mybb->user['usertitle']} - Displays users usertitle
{$mybb->user['uid']} - Displays users UID (User ID)
{$mybb->user['avatar']} - Displays URL of the users avatar
{$mybb->user['lastvisit']} - Displays users last visit (date and time)
{$mybb->user['totalpms']} - Displays the total number of users messages (unread + read)
{$mybb->user['unreadpms']} - Displays number of users unread messages
{$mybb->user['postnum']} - Displays the users post count
{$mybb->user['logoutkey']} - Displays users logout key (used to logout successfully)

{$theme['imgdir']} - Displays themes image dirrectory
{$theme['imglangdir']} - Displays language specific theme image dirrectory
{$theme['tid']} - Displays the themes ID number
{$theme['logo']} - Displays themes logo
{$theme['borderwidth']} - Displays themes borderwidth number
{$theme['tablespace']} - Displays themes tablespace number

{$forum['name']} - Displays forums title
{$forum['description']} - Displays forums description
{$forum['url']} - Displays forums URL
{$forum['fid']} - Displays forums ID number

[img]http://www.imgdumper.nl/uploads6/51338a352c71d/51338a352bb81-seper.png[/img]

Well, that's basically all you need to know to get you started! From now, you should have a basic knowledge of how to use MyBB and you can go on to teach yourself everything there is to know, and have minimal issues!

Hope you enjoyed the tutorial, and I hope you learned something.

Regards
Addiction
This looks like a really well made Tutorial, although unless it's just me the images don't seem to be working. Nice job though.
They seem to be working for me? If anyone else experiences issues with them I will upload them somewhere else. Thanks for the feedback.
(Feb 4, 2014 09:12 AM)• α∂∂ιcтιση • Wrote:  They seem to be working for me? If anyone else experiences issues with them I will upload them somewhere else. Thanks for the feedback.

Unless you changed them, they seem to now work so everything's all good.
Hey the IP Logger link takes me to Page manager again. Could you fix this? Thank you :)
Really nice, usefull for starters and people that didn't know this.
This is indeed an High quality tutorial in order to proper install the Mybb Forums. However note that not every hosting provider uses Cpanel. Several providers us systems such as Directadmin. Maybe a spoiler showing how to install mybb trough an FTP upload client such as Filezilla could be really usefull.

Again, Nice tutorial. Rep+

Rapist🤝
Thank for the feedback, ill make sure and add that to the OP ASAP.
This is an awesome tutorial for begginers thanks for sharing anyways:D
Thanks, glad you liked it, hope it helped!
plz tell me more about '' Useful template codes''
thnx
Very nice thread, very well laid out and detailed.
Thanks man, hopefully it helps some people who are just starting out.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by PropelTheHackApr 18, 2017 06:16 AM 19 658 Apr 18, 2017 06:16 AM
Last Post: Fear
by • α∂∂ιcтιση •Nov 22, 2016 07:26 PM 76 2,350 Nov 22, 2016 07:26 PM
Last Post: Pl0x_
by TheUberMar 10, 2014 06:58 AM 8 108 Mar 10, 2014 06:58 AM
Last Post: TheUber