Plugins and protection scripts
There are various “add-ons” for additional protection of the resource from hacking. Just enter your CMS and Google what solutions will help protect the site from hacker attacks and hacking. Here, for example, is a list of the most popular plugins for WordPress:
Sucuri;
Cloudflare;
Wordfence Security;
All In One WP Security & Firewall.
In general, it is always better to use popular engines — they have proven plugins, and they release updates more often.
Not only plugins, but also special scripts can protect the site. The only thing here is to be a little more technically savvy. Some of them monitor any changes on the site and notify the webmaster about them. Others protect the site code from adding third-party SQL code. Others implement page-by-page output of information from the database. This will not allow an attacker to easily get it in one fell swoop.
Server protection
SSH keys. Cryptographic scripts allow you to encrypt authentication using public and private keys. You don’t need to use a password to log in, because a hacker can automatically pick it up.
Braundmauer. It can restrict or block access to all ports of the site. Exceptions are set by the webmaster himself. Ideally, such a program should be installed on every server.
Password protection. Never send them by mail or chat, do not store them in a notebook, do not pick up popular passwords. Set up two-step authentication to log in to the admin panel.
VPN. Make a private network that only selected servers will have access to, i.e. computers will be connected by a secure communication channel through which data can be exchanged.
Load monitoring must be configured on the server. This way you can see abnormal activity and monitor changes to system files.