smallwheels
Well-known member
I would like to create a test and staging instance of my forum to be able to test new versions, to try out addons, to play with layouts and configuration options w/o endangering "the real thing". I understand that a test instance is covered by the license and that it should obviously not be publicly reacheable, so protected by .htaccess. So far so good. My question is: How to create such an instance in an easy, reliable and replicatable way?
Obviously I could simply install a fresh copy of XenForo, this would be the easiest way to do it but I'd prefer a different approach:
I would like to have a copy of my forum including the content, the exisiting config and Layout etc. as any new installation would always have a delta to the live version and trying to create the confings manually would be time consuming and prone to failures. On the other hand having such a delta may lead to not discovering potential issues on the test/stating instance.
So far my assumptions are:
1. duplicate the existing "forum" folder with all the files in it to a new place (in my case a subfolder on my webspace where I can point a test-domain to). This should preserve addons, themes, attachments etc.
2. do a full dump of the database
3. import the database into a new db-instance
4. edit the database and
• replace the bits pointing to the "live forum" with those pointing to the "test instance"
• set all user notifications via email to off
• replace all the user mailadresses with something .invalid
• optional: change all the normal user passwords to a loooong standard password (as they won't be used anyway)
• deactivate all SEO features and pushing the sitemap
5. Edit the config file(s) in the filesystem that points to the db to reflect the new test db.
6. here we are - give it a go
At the current size of my forum I not need to truncate the db, the attachments or the number of users, it is small enough to deal with a full copy (and will probably stay like that for quite a while).
My questions are:
1. is this a valid and proper way or is it a bad idea? Did I miss something? Are there better ways?
2. Where do I find the relevant bits to change in the files of the forum folder as well as in the db?
3. How can I script or automate the process of those changes as far as possible? I assume that I want to wipe staging regularly after certain tests (i.e. of configs or addons) to have a clean copy again and that from time to time a fresh copy of the live forum has to be migrated to staging to maintain a small delta between live and staging.
Any help + comments very appreciated!
Obviously I could simply install a fresh copy of XenForo, this would be the easiest way to do it but I'd prefer a different approach:
I would like to have a copy of my forum including the content, the exisiting config and Layout etc. as any new installation would always have a delta to the live version and trying to create the confings manually would be time consuming and prone to failures. On the other hand having such a delta may lead to not discovering potential issues on the test/stating instance.
So far my assumptions are:
1. duplicate the existing "forum" folder with all the files in it to a new place (in my case a subfolder on my webspace where I can point a test-domain to). This should preserve addons, themes, attachments etc.
2. do a full dump of the database
3. import the database into a new db-instance
4. edit the database and
• replace the bits pointing to the "live forum" with those pointing to the "test instance"
• set all user notifications via email to off
• replace all the user mailadresses with something .invalid
• optional: change all the normal user passwords to a loooong standard password (as they won't be used anyway)
• deactivate all SEO features and pushing the sitemap
5. Edit the config file(s) in the filesystem that points to the db to reflect the new test db.
6. here we are - give it a go
At the current size of my forum I not need to truncate the db, the attachments or the number of users, it is small enough to deal with a full copy (and will probably stay like that for quite a while).
My questions are:
1. is this a valid and proper way or is it a bad idea? Did I miss something? Are there better ways?
2. Where do I find the relevant bits to change in the files of the forum folder as well as in the db?
3. How can I script or automate the process of those changes as far as possible? I assume that I want to wipe staging regularly after certain tests (i.e. of configs or addons) to have a clean copy again and that from time to time a fresh copy of the live forum has to be migrated to staging to maintain a small delta between live and staging.
Any help + comments very appreciated!