This article introduces how to deny all access except yourself in Apache server .htaccess file settings.
There are cases when you want to make the entire site inaccessible, such as during renovation or when a critical flaw is discovered. For WordPress, you could use plugins, but sometimes itโs easier to deny access at the server level like Apache.
Create .htaccess in public_html and add the following. Use your own IP.
Check your global IP at https://www.cman.jp/network/support/go_access.cgi
# Deny all access
deny from all
# Allow by IP address
allow from 60.144.111.111