WordPress后台登录地址默认是 www.abc.com/wp-admin 这个通用的登录地址所有人知道,这就意味着并不安全。
1. 修改后台的 functions.php文件
可以将下面的代码添加到当前主题的 functions.php 文件:此文件路径:Appearance – Theme Editor
//保护后台登录add_action(‘login_enqueue_scripts’,’login_protection’);function login_protection(){if($_GET[‘abc‘] != ‘efg‘)header(‘Location: https://www.junjianyu.com/’); }
这样后台登录的唯一地址就是 https://www.junjianyu.com/wp-login.php?abc=efg,如果不是这个地址,就会自动跳转到 https://www.junjianyu.com/
你可以修改第 4 行的 abc、efg 和 https://www.junjianyu.com/ 这三个参数。
其他保护办法:
1. 限制登录尝试插件 WP Limit Login Attempts
这个插件可以防止有坏人进入你的后台尝试不同密码来撞库登录
Latest posts by Lester(走走就停停) (see all)
- 504 gateway time-out nginx 解决方案 - 2020年4月23日
- 加拿大商标自注册教程-2020 - 2020年4月15日
- WordPress的后台登录地址保护 - 2020年4月12日
Leave A Comment