August 18, 2018, 07:42:14 PM
collapse

* Site Menu

Creating A SMF Test Forum

What is a test site?

It is a forum that you can use to play with and install mods, themes, etc. without fear of crashing your live forum or upsetting your users. Basically, a test forum should look like your live forum and IS an EXACT duplicate of your forum minus the activity of your users. It should have all of the same mods, themes, custom coding, settings, and security. The only things that will be different will be the fact that you do not need any users (except yourself) nor any posts except for testing. You should always try mods, themes, etc. on a test forum FIRST! If you trash it...no harm, no foul and it will make for a good learning experience.

ALWAYS backup your files and database BEFORE attempting to create your test forum. Also, backup your files and database BEFORE installing any mods, themes, or making any database or code changes.

For this you'll need two things: a database and the forum software. We'll create the database first. To do this you can follow the instructions below:

1. Create a new database. You can find instructions on how to do this by viewing the tutorial: "Creating a MySQL Database using cPanel". Give this one the same permissions and access to the same user(s) as the one you copied had from your live site. Name it something different from your live forum like "test" or something that you will remember easily and can tell the difference between the 2 forums. Remeber they will eventually look exactly alike and you WILL confuse them at times!

2. Backup your live forum's database using phpmyadmin's "export" feature (usually found in cPanel) or using software such as mySQL Dumper or Big Dump. This can take quite awhile if you have a large database and are using phpmyadmin to do this. Copy and save the information to a text file if using phpmyadmin. It will most likely have a ".sql" extension but is actually a text file which can be read in any software that can view text files. (Never use Windows Notepad or Word to edit files!!!) If using mySQL Dumper or Big Dump, the software will save it to a specified directory for you.

3. Import your live forum's database to the newly created database for your test forum using MySQL's "Import" feature using the saved text file in step #2 (if using phpmyadmin). This can take quite awhile if you have a large database. If you have problems because the file is too large you can break it into smaller sections by copying and pasting in parts of it until you get all of the parts imported. Using mySQL Dumper or Big Dump can make that task a lot easier. ;)

Now, you'll need to create your forum by following the instructions below:

1. Download the SMF upgrade (not update) package that is the same version as your live forum's version. It is very important that you do use the same version. If you do not, you will run the risk of having your mods not working when you install them. Other features of your forum may also not work.

2. Create a new directory on your server. You can name it whatever you wish. But you must give it a different name than the one you use for your live forum. I suggest that you give it the same name as your test forum's database, to make things easier to remember...same database and forum directory name. This will also make it easier to tell the difference between your live and test forums.

3. Download settings.php and settings_bak.php from the root directory of your live forum. Upload settings.php and settings_bak.php to the root directory of your test forum. This will set your test forum to to the same database settings and main URL as your live forum. You will need to run repair_settings.php later to change the URL/links of the settings files to match your new directory. More on that later.

4. Next, if you have cPanel on your server follow "A." below. If you do not have cPanel then follow "B." below.
    A. Upload the SMF upgrade that you have download to the new test directory that you have created in step #2 above. You can then extract it via cPanel's File Manager and run it in a browser using http://www.your_site.com/upgrade.php. "your_site" is the domain AND subdirectory where your test forum resides. Then, just follow the prompts.

    B. Extract the SMF upgrade that you have download to a directory on your hard drive. Upload all of the extracted files to the new directory that you have created for your test site. You can do this via FTP. Run "upgrade.php" in a browser using http://www.your_site.com/upgrade.php. "your_site" is the domain and subdirectory where your test forum resides. Then, just follow the prompts.
5. Upload repair_settings.php to the root directory of your test forum and run it in a browser using "http://www.your_site.com/repair_settings.php". This will fix most of your URLs of your forum to point to the new directory you have made. Make sure that you enter the correct information for your MySQL database. You'll also need to click all of the links in the bottom half to make sure it changes them to the new test directory.

6. Copy all of the following directories from your live forum to your test forum as well as any directories that have files you've created or uploaded yourself or were installed via your mod(s), if any. You can do this quickly and easily using cPanel's File Manager. These directories will include such mods as an arcade game files and all directories, any photo gallery directories and images...you get the idea:
    A. /attachments - this contains all of your forum's attachments from the posts that your users have made.
    B. /avatars - contains everyone's avatars.
    C. /Smileys - contains your smiley sets. You will only need to copy this if you have added custom smileys and/or custom sets.
    D. Any custom themes you have on your live forum.
    E. Any custom files and directories that you use on your live site.
7. You should now be able to log into your new test forum, although it will not have any mods. Use "http"//www.your_site.com/test" or "http://www.your_site.com/test/index.php" to login to your new test forum. "/test" should be the same name of the directory that you have made for your test forum.

8. Go to Admin -> Themes and Layout -> Themes and Settings. Click the "Attempt to reset all themes" button located at the bottom of the page as shown below:

Reset Themes

9. Go to Admin -> Smileys and Message Icons -> Settings. Make sure that the following 2 settings have the correct URL for your new test forum:
    A. Base URL to all smiley sets:
    B. Absolute path to all smiley sets:
10. Go to Admin -> Attachments and Avatars -> Attachment Settings. Make sure that the setting "Attachments directory:" has the correct URL for your new test forum.

11. You can now install your old mods if you wish. Since you are using the same database and may have copied over any directories with them you should not have to reconfigure your mods. You will also not have to add the information you want shown because it will already be there.

Some Tips

1. Backup your files and database BEFORE attempting to create your test forum. Also, backup your files and database BEFORE installing any mods, themes, or making any database or code changes.

2. Add any code that you modified to your files from the live forum to your test forum.

3. Install the same mods that you have on your live forum to your test forum. You can now practice installing new mods and manually editing mods.

4. When installing mods or themes please remember to always use the default theme. To change the theme go to Admin -> Themes and Layout -> Manage and Install. DO NOT change the theme in your Profile. It will only change the look for an individual user and not the overall forum.

^ Go Up ^

Updated: Jan. 19, 2017

Have fun with your new test forum!!!

Courtesy of:
Doc Skillz

Page created in 0.029 seconds with 12 queries.