Skip to content
7 min read

How to Protect a Website from Hacking: Security Checklist

How to protect a website from hacking when your company has no dedicated security specialist? Most small-business hacks are not targeted attacks but automated scans for known vulnerabilities: bots go through thousands of addresses and walk in wherever a plugin is outdated, a password is weak or the admin panel is exposed. The basic gaps can be closed in a day or two, and below you will find the order of work, typical mistakes and a plan for the case when a site has already been hacked.

How to protect a website from hacking: where to start

Start with an inventory. Write down what the site runs on (WordPress, Bitrix, OpenCart, custom code or a site builder), where it is hosted, and who has access to the admin panel, hosting, domain and domain email. Mark separately where customer data lives: leads, orders, phone numbers. Without this list it is unclear what exactly you are protecting.

Then set priorities. A brochure site that gets hacked loses reputation and search rankings; an online store also loses money and buyers' personal data. The usual order of work is: access, updates, HTTPS, forms, backups, monitoring. A typical mistake is to protect only the home page and forget the test subdomain, an old copy of the site in /old or /backup, and the domain email. These are what get broken into most often.

Updates, passwords and access

Keep the CMS core, plugins, themes and PHP version up to date. Automatic updates suit a small site; a store is better off with manual updates once a week, tested on a staging copy first. Remove unused plugins and themes from the server entirely instead of just deactivating them, and never install cracked ('nulled') versions of paid plugins: they often hide malicious code.

The admin password should be at least 16 characters, unique per service and generated by a password manager. Do not keep the login admin. Turn on two-factor authentication for the admin panel, hosting, domain registrar and email: losing the domain or the mailbox costs more than a hacked site itself.

Give every employee a separate account with minimal rights: a content manager does not need administrator rights. Close access for departed staff and contractors on the day their work ends, and review the list of users and API keys every quarter.

HTTPS, forms and protection from common attacks

HTTPS must work on every page. A free Let's Encrypt certificate is enough for most sites; set up a 301 redirect from HTTP to HTTPS and check that the certificate renews automatically, because an expired certificate scares visitors with a browser warning. Still, HTTPS only encrypts the channel; it does not protect against a weak password or vulnerable code.

Protect forms with a captcha (reCAPTCHA v3 or Cloudflare Turnstile), rate limiting and server-side validation, not only checks in the browser. For custom code, ask the developer to verify parameterized database queries (protection from SQL injection) and output escaping (protection from XSS). Allow file uploads only for required types and store them where they cannot be executed.

Move the admin login away from the default address (wp-login.php, /admin) or restrict it by IP, and limit failed login attempts. Block access to service files such as .env, .git and backups left in the site root. An exposed .env with keys is a frequent cause of serious incidents.

Hosting, server and DDoS protection

Choose hosting with isolated accounts, a current PHP version and automatic copies. On a VPS, updating the system, running a firewall and closing unneeded ports are your responsibility: log in over SSH with a key rather than a password and install brute-force protection (for example, fail2ban). Create a separate database user with minimal privileges.

A proxy service with a WAF (for example, Cloudflare) hides the real server IP, filters bots and softens simple DDoS attacks. Connecting it takes about an hour, but afterwards make sure the server does not answer directly by IP. File permissions are usually 644 for files and 755 for folders, and configuration must not be writable by everyone.

Backups and monitoring

Set up daily backups of the database and files with at least 14 days of retention, and keep one copy outside the site's server. If copies sit on the same server, a hack costs you everything at once. Paid cloud storage for a small site costs roughly 20,000–100,000 UZS per month (a rough guide; it depends on volume and provider).

Once a month, run a test restore on a separate subdomain: the mere existence of a backup file proves nothing. A broken backup usually turns up at the worst moment.

Connect uptime monitoring (UptimeRobot or similar) with a Telegram alert and add the site to Google Search Console, which has a security issues section. Once a month, search for site:your-domain: foreign pages advertising pills or casinos are a sign of a hack.

What to do if the site has already been hacked

Act in order. First, take the site offline temporarily or switch on a maintenance page. Second, from a clean device change all passwords: admin panel, hosting, database, FTP/SSH, email, API keys. Third, save a copy of the infected state and the logs to find the entry point: recently modified files, new administrators, suspicious requests. Fourth, restore the site from a clean backup dated before the hack.

The main mistake is restoring a copy without closing the hole, so the site is hacked again. Update everything immediately and delete what you do not need. Then check Search Console and request a review if Google flagged the site as dangerous, and warn customers if their data leaked. With a ready plan and a fresh backup, recovery takes a few hours; without a backup, days.

FAQ

Can I protect a website myself? Yes, the basic measures on this list — updates, passwords with two-factor protection, HTTPS, captcha and backups — are within reach of an owner or administrator without deep expertise. An audit of custom code is better left to a developer.

How much does it cost? The measures themselves are often free: Let's Encrypt, a basic monitoring plan, captcha. A developer's work on setting up protection and backups is roughly 500,000 to 3,000,000 UZS (a rough guide; it depends on scope and platform).

How do I know a site has been hacked? Signs include unexpected redirects, foreign pages in search results, a browser warning, new administrators and emails from the hosting provider.

Can I order the site and its protection from a studio? Yes. The 4 Digital studio builds turnkey websites starting from 1,399,000 UZS; the final price depends on scope and features.

Need a website or ads? Let’s discuss your project.

Turnkey Website Development + CRM · от 2 399000 сум

We reply within 15 minutes during business hours. No spam.