Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Beta/Dev site which uses the Live database?
I’ve got a restaurant review site running that uses Textpattern for everything. There are about 200 restaurants in the database already.
I’m wanting to set up a beta/test install which has access to all those restaurants in the database, but I don’t want section/page/form updates pushed to the Live site.
Any advice or tips on how to do this? I already have a “beta.domain.com” subdomain set up and TxP is installed, but I can’t figure out the database issue.
Thanks!
Caps lock is cruise control for cool. —Unknown
Offline
Re: Beta/Dev site which uses the Live database?
There’s no built-in staging functionality to automate this sort of thing. Minor updates can usually be handled on a live site via the Draft article status and built-in previewing capability. For more extensive site updates, such as what you are describing, the usual approach would be to clone your database, get it live on your testing domain, make and test your changes, and finally replace the live database with the clone. Some things to watch out for with this approach:
1) Always make a full backup of the live database before attempting to replace it.
2) In your testing site, you will need to change the site url setting, so don’t forget to change it back after you copy the cloned database back to production.
3) You will want to disable some things in the cloned site (eg, google analytics tracking code, if you use that), and then re-enable after you copy the cloned database back to production. Make a checklist before you begin. You’ll be glad you did.
Hope that helps.
Offline
Re: Beta/Dev site which uses the Live database?
That helped very much indeed, thanks for the tips!
Caps lock is cruise control for cool. —Unknown
Offline
Re: Beta/Dev site which uses the Live database?
artagesw wrote:
For more extensive site updates, such as what you are describing, the usual approach would be to clone your database, get it live on your testing domain, make and test your changes, and finally replace the live database with the clone.
The usual problem with this approach is that the live site has to be “freezed”, but that’s not always possible.
Yes, you can ask your client to not add new articles nor images nor files, nor anythng they could add to the website that will modify the live database and make it go “out of sync” with your already cloned database (which, by following artagesw’s suggested process, will end stepping over the live database, and you will be losing any new article/file/image/whatever added by your client).
This is “worst” when your website can accept stuff from the “outside world”, like comments, or sign ups to Postmaster plugin, or whatever the visitors could do in the website that will end up in the live database. Again, the databases will be out of sync and you may lose stuff if you just replace the live database with the cloned one.
Of course, as artagesw said:
1) Always make a full backup of the live database before attempting to replace it.
artagesw wrote:
3) You will want to disable some things in the cloned site (eg, google analytics tracking code, if you use that), and then re-enable after you copy the cloned database back to production. Make a checklist before you begin. You’ll be glad you did.
Sam, are you sure you need to disable Google Analytics? As GA seems to work on a “per domain/subdomain” basis, I think it’s safe/innocuous to have the GA tracking code on a dev/offline website copy. I will investigate about this, but if you have some insights regarding this, I’ll appreciate.
Offline
Re: Beta/Dev site which uses the Live database?
maniqui wrote:
The usual problem with this approach is that the live site has to be “freezed”, but that’s not always possible.
Good point. I am assuming that you can disable updates to the live site during this process.
maniqui wrote:
Sam, are you sure you need to disable Google Analytics? As GA seems to work on a “per domain/subdomain” basis, I think it’s safe/innocuous to have the GA tracking code on a dev/offline website copy.
I think you are correct. Just using this is an example. I always disable it when not in production, but probably not strictly necessary.
Offline