From Joomla! Documentation
There may be occasions when you will make your Joomla! website unavailable to visitors for a short time. There is a simple switch in the Administrator that enables you to take your website offline very quickly. It can be returned to service at a later time just as easily.
To Take Your Joomla! Website Temporarily Offline
To make your Joomla! website unavailable to visitors and showing a simple message, do this:
- Log in to the Administrator back-end. To learn how to do this read: Logging In or Out of the Administrator Back-end.
- Click on the Global Configuration button in the main Control Panel or click the Site → Global Configuration menu item or System → Global Configuration in .
- There are so many configuration options that they need to be divided into separate groups or tabs. The Site tab should be opened at first. If not, select that tab.
- Find the Site Offline setting. Change it from No to Yes (See the screenshot below.) or click the Yes button in .
- Optional: Change the Offline Message to show an explanation about the site status.
- Select one of the Save toolbar buttons to implement the new settings:
- The Save toolbar button will save your changes and leave you in Global Configuration.
- The Save and Close button will save your changes and return you to the Administrator Control Panel.
- You should see a message confirming the settings have been changed.
- If you see an error message refer to Cannot Save Global Configuration Changes.
To Put Your Joomla! Website Online
Reverse the steps above and make sure the site offline switch is set to No.
Using the htaccess Method (cPanel)
You can limit access to certain resources of your website by password-protecting the directories they are in. To password-protect a directory with cPanel Hosting Control:
- Login into your cPanel. Select the Files section and the open Directory Privacy.
- Once you open Directory Privacy, you will see a list of directories.
- Click on the directory that you wish to protect with a password.
- Fill in a Username and Password at the bottom of the page. Then select Add / modify authorized user.
- Once the user is created, select Go Back.
- Fill in the Protected Resource Name. This is the message that will show in the login window. Then highlight the user you just created from the Active Users list and click on Save button below the Protected Resource Name.
- Verify that your directory has been password-protected. Launch your browser and visit the folder. If the browser prompts you to login, your directory has been protected by a password.