Quote from: MrT at Jun 12, 2007, 07:01 PM
For larger sites that need to maintain a staging environment on a single server and a production environment on load-balanced servers, what are the recommended best practices for implementing MODx?
The best process I have found for running a stage to live process is this:
1. Back up STAGE assets folder.
2. Upload STAGE assets folder to LIVE server under the name assets_new.
3. Backup STAGE and LIVE database.
4. Take LIVE “offline”.
5. Open the config.php file for LIVE and change the database name, username and password to the current STAGE database then save.
6. Change the name of the LIVE assets folder to assets_MMDDYY (Month Day Year of outgoing database).
7. Change the name of the LIVE assets_new folder to assets.
8. Verify that permissions are properly set for assets directories.
9. Update LIVE sites file manager configuration paths.
10. If your using the Google Analytics plugin update it with your user key.
11. Check that LIVE site is operational.
12. Set LIVE site to “Online”
This process usually means a downtime of the live site for less than one minute. To make it even faster, you can update google analytics and the file manager paths after the site is back online.
To re-setup STAGE I create a new database named under following the format [tt]wwwMMDDYY[/tt] (Month Day Year) and load the backed up database into the new database. This also gives me the benefit of having a fairly simple roll back to a prior database and assets pack if there turns out to be a problem down the road. Every now and then I archive the old assets and databases and delete them from the server.