Making a copy to work on.
WHY
Testing updates, changes or development against real data without risking the live site.
THE PROCEDURE
- Export the live database.
- Create a new database and user for staging.
- Import the dump into it.
- Point the staging site's configuration at the new database.
- Update the site URL in the staging database to the staging address.
THE STEP PEOPLE MISS
Updating the URL. Without it, the staging site redirects to the live site and you end up editing production while believing you are on staging.
Run a search and replace for the URL immediately after importing.
WHAT ELSE TO CHANGE ON STAGING
Disable outgoing email, or test messages reach real customers Disable payment gateways, or set them to test mode Set search engines to discourage indexing Protect the staging site with Directory Privacy
KEEPING IT CURRENT
A staging copy from six months ago tests very little. Refresh it before significant work.
AFTERWARDS
Never push a staging database to a live site with real data. You overwrite every order and registration since the copy.