Restoring site to a new instance

Ryan Kent

Well-known member
On two occasions my host has helped me by taking a current backup of my site and restoring it to a new location so I can use it for testing. Each time when I first go to the site, I see the "An update is pending. The forum is only accessible in debug mode." message.

Each time it shows my site in RC3, and when I click to upgrade, it says "Click the button to begin the upgrade to 1.0.0 RC3" which is confusing as well, since my site was in 1.0.0 at the time of the backup.

Any ideas as to what is causing this issue? My site otherwise appears fine with what I can see.
 
It sounds to me as if your host is using an outdated backup.

I regularly take backups of my live site to my local PC (once a month) and use it for my localhost installation.
It is an exact replica every time and no upgrade or anything other than copying the files and database is required.
 
ty Brogan, we started again from scratch and the test site is up now.

When copying a live site to another spot on the same web server, what changes need to be made to complete the process?

First thing I notice is when I click the Admin Control Panel, it brought up the ACP for my live site rather then my /test site. I manually added the /test to access the correct ACP.

Next I went into the ACP > Options > Basic Board Info and changed the Board URL adding /test.

Next I went into my /library/config.php file and updated my database so it pointed to my _test database with the correct SQL acct and pw.

My questions/issues are:

- In config.php do I leave the following code untouched?
Code:
$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';

- Even after updating my Board URL, clearing cache and even changing browsers when I am on the www.terapvp.com/test site and try to access the admin control panel, the link always takes me to the main site's ACP.

- When I move my mouse over HELP it shows the expected address www.terapvp.com/test/help/ in my browser's lower left corner URL preview area. When I click on HELP I get a "requested page cannot be found error" and the URL in my browser shows as www.terapvp.com/test/help.

I have triple checked the Board URL and it shows correctly as http://www.terapvp.com/test

Somehow my test installation is confused with the main site. Clearly I am missing a step.
 
Basically you need to duplicate the database (restore a backup to a different database), duplicate the files, and edit the library/config.php file to point to the new database. Now the two forums will be separate. It appears to me that you have done this correctly because I see different post counts on the two forums.

As for your link problem... it looks to me like the links on your test forum are being handled by the live forum. My best guess is that the .htaccess file is missing in the test/ directory. In that situation the rewrite rules from the higher level directory would be used. Make sure that .htaccess file exists in test/.
 
As usual, you are dead on!

I copied the .htaccess from my live site to the /test folder. The only customization I performed in my live site's .htaccess was to redirect any non-www URLs to their www. equivalent.

Are there any changes I should make to my .htaccess file in the test directory?
 
The XenForo rewrite rules don't require any changes for the new directory.

The www rules aren't working though. When you use a non-www test URL it falls to the live forum again. You will need to modify those rules for the new directory.
 
Top Bottom