当前位置:网站首页>如何让你的 WordPress 网站更安全
如何让你的 WordPress 网站更安全
2022-06-28 16:23:00 【华为云】
为什么需要安全性
现在写博客已经成为很多人的爱好,而 WordPress 是最受青睐的平台。默认情况下,wordpress 博客采用最低级别的安全性,而且它的文件和/或插件可能经常过时。这些文件是可追踪的并且容易被黑客入侵。互联网不是一个安全的工作场所,必须充分了解如何确保安全。
本文介绍了初学者可以实施的一些简单提示和技术,以确保他们的博客和存储在 WordPress 上的信息的安全性。
提示 #1 使用唯一、安全的用户名和密码
- 避免使用默认 管理员
- 用户还可以创建具有管理员权限的新用户并删除旧的“管理员”用户名。
- 诸如 Username Changer 之类的 WordPress 插件也可用于将用户名更改为更安全的名称。尽量避免使用常见的用户名,例如 usernames 或 administrator,这些用户名很容易被猜到。
- 选择由字母、数字和字符组成的复杂密码。不要选择与用户名、网站名称或简单的单词相似的密码。
- 建议最好使用随机字符串。
提示 #2 启用两步验证
1.用户需要有一个 WordPress 帐户,可以通过单击此处创建。如果用户已经拥有 WordPress 帐户,请跳过此步骤。
2.单击此处启用两步验证。用户被重定向到以下页面。

3.单击开始后出现以下屏幕

4.选择通过短信验证选项。
5.WordPress 将通过短信发送验证码,用户需要输入该验证码以验证号码。
6.正确输入发送到你手机的代码。然后应提供一堆备用代码,如果手机被盗或丢失或无法访问手机获取代码的情况,可以将其用作访问站点的替代方式。将这些代码保存在文本文件中。
7.你现在已启用两步验证。

提示 #3 使用插件
为了防止暴力攻击,有两个很棒的插件
- All in One WP Security & Firewall 插件有一个选项,可以简单地更改该登录表单的默认 URL (/wp-admin/)。此插件还有助于限制从某个 IP 地址登录的尝试次数。
- 另一个是 BruteProtect。该插件最近被 WordPress 的创建者 Automattic 收购。该插件会自动保护用户登录表单免受 IP 地址的影响,这些 IP 地址往往会进行多次登录尝试。
提示 #4 将 wp-config 上移一个目录并将其锁定
- 用户可以将 wp-config.php 文件移动到 WordPress 安装上方的目录。这意味着对于安装在你的网站空间根目录中的站点,你可以将 wp-config.php 存储在 web-root 文件夹之外。
- 这就是 wp-config 的样子:

如果正在使用的服务器带有 .htaccess,请将这段代码添加到文件顶部,以拒绝任何人访问它:
<files wp-config.php> order allow,deny deny from all </files>提示 #5 保持 WordPress 更新
假设用户安装了 Wamp 服务器:
1.启动 wamp 服务器
2.使用 localhost 打开 WordPress 站点
3.在仪表板部分下单击更新

4.就我而言,我已经更新了我的 WordPress。所以对我来说,它显示“你已经拥有最新版本”。

5.对于那些已经拥有最新版本的人,将有一个更新选项。点击它。完毕!!
提示 #6 更改文件权限
对服务器具有 shell 访问权限的用户,可以使用以下命令递归更改文件权限:
对于目录:
查找 /path/to/your/wordpress/install/ -type d -exec chmod 755 {} ;
对于文件:
查找 /path/to/your/wordpress/install/ -type f -exec chmod 644 {} ;
提示 #7 安排定期数据备份
- 定期备份数据,包括你的 MySQL
- 数据完整性对于可信备份非常重要。
- 一个好的备份计划可能包括将整个 WordPress 安装(包括 WordPress 核心文件和数据库)的一组定期快照保存在受信任的位置。
提示 #8. 删除自述文件和任何不必要的文件
- WordPress 有一个默认的 readme.html,以及随之而来的许多插件和主题。
- 应该删除它们,因为它们可用于指纹识别或一般窥探,并且通常包含版本信息。
- 从文件夹中删除所有垃圾文件。
提示 #9 启用 SSL 登录
· 如果站点有 SSL 证书,则可以启用 SSL 登录。
· 要启用SSL,你的站点必须可以使用 https 访问。
- 将以下代码添加到 wp-config 文件中
define('FORCE_SSL_LOGIN', true);// 仅用于登录define('FORCE_SSL_ADMIN', true);// 对于整个管理员提示 #10:询问 Apache 密码保护
-这个插件让用户在安全方面可以更好地控制他们的博客
-用户可以通过简单的步骤通过 401 授权保护你的网站。
该插件可以从这里下载。
边栏推荐
- How to log in to your WordPress admin dashboard
- Have you ever encountered the error that the main key of this setting is consistent with the database?
- Design details of the full stack CRM development tool webclient UI workbench
- The first place on the list - brake by wire "new cycle", the market competitiveness of local suppliers is TOP10
- RedmiBook Pro 14增强版 打不开台达软件DRAStudio_v1.00.07.52
- [force button] 35 Search insert location
- Briefly introduce the conversion between tensorflow and pytorch (mainly tensorflow to pytorch)
- Subscription publishing mode bus in JS
- 元宇宙中能接吻了!CMU推出VR头显外挂,复刻唇部逼真触觉
- js中订阅发布模式bus
猜你喜欢

The future of platform as code is kubernetes extension

【Hot100】4. Find the median of two positive arrays

Geoffrey Hinton: my 50 years of in-depth study and Research on mental skills

Use open connector to integrate hubspot and SAP systems

Introduction to reverse commissioning PE structure details 02/07
![[MySQL] official website document learning query statement SQL precautions](/img/aa/bf27b609e2fda1edaa46f134fc5626.png)
[MySQL] official website document learning query statement SQL precautions

Noip popularization group 2006-2018 preliminary round 2019 csp-j1 2020 csp-j1 improvement program

【世界海洋日】TcaplusDB号召你一同保护海洋生物多样性

Open source technology exchange - Introduction to Chengying, a one-stop fully automated operation and maintenance manager

10.Hystrix断路器
随机推荐
如何在网站上安装 WordPress
3. caller service call - dapr
C#/VB.NET 将PDF转为Excel
元宇宙中能接吻了!CMU推出VR头显外挂,复刻唇部逼真触觉
AI落地的新范式,就“藏”在下一场软件基础设施的重大升级里
浅谈 SAP 软件里的价格折扣设计原理
After the first failure, AMEC rushed to the Hong Kong stock exchange for the second time, and the financial principal changed frequently
CODING DevOps 助力中化信息打造新一代研效平台,驱动“线上中化”新未来
What you have to know under the digital collection boom
The first place on the list - brake by wire "new cycle", the market competitiveness of local suppliers is TOP10
Zuckerberg to investors: don't expect anything from metauniverse
【TcaplusDB知识库】TcaplusDB限制条件介绍
The new paradigm of AI landing is "hidden" in the next major upgrade of software infrastructure
np tips: random 创建随机矩阵 sample = np.random.random([19, 64 , 64, 3])
QQ appears large-scale number theft, why is this? Is there no solution?
Please ask me, the queries written in my database account for 99%. Is it better to use pay as you go mode or reservation mode?
简单介绍一下tensorflow与pytorch的相互转换(主要是tensorflow转pytorch)
Stm32cubemx usage and function introduction
PostgreSQL异常处理
Yesterday, metauniverse | Wal Mart set up an innovation department to explore metauniverse and Web3, and Dior released the metauniverse Exhibition