You can add below code to your .htaccess file to put your website in maintenance mode. With this code if anyone try to access the website will be redirected to maintenance.php mode.
But if you want to use your website for editing but want to redirect other clients to maintenance page then you can add below code in your .htaccess file:
You have to enter your IP address in pace of 109.23.45.0.
Code:
RewriteEngine On
RewriteRule !^maintenance.php$ /maintenance.php [R=302,L]
Code:
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^109\.23\.45\.0$
RewriteRule !^maintenance.php$ /maintenance.php [R=302,L]