Komplettes Toolkit, um eine Entwicklungsumgebung (oder beliebige Webseite) unter einen Passwortschutz per .htacces zu setzen
- Upload path.php to your webspace
- Open yourdomain.com/path.php
- Copy the server path to .htpasswd from the open browser window
- DELETE path.php from your webspace!
- Upload .htpasswd to the root of your website
- Download the .htaccess of your website
- Add the contents of the .htaccess in this repo to your .htaccess (I'd recommend at the very beginning)
- Paste the server path to .htpasswd into your new .htaccess
- Upload changed .htaccess
=> To access your protected website, enter the username "test" and the password "t3stpwd".
Additional info:
If you prefer to have ONLY wp-login.php under password protection, remove the "#" before the <FilesMatch>
commands in the .htaccess. DO NOT keep a password protection if users can register on your site and they can do stuff that requires AJAX (e.g. online shops with WooCommerce).