Computer >> Máy Tính >  >> Lập trình >> HTML

Danh sách kiểm tra bảo mật WordPress tốt nhất [Hướng dẫn cơ bản]

Nếu bạn muốn bảo mật trang web WordPress của mình, bạn sẽ tìm thấy rất nhiều lời khuyên trực tuyến, một số lời khuyên là tốt và một số lời khuyên hoàn toàn có hại, mặc dù có ý nghĩa tốt.

Khi nói đến bảo mật WordPress, bạn cần phải tin tưởng các nguồn của mình và tìm thông tin không chỉ đáng tin cậy mà còn khả thi và có thể áp dụng được. Chỉ riêng trong năm 2020, các cuộc tấn công bằng phần mềm độc hại đã tăng hơn 150% và con số này dường như không sớm chậm lại. Do đó, bảo mật trang web WordPress của bạn cần phải là ưu tiên số một của bạn.

Cách tốt nhất để bảo mật trang web WordPress của bạn là cài đặt một plugin bảo mật và để nó xử lý các công việc nặng nhọc. Nhưng ngay cả khi không có, bạn vẫn có thể bảo mật trang web của mình ở một mức độ lớn bằng cách làm theo danh sách kiểm tra bảo mật WordPress được thảo luận bên dưới.

TL; DR: Bảo mật trang web WordPress của bạn bằng MalCare và tránh bảo trì thường xuyên liên quan đến bảo mật. Bảo mật WordPress là một mê cung các lỗ hổng mà bạn cần phải vá. Tham khảo danh sách kiểm tra bảo mật WordPress của chúng tôi để đảm bảo rằng bạn không bỏ lỡ bất kỳ điều gì quan trọng.

Phương pháp dễ nhất để bảo mật trang web WordPress của bạn

Như chúng tôi đã nói, cách tốt nhất để bảo mật trang web WordPress của bạn là sử dụng một plugin bảo mật, cụ thể là MalCare. MalCare không chỉ tự động xử lý danh sách kiểm tra bảo mật của WordPress mà còn làm như vậy mà bạn không cần phải lo lắng về việc theo dõi từng chi tiết nhỏ.

MalCare có một số tính năng hoạt động cùng nhau để giữ an toàn cho trang web của bạn. Nhưng ba tính năng hàng đầu của nó đảm bảo rằng trang web của bạn vẫn không có phần mềm độc hại — quét, tường lửa và dọn dẹp. Với MalCare, bạn có thể lên lịch quét tự động trên trang web WordPress của mình và nhận cảnh báo nếu phát hiện bất kỳ điều gì đáng ngờ. MalCare cũng bảo vệ trang web của bạn bằng một tường lửa thông minh giúp ngăn chặn hầu hết các cuộc tấn công. Và quan trọng nhất, nếu trang web của bạn bị tấn công — do không có trang web nào có thể chống lại được, MalCare sẽ dọn dẹp trang web của bạn trong vòng vài phút chỉ bằng một cú nhấp chuột.

Danh sách kiểm tra bảo mật WordPress tốt nhất [Hướng dẫn cơ bản]

Một lý do khác tại sao bạn nên chọn MalCare, đó là với các biện pháp bảo mật thủ công, luôn có khả năng xảy ra lỗi do con người. Nhưng lỗi trong bảo mật có thể gây ra cho bạn nhiều hơn chỉ một vài đô la. Nếu các vụ tấn công trở nên tồi tệ hơn, chúng có thể dẫn đến đánh cắp dữ liệu, làm mất mặt trang web, mất khách hàng và quan trọng nhất là mất niềm tin mà doanh nghiệp của bạn phải gánh chịu.

Danh sách kiểm tra bảo mật WordPress tối ưu

Có rất nhiều yếu tố đối với một trang web WordPress nên việc theo dõi mọi thứ có thể trở nên quá tải. Chúng tôi đã biên soạn danh sách kiểm tra bảo mật WordPress cho bạn dựa trên tần suất thời gian bạn cần thực hiện tác vụ.

Để bảo mật hàng ngày

Bảo mật trang web là một quá trình liên tục và không thể là cam kết một lần. Nhưng có những cách mà bạn có thể tự động hóa các công việc hàng ngày. Những tác vụ này đảm bảo rằng trang web của bạn được bảo mật khỏi mọi vấn đề hoặc mối đe dọa chưa được bảo vệ.

Quét trang web của bạn

Điều quan trọng là phải quét trang web của bạn để tìm phần mềm độc hại mỗi ngày. Một trang web bị tấn công cứ sau 38 giây trên internet và rất có thể bạn là một trong số họ. Việc quét trang web của bạn thường xuyên đảm bảo rằng bạn là người đầu tiên biết về bất kỳ mối đe dọa hoặc phần mềm độc hại nào trên trang web của mình và giúp bạn thực hiện hành động trước khi kẻ tấn công có thể gây ra bất kỳ thiệt hại nào cho trang web của bạn.

Danh sách kiểm tra bảo mật WordPress tốt nhất [Hướng dẫn cơ bản]

Nếu việc quét trang web của bạn hàng ngày theo cách thủ công có vẻ tẻ nhạt đối với bạn, bạn có thể chọn giải pháp bảo mật như MalCare, cho phép bạn lên lịch quét tự động hàng ngày, để bạn không phải lo lắng về việc bỏ lỡ quá trình quét hoặc phải đích thân chạy chúng .

Sao lưu trang web của bạn

Có một số lý do tại sao bạn nên sao lưu trang web WordPress của mình, nhưng điều quan trọng nhất trong số đó là bảo mật. Nếu không được phát hiện kịp thời, phần mềm độc hại có thể gây tàn phá trang web WordPress của bạn và do đó dẫn đến mất dữ liệu hoặc mất mặt trang web. Thông thường, các máy chủ web xóa các trang web khỏi máy chủ của họ nếu chúng bị nhiễm và trừ khi bạn có một bản sao lưu độc lập cho trang web của mình, bạn sẽ phải bắt đầu lại từ đầu.

Điều quan trọng là phải sao lưu các trang web có giá trị cao mỗi ngày, để không có gì quan trọng bị mất. Điều này đặc biệt đúng đối với các trang web WooCommerce cần sao lưu thời gian thực. Một giải pháp tiện dụng như BlogVault có thể giúp quá trình này trở nên rất dễ dàng. BlogVault cho phép bạn lên lịch sao lưu hàng ngày hoặc theo thời gian thực, tùy thuộc vào yêu cầu của bạn và lưu trữ các bản sao lưu này trên một máy chủ bên ngoài để ngay cả khi máy chủ trang web của bạn bị tấn công, các bản sao lưu vẫn được bảo mật.

Để bảo mật hàng tháng

Kiểm tra nhật ký hoạt động

Các cuộc tấn công và cài đặt phần mềm độc hại, phần mềm quảng cáo hoặc các loại chương trình độc hại khác thường diễn ra một cách bí mật. Thông thường, dấu vết hiển thị duy nhất có thể được tìm thấy trong nhật ký hoạt động trên trang web của bạn, bản ghi theo thứ tự thời gian về các hoạt động đã thực hiện và các thay đổi đã thực hiện. Do đó, bạn nên thực hiện kiểm tra hàng tháng nhật ký hoạt động của trang web để tìm kiếm bất kỳ sự mâu thuẫn hoặc hoạt động đáng ngờ nào. Nó có thể giúp bạn theo dõi một số chi tiết quan trọng trong trường hợp trang web của bạn bị tấn công, chẳng hạn như những địa chỉ IP nào có liên quan và nó có thể đã xảy ra như thế nào.

Danh sách kiểm tra bảo mật WordPress tốt nhất [Hướng dẫn cơ bản]

Nếu trang web của bạn là một trang web sản xuất cao, tức là bạn xuất bản nội dung hàng ngày hoặc hàng tuần, việc kiểm tra nhật ký hoạt động mỗi tháng một lần có thể trở nên quá tải vì có rất nhiều thay đổi trên trang web. Trong trường hợp đó, bạn có thể kiểm tra nhật ký hoạt động mỗi tuần một lần hoặc hai tuần một lần.

WordPress không cung cấp nhật ký hoạt động theo mặc định, vì vậy bạn sẽ phải dựa vào một plugin cho nó. Ngoài ra, MalCare cung cấp cho bạn nhật ký hoạt động chi tiết và dễ hiểu cùng với bảo mật WordPress hoàn chỉnh.

Cập nhật trang web của bạn

Tốt nhất, bạn nên cập nhật trang web WordPress của mình ngay sau khi các bản cập nhật mới được phát hành, nhưng việc thực hiện các bản cập nhật hàng tháng cũng hoạt động tốt. Bằng cách duy trì lịch cập nhật hàng tháng, bạn có thể chắc chắn rằng trang web của mình được bảo vệ tốt và mọi lỗ hổng bảo mật mới đều được vá.

Cập nhật thường đáng sợ bởi vì chúng đã được biết đến là phá vỡ các trang web. Nhưng nếu bạn sử dụng một plugin như BlogVault, bạn có thể kiểm tra các bản cập nhật của mình trên một trang web dàn dựng và kết hợp các thay đổi một cách liền mạch với trang web trực tiếp của bạn.

Kiểm tra Search Console

Việc thêm trang web WordPress của bạn vào Bảng điều khiển tìm kiếm của Google có một số lợi ích liên quan đến SEO, nhưng nó cũng có thể giúp bảo mật trang web của bạn. Search Console của Google có tab Vấn đề bảo mật gắn cờ bất kỳ phần mềm độc hại nào mà nó phát hiện trên trang web của bạn, vì vậy, việc kiểm tra nó thường xuyên có thể giúp bạn phát hiện phần mềm độc hại.

Danh sách kiểm tra bảo mật WordPress tốt nhất [Hướng dẫn cơ bản]

Nếu bạn quét trang web của mình bằng MalCare thường xuyên, bạn sẽ phát hiện ra phần mềm độc hại trên trang web của mình. Nhưng vẫn là một phương pháp hay để xem liệu Google có cho rằng có bất kỳ hoạt động đáng ngờ nào đang diễn ra trên trang web của bạn hay không.

Xóa các chủ đề và trình cắm không sử dụng

Loại bỏ các chủ đề và plugin cũ và không sử dụng phục vụ hai mục đích. The first is to speed up your site, as too many files can cause bloat and server slowdowns. The second is to make sure that your site cannot be attacked through them. Unused themes and plugins are often ignored and not updated, creating vulnerabilities that can be easily taken advantage of. So make sure to run a monthly check on all the themes and plugins you use and remove those that have served their purpose.

Note:Also check for any fake plugins on your site. Malware is often hidden as a plugin folder but fake plugins only have one or two files, can’t be located on the WordPress repository and have weird names like ‘azzz’ or ‘tiff’.

Update your credentials

Using the same credentials for too long or reusing them across multiple accounts is a major risk. To protect your WordPress site, update your passwords at least once a month. This ensures that any hacker who may have acquired your password cannot use it, and it also logs you out of your account on all devices. While slightly inconvenient, it ensures that you can control access to your website.

Check user roles and privileges

The user accounts on your WordPress site are as important as the admin account. If a hacker gets access to any account, they can infect your site, upgrade their role privileges, and even lock you out of your own site.

Make sure that every user on the site has only the necessary privileges, and old user accounts are deleted. Also check if any user privileges have been escalated without your authorization, it could be a sign of malware.

Block malicious IPs

Blocking or restricting malicious IPs can make life significantly easier for you. If you are getting hacked, you can trace the IP address it’s happening from, and simply block it. This stops anyone with that IP address from accessing your site. This method is used to combat hackers, stop bots or trolls, and keep unauthorized users out. If you use a firewall, it will automatically block malicious IPs for you.

You can also block an entire geographical area, if you are experiencing repeated attacks coming from the region.

Test your backups

If the worst should happen and your WordPress site goes down, you can rely on your backups to get it up and running again. But you need to make sure that your backups are safe as well. In case your backups have already been hacked, restoring them will be pointless. Similarly, you also need to test if they’re functional, or else you’ll be restoring a broken site. You can test your backups easily if you use BlogVault, and make sure that they are reliable.

Update WordPress salts

WordPress uses salts as part of its encryption process. A salt is a random string of characters that is added to a password before encryption. The resulting string is a hash, and that is what is stored in the database. That way, if a hacker is able to get the hashed passwords out of the database, AND decrypt them, they still don’t know what part of the password is actually the password and what is the salt. The only way they would know this is if they get access to the salts and security keys in the config file.

It is similar to how passwords are stored in browser cookies. The reason you can stay logged into any site is that the session information is stored in cookies. But if plaintext passwords were stored there, it would be dangerous. So WordPress stores the salted and hashed version instead. Having access to the salt doesn’t mean you can decrypt hashes, but it does reduce the level of security. Therefore, it is important to updates your WordPress salts periodically.

For long term security

Check SSL

SSL is a security protocol designed to encrypt any communication to and from your website server. This stops attackers from accessing, reading, or changing any information that is being transferred.

Usually, you secure your site with SSL when getting your domain or hosting plan. However, SSL certificates expire approximately every two years, and you need to ensure that it is renewed at the earliest. This is doubly important if users perform transactions on your website, as any security breach can lead to credit card details or bank account details getting leaked.

Check hosting plans

If you forget to renew your hosting plan on time, your WordPress account will be suspended. This can cause a number of issues. Your site traffic will take a hit, you’ll lose customers, and you might even wind up losing data. Checking your hosting services regularly also allows you to analyze your site traffic and server usage. Overly high server usage is a common symptom of a brute force attack, and catching such attacks earlier stands a better chance of stopping them. When you are alerted to a brute force attack early, you can act and secure your site before the hackers gain access to your site.

One-time measures for complete security

While WordPress security needs to be reviewed constantly, there are some measures that you can take once and not have to update constantly.

Invest in a strong firewall

A firewall protects your WordPress site by filtering out malicious traffic, and stopping most attacks before they can infect your website. There are several kinds of firewalls, like web application firewalls, network firewalls, or cloud-based firewalls. A strong web application firewall such as MalCare’s allows you to filter your website traffic, and block visitors by the number of login attempts or geographic location.

Implement HTTP Authentication

HTTP Authentication is a protocol that allows access to a web resource only to those who are meant to access it. HTTP authentication restricts access by asking for a username and password when a certain web page is requested. Now obviously, you cannot do this for your entire website, but implementing it for your admin dashboard or login page can significantly reduce the number of bot attacks.

Use Two-Factor Authentication

Two-factor authentication is a method that requires a user to present two separate keys to access an account. For example, if you are trying to access your email, usually you need to provide the username and password, but when you implement two-factor authentication, you will also have to provide a key that is created in real-time such as a one-time password or PIN. This lowers the number of login attempts and does not overwhelm your website server with login requests. It also protects your website against brute force attacks. You can use a plugin like 2FA to enable two-factor authentication for your site.

Limit login attempts

We’ve already talked about how login attempts need to be limited. WordPress, by default, allows unlimited login attempts, and this offers a ripe opportunity for hackers to try accessing your WordPress account with brute force attacks. The easiest way to limit login attempts is to use a security plugin like MalCare, or you can add custom code to your function.php file.

Disable XML-RPC

Similar to WP REST API, XML-RPC is a WordPress feature that allows you to publish content remotely. It is useful if you use the WordPress app or need to enable trackbacks and pingbacks but otherwise, it can be exploited by hackers to gain access to your site through brute force attacks. The easiest solution here is to disable it with a plugin or manually.

Disable Directory Browsing

When your server doesn’t find an index file for a website, it shows an index of the contents of the directory. If a hacker can access this information, they can check if you have any files that are vulnerable on your website. This opens your website to major security risks.

In order to avoid this, you can disable directory browsing by adding a line of code to your .htaccess file. Follow these steps to disable directory browsing on your WordPress site.

  • Download the .htaccess file on your site through an FTP client.
  • Open the file and add the following code to the bottom of the file:

Options All -Indexes

  • Now save the file, and reupload it. You will have to delete the original file from your site first.

Restrict File Permissions

The file permissions on your site determine who can access what parts of your site and who can modify them. Usually, your web host configures all of this information for you. But it is still a good practice to understand file permissions and ensure that they are configured optimally.

If you want to understand how file permissions work and how you can optimize them for your site security, go through our guide which is detailed and beginner-friendly.

Hide wp-config file

The wp-config file on your website is full of sensitive information such as passwords, keys, and salts. If hackers gain access to the file, it will be like rolling a red carpet to the website for them. The wp-config file is located in the public_html folder by default, so hackers know where to look for it. But you can change the location of the file, and it still functions just as well, while hiding sensitive information effectively.

Disabling PHP Execution in Specific Folders

Hackers can upload PHP files on your site disguised as core WordPress files and gain access to your site. Some folders like wp-uploads shouldn’t have PHP files at all. So what do you do in this case?

You can disable PHP execution in these folders so that even if hackers manage to get in these files through any backdoors, they cannot gain access to your site.

Danh sách kiểm tra bảo mật WordPress tốt nhất [Hướng dẫn cơ bản]

Why Website Security is Important

WordPress is a secure platform, but it is very popular and attracts all sorts of attention. Some of which are nefarious. In order to make sure that hackers can’t gain access to your site, you need to ensure that your website security is up to date, or else you could face dire consequences like:

  • Loss of customers
  • Data loss
  • Leaked private credentials
  • Revenue loss
  • Legal issues
  • Hit to the brand reputation
  • Loss of trust

Final Thoughts

WordPress security is not a mystery. If you take a few steps to secure your site, you will be able to fend off attacks and malware, and avoid any damages. We hope that this WordPress security checklist helps you tighten your security measures.

If you want a hassle-free solution that does not compromise your security, MalCare is the only option. With automated scans, an advanced firewall, and one-click cleanups, MalCare is a 360 degree solution that protects your site.

FAQs

How do I secure my WordPress site?

The easiest method to secure your WordPress site is to install a security plugin like MalCare. MalCare scans your website everyday to ensure that your website is safe, and protects your website with its advanced firewall. It also offers a one-click cleanup in case there is a hack.

Does WordPress have security issues?

WordPress is a secure platform used by over half of the websites on the internet. However, it is because of this popularity that it attracts the attention of hackers. You can secure your WordPress site with a security plugin to ensure that your site is safe from these elements.

How do I secure my WordPress site without plugins?

If you wish to secure your site without using plugins, you need to perform several security checks regularly. You will have to perform site scans, take backups, look for suspicious behavior in the site’s activity log, and manually clean up any malware that you may detect. The list of ways hackers can get into your site is endless, and the only way you can secure your site without having to constantly be on alert is to use a security plugin.