How to hide wp-admin login page?

Mostly WordPress websites are hacked or brute forced through wp-admin login page. Here is a way to hide wp-admin login page.
Find the .htaccess file and do some changes. In the .htaccess file (see the code below), please change YOURSECRETWORDHERE to something else that can be remembered but not easly guessed. make sure it is unique and long enough.
Now change the ADMINFOLDER to the new folder name. It can be any name. It can be letters, numbers and mixture of underscores and dashes only. Please bear in mind that the symbolin the front of ADMINFOLDER on purpose so don't remove it.
Now you are done. Your wp-admin login page is now hidden. Enjoy!
RewriteEngine On
RewriteBase / 
##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
##### Michi’s code is BELOW #####
RewriteCond %{REQUEST_URI} wp-admin/
RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
RewriteRule .*\.php [F,L]
RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
RewriteRule ^ADMINFOLDER/(.*) wp-admin/$1?%{QUERY_STRING}&YOURSECRETWORDHERE [L]
##### Michi’s code is ABOVE #####
##### BELOW THIS POINT IS ALREADY INSERTED BY WORD PRESS
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]



  • 116 Users Found This Useful
Was this answer helpful?

Related Articles

Disabling the WP-CRON.php in Wordpress

Wordpress uses a file called wp-cron.php as a virtual cron job, a task that is scheduled in order...

How to install SSL certificate on your WordPress website?

There are three simple steps to setup your SSL certificate on your WordPress website   1. Get...

How to create a staging environment in WordPress

Login into DirectAdmin and click on Wordpress under the app installer.    Go to "All...

How to install WordPress using Softaculous

Step 1:    Log into your DirectAdmin panel when you select your service as shown below....