How to take my site offline until it's fixed (2 posts)

  1. Stacy (non coder)
    Posted 3 years ago #

    How to take my site offline through cpanel or ftp until it is fixed.

  2. converting2wp
    Posted 3 years ago #

    There are plugins to do this, but sometimes you need a way to do this outside of WordPress. I'm assuming you and/or someone else still needs access to the site while it's being fixed/verified.

    Here's how I do it.

    1. From http://whatismyipaddress.com get your current IP address.

    2. Create a simple "downtime.htm" file, e.g.,

    This site is down for maintenance. Check back tomorrow.

    adding whatever HTML/CSS you like and and ftp it to the home directory of your website.

    3. Get a copy of the .htaccess file from your current site's home directory (via ftp, probably). Save it in a safe place.

    4a. Make a copy of the .htaccess file and at the top of the file put the following lines, replacing xx.xx.xx.xx with the IP address you got in step 1.

    order deny,allow
    deny from all
    allow from xx.xx.xx.xx
    ErrorDocument 403 /downtime.htm
    <Files downtime.htm>
    allow from all

    4b. Add another "allow from" line with the IP address of anyone else who needs access to the site while it is being fixed.

    5. FTP the modified .htaccess file back to the server.

    When you're done, put back the original .htaccess file.

    Best wishes on getting it fixed!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.