To put a site in maintenance mode, edit .htaccess file so:

RewriteEngine On
RewriteRule !^maintenance.php$ /maintenance.php [R=302,L]


Doing so, any access to the site would be redirected to maintenance.php (which you can set up as needed with a courtesy message to the user)

If you want put a site in maintenance mode but leave it active for you only, restricting the access to your own IP, you can edit the .htaccess so (substituing 123.123.123.123 with your own IP):

 

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123$
RewriteRule !^maintenance.php$ /maintenance.php [R=302,L]



Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • cPanel
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

 How do I turn off Directory Listing in cPanel?

In cPanel scroll down to the Advanced section and choose "Index Manager"Choose to open "Web root"...

 How to enable HotLink protection in cPanel

To enable hotlink protection in cPanel: Click on Hotlink Protection on the main screen of...

 How to show hidden files in cPanel File Manager

You can edit dotfiles (like .htaccess for example) via cPanel File manager, but they're "hidden"...

 What is the difference between the cPanel Dedicated License and the cPanel VPS License?

The type of cPanel license you need and use depends on the type of server that has been set up;...

 cPanel Supported Virtual Environments

cPanel products support the following virtual environments: Virtual environment...