Access to your hosting via Plesk or FTP.
If you want to block access to a directory on your website or to all of your website, you can do this via a simple Apache .htacess file. This file allows you to override some of the default Apache settings, including the Apache Access Control via the Allow / Deny statements.
This can be useful when you immediately want to block access, for example when you have a plugin and/or part of your website compromised.
To block access, create a .htaccess file in the directory you want to block. If it's the entire website, this is the "httpdocs" directory. This will apply to all subdirectories as well. Add this to the .htaccess:
Deny from all
Every URL will now return a "403 Forbidden" error message to the browser.
Block Everyone Except your IP
If you want to restrict access to the admin area of your site via IP, this can also be done via the .htaccess file. Examples are the administrator directory for Joomla and the wp-admin directory for WordPress. Create a .htaccess file and add the following:
Order deny,allow Deny from all Allow from <YOUR_IP_ADDRESS>
You can read more information on the Apache site here .