So you've finally got your hands on the shiny new vBulletin4 and you are ready to upgrade your forum. But wait! Before you upgrade – how do you test to make sure everything will work? This guide will show you how to create a vBulletin4 “Test” environment without breaking your “Live” forum.
Important Notes:
As always, please proceed at your own risk. While some of the general steps and advice are applicable to a Windows-based web hosting environment, this guide assumes that you have “shell access” on a Unix-based web host. “Shell access” is command line access to your site – and you will notice that we'll provide you with helpful Unix commands to complete various steps.
General Overview of the Process
- Copy all vBulletin files from the “Live” site into the “Test” directory
- Create a new Mysql database for vBulletin4 upgrade
- Create a copy of your current “Live” database
- Restore the database copy into the new vBulletin4 database
- Edit vBulletin 3 configuration file
- Validate vBulletin 3 test environment
- Upload vBulletin4 files
- Upgrade your “test” forum
- Test your forum on vBulletin4 in the “Test” directory
Technical How-To Guide & Steps
- (SHELL) Log in and Find Current Document Root
First, lets log into the web server and find where your current vBulletin 3 site lives. Access your server by using your favorite “terminal” client and navigate into your site's root directory via shell access. Your document root directory may look something like:
/var/www/html/domain.com/
Tip: You can navigate through your file system by using commands like:
cd
ls
dir
pwd – shows your current location within directory tree
- (SHELL) Create a new directory for vBulletin4 upgrade test.
In our example we ran the following command:
mkdir vb40
and created the following directory structure in our document root:
/var/www/html/vb40
- (SHELL) Copy vBulletin 3 Files into vBulletin4 Test Directory
While located in web document root directory /var/www/html we execute the following command:
cp -R /var/www/html/vb375/ /var/www/html/vb40/
Please note that we assume that your live forum is located in a directory called “vb375”; in reality – your forum could be located in the web document root directory itself or located in a directory named “forum”. This means that you'll have to modify the command above to work with your directory structure. Please note that the trailing slashes ( / ) are important!
After this step is complete you should have an exact copy of your vBulletin 3 files and directories inside the brand new “vb40” directory. - (SHELL) Log Into Your MySQL Server
Log into mysql server by executing the following command, please note that you will need to know your mysql database username and password. Check with your internet service provider if you do not have access to these credentials.
mysql -u'vb40dbusername' -p'vb40dbpassword'
IF your web host provided you with a separate mysql server ip address use the following command instead:
mysql -h'vb40dbip' -u'vb40dbusername' -p'vb40dbpassword'
Tip: Mysql server user information can be found in the config.php file in vBulletin, located in the forum root /includes/ folder. Please consult your host if you are unable to log into your mysql server. - (MYSQL) Create a New vBulletin4 Mysql Database
Once you've successfully logged into your Mysql server, execute the following command to create a brand new database:
CREATE DATABASE vb40;
- Disable the “Live” vBulletin discussion forum
Go to your vBulletin 3 Admin Control Panel, select the vBulletin Options tab on the left and set your vBulletin On / Off option to “No”, not active.
- Create Mysql Database Dump and Restore into a New Database
In step #5 you've created a new database called vb40. In this step you will create a “database dump” file of your existing “Live” site and restore it into the new database. In essence, you will create an exact copy of your database so that you can safely upgrade this copy to vBulletin4. Please note that you will need to know the database name, username and password for your current vBulletin 3 database. The username and password is most likely the same one you've used in step #5.
Once you have all of the information, execute this command in your shell:
mysqldump -uvb375dbusername -p'vb375dbpassword' vb375 | mysql -uvb40dbusername -p'vb40dbpassword' -C vb40
Alternatively, IF your database server is located on a different IP use the following command to include the directive for the database host:
mysqldump -hvb375dbip -uvb375dbusername -p'vb375dbpassword' vb375 | mysql -hvb40dbip -uvb40dbusername -p'vb40dbpassword' -C vb40
- Turn ON “Live” Site
Now that you've made an exact copy of your “Live” vBulletin 3 database; let's go ahead and turn ON the “Live” discussion forum. Again, go to your Admin Control Panel and set the vBulletin option ON/OFF to “On”. - Activate the “Test” vBulletin3 Site
In step #3 you've created a mirror copy of your vBulletin 3 forum directory in the following location inside a directory called “/var/www/html/vb40/”. In step #7 you've created a copy of your database. Now, let's edit the config file in the “Test” directory so that it pulls data from the new “vb40” database. To do this:
Edit “config.php” located in the “Testing” directory /var/www/html/vb40/includes/; change the “Database Name” to “vb40”.
- Test the vBulletin 3 “Test” Installation
Go to your web browser and access the “Test” directory by visiting the “/vb40/” URL; example,
http://www.mydomainname.com/vb40/
If the process was successful you should now have 2 identical vBulletin 3 installations; one is your current “Live” discussion forum and the additional “Test” instance located in the /vb40/ folder.
Please note; that your “Live” vBulletin site was turned ON; and your “Test” installation was turned “OFF” - this is a good way to make sure they are using different databases. No new posts or users online should be observed on the “Test” installation. If you are seeing otherwise – you may have confused the database names and incorrectly configured the config.php file. Please go back and make sure this is resolved!
--- Now that you have a copy of your vBulletin 3 site for “Testing”, lets Upgrade to vBulletin 4 Suite!
- vBulletin 3 Pre-Flight Check: Disable Products! Check Settings!
Log into the Administration Control Panel in your “Test” installation of vBulletin 3 (in the /vb40 directory) and disable all products; do not disable all products by disabling the plugin system or editing the config.php file. Rather, simply choose “disable” in the product manager menu. - Upload and Overwrite vBulletin 3 Files with vBulletin 4 Suite
Upload and overwrite all of the vBulletin 3 files in the /vb40/ folder with the new vBulletin 4 files package. Please make sure that you are actually overwriting the existing files and not just creating new files. - Execute vBulletin 4 Suite Upgrade Script
Run the vBulletin 4 Upgrade script by executing upgrade.php file located in the newly created “install” directory.
Example: http://www.mydomain.com/vb40/install/upgrade.php
- Test vBulletin 4 Suite
After the vBulletin 4 upgrade script successfully completes, you can begin playing around with the new vBulletin 4 Suite installation located in the /vb40/ “Test” directory.
Please note that at this point you should have 2 vBulletin installations, the first is your “Live” site and the second is your vBulletin 4 Suite “Test” environment.
Additional Tips:
If you are unable to log into your “Test” installation's AdminCP you may have a problem with your cookie path / domain. If this is the case; upload tools.php file from your vBulletin 4 “Do Not Upload” directory. Execute the file to edit the cookie settings.
If you are unable to log into your “Test” installation's AdminCP you may have a problem with your cookie path / domain. If this is the case; upload tools.php file from your vBulletin 4 “Do Not Upload” directory. Execute the file to edit the cookie settings.