Refresh test environment

Saphira

Member
For those having a test environment. Is there an easy way to lock out any of your real users?

After refresh, I want to remove email addresses from anyone that is not a test user or staff, and disable their accounts, preferably as a one-click option. I could probably write some query on the DB to do it. Are there easier options? A one-click solution?

I suppose all of you who use a test environment must do it on a regular basis.

My refresh plan exists of:
  • I keep a list of add-ons & versions, and determine which ones I will (re)install on test, or into the live site, so that both are in sync again except for ones I want to test but not (yet) apply.
  • Export the live DB with "no create table statements" and "truncate table before import data"
  • Put test DB inactive
  • Import the copy from live into test
  • Disable user accounts (currently manually but if number of users increases, I need to do that differently)
  • Apply some environment specific settings (like the reference to the forum home, add TEST to board name).
  • Copy avatars & profile banners
  • I know I "should" also copy the other attachments, but I don't want to bother unless someone specifically wants to test something with attachments.
  • Change the default style to a different one from the live environment, so that at least for the forum part the difference is clear. I wish those styles would also be applied to the admin part, but, alas.
Are there any other actions you recommend?
 
You can password protect the install. I do this via cPanel. (Or IP protect in htacces if you have a static IP).

You can stop email notifications going out in /src/config.php file by adding the line

$config['enableMail'] = false;

I wish those styles would also be applied to the admin part, but, alas.
You can at least change the color by adding to the config.php

$config['adminColorHueShift'] = 80;

NB: Your test seems unusual. Normally you would just copy over the file/folder system, download a backup database and import that into the test database exactly as it is.

At that point I go into ACP, turn off ads and change the URL (especially important if it is canonical. MY ACP is automatically a different color due to the config hue as above.
 
Last edited:
You can stop email notifications going out in /src/config.php file by adding the line

$config['enableMail'] = false;
This. ^^

Also, if you run it locally, then those users can't get to it anyway. You can also run it in the cloud, but the domain will be different so they won't know to go there. Finally, you can always firewall it off so only you can reach the site. It's possible with AWS, anyway.
 
Back
Top Bottom