Step 1 of 3 · Database
This writes app/config.php outside the web root, with fresh encryption keys. Keep a copy of that file somewhere safe: saved login info can't be read without it.