How to: Install the Latest Version of bbPress Locally

In this tutorial I am going to show you how to install the latest version of bbPress on your Windows XP machine.

Required Tools:
XAMPP for Windows
Latest version of bbPress

Step 1

Assuming you already have XAMPP installed and running; launch a browser and type http://localhost/xampp/ in the address bar. Click on phpMyAdmin in the left sidebar under ‘Tools.’ Create a new database and name it bbpress.

Step 2

Download the latest version of bbPress here. Extract it to your c:\xampp\htdocs\ folder. The extraction should then create a folder named bbpress. Double click your bbpress folder. Open the config-sample.php file with Notepad or preferred HTML editor (I always recommend NotePad2.)

You will then need to add in your database details. Change the following:

define('BBDB_NAME', 'bbpress');
define('BBDB_USER', 'username');
define('BBDB_PASSWORD', 'password');
define('BBDB_HOST', 'localhost');

to:

define('BBDB_NAME', 'bbpress');
define('BBDB_USER', 'root');
define('BBDB_PASSWORD', '');
define('BBDB_HOST', 'localhost');

You will obviously need to enter in your password if you modified your security settings within phpMyAdmin. If you didn’t make these changes, you can leave the password blank.

Next, find the following lines:

// The full URL of your bbPress install
$bb->uri = 'http://my-cool-site.com/forums/';

Change to:

// The full URL of your bbPress install
$bb->uri = 'http://localhost/bbpress/';

Now you can name your bbPress installation:

// What are you going to call me?
$bb->name = 'New bbPress Site';

Then find the following and add in your email address:

// This must be set before you run the install script.
$bb->admin_email = 'you@example.com';

This step is not really necessary since your local install won’t be able to communicate with your email servers, but it’s a good habit to complete everything.

When the above is done, save and rename your config-sample.php file to config.php.

Step 3

Launch a browser and type http://localhost/bbpress/ in your address bar. We will now complete the installation of bbPress. Follow the simple instructions and you should be finished…

but wait!

You may have database errors! It is possible that you will have the following database errors after you finish the installation:

Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user ‘ODBC’@'localhost’ (using password: NO) in C:\xampp\htdocs\bbpress\bb-includes\db-mysqli.php on line 80

Warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in C:\xampplite\htdocs\bbpress\bb-includes\db-mysqli.php on line 80

Back in your c:\xampp\htdocs\bbpress folder, open your bb-includes folder and find the db-mysqli.php file. Open it and find the following lines:

if ( !empty($this->charset) && version_compare(mysql_get_server_info(), '4.1.0', '>=') )
$this->query("SET NAMES '$this->charset'");

Change to:

if ( !empty($this->charset) && version_compare(mysqli_get_server_info($this->$dbhname), '4.1.0', '>=') )
$this->query("SET NAMES '$this->charset'");

And save. Now refresh your http://localhost/bbPress page. Your database errors should now be fixed.

You now have a fresh installation of bbPress installed on your Windows XP machine! Congratulations!

Leave a Reply