How to put WordPress in maintenance mode

For major changes to any website, we prefer to use a staging environment to make all the changes, and test everything, until we are happy.
For major changes to any website, we prefer to use a staging environment to make all the changes, and test everything, until we are happy.