These instructions explain how to create a test installation which is an exact duplicate of your live installation.
On Your Server
- Create a new test database with a different database name, user name and password to your live installation
- Export your current live database and import it into your new test database
- Create a new directory on your server, e.g. /test
- Copy all of the files from your current live site directory to the new /test directory
- Edit the /library/config.php file in your new /test directory and change the database details to match your new test database
- Update Options -> Basic Board Information -> Board Title to something like Test MySite
- Update Options -> Basic Board Information -> Board URL to match the new test URL
- If you are using a cache on your live site, update the new /test directory /library/config.php file with a different cache prefix
- Add the code below to the bottom of your new /test directory /library/config.php file
PHP:
$config['enableMail'] = false;
$config['cookie'] = array(
'prefix' => 'test_',
'path' => '/',
'domain' => ''
);
Don't forget that the test installation should be password protected to stop others from accessing it.
You can do that with .htaccess - copy the instructions here but apply it to the directory where the test install is located instead:
http://xenforo.com/community/resour...and-the-install-directory-using-htaccess.353/
On Your Computer (Localhost)
If you wish to duplicate your live installation on your PC, first you need to install a program such as XAMPP:
http://xenforo.com/community/resources/how-to-install-xenforo-locally-to-your-pc-using-xampp.355/
Then the steps are very similar:
- Create a test database with the same database name, user name and password as your live installation*
- Export your current live database and import it into your new test database
- Create a new directory on your computer to match your live site directory, if it is not installed in the root
- Copy all of the files from your current live site directory to the same directory
- Replace the .htaccess file with the following contents
-
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
- Add the code below to the bottom of the new test installation /library/config.php file
-
PHP:
$config['enableMail'] = false;
$config['cookie'] = array(
'prefix' => 'test_',
'path' => '/',
'domain' => ''
);
*If you use root/root for the user name and password for XAMPP, then ensure you update the /library/config.php file accordingly.