Security Guide for WordPress wp-login.php

Dienstag, 27. Mai 2014
To enhance security for WordPress, against the password in the login page review, you need to change the file wp-login.php login.php in the following way:
Step 1: 
In the root folder của WordPress website, rename the file "wp-login.php" to "login.php". 
Step 2: 
Open the same file in a text editor. Replace "wp-login.php" anywhere you find it in the file with "login.php". 
Step 3: 
Edit the functions.php file in your theme folder, usually found at / wp-content/themes/active-theme/functions.php.(Where "active-theme" is the name của active theme.) If you do not have one, you can create one. (Make sure the file starts with 
/ / Register url fix 
add_filter ('register', 'fix_register_url'); 
fix_register_url function ($ link) { 
return str_replace (site_url ('wp-login.php? action = register', 'login'), site_url ('login.php? action = register', 'login'), $ link); 
} 
/ / Login url fix 
add_filter ('LOGIN_URL', 'fix_login_url'); 
fix_login_url function ($ link) { 
return "/ login.php"; 
} 
/ / Forgot password url fix 
add_filter ('lostpassword_url', 'fix_lostpass_url'); 
fix_lostpass_url function ($ link) { 
return "/ login.php? lostpassword action ="; 
} 
/ / Site URL url hack to overwrite register 
add_filter ('site_url', 'fix_urls', 10.3); 
fix_urls function ($ url, $ path, $ orig_scheme) { 
if ($ orig_scheme! == 'login') return $ url; 
if ($ path == 'wp-login.php? action = register') return site_url ('register', 'login'); 
return $ url; 
}
Chia sẻ bài viết ^^
Other post

All comments [ 0 ]


Your comments