- Hole one: stolen or shared admin passwords. The attacker logs in like a normal user, installs something, adds a hidden admin, and comes back after every "clean" until the account itself is fixed.
- Fix it with one named account per person, 2FA for every administrator, the lowest role that does the job, and a monthly look at the users list.
- Hole two: full-site backup archives left inside the web root. Their protection often relies on
.htaccess, which nginx ignores, so the whole database can be downloadable. - Fix it by keeping backups off the server, deleting local copies after a migration, adding an nginx deny rule, and testing the URL yourself from outside.
- A leaked database with customer details is a personal-data problem under the PDPA, not just a technical one.
WordPress core is well maintained and patched quickly. What goes wrong on small business sites is usually the way the site is run, not the code it runs on. These notes are deliberately general, because the point is the pattern: the same two keep coming back, and both are cheap to fix.
Hole one: the admin password too many people know
What it looks like
A typical SME website is set up once with an account called admin, and over the years that one login gets passed around: the marketing executive, the intern, the freelancer, the previous agency. The password lives in a WhatsApp group or a shared spreadsheet.
Then, one way or another, that password reaches the wrong person. It was reused on a site that was breached, or a laptop with saved passwords picked up an infostealer. Nobody has to break WordPress at all. The attacker simply types the username and password into the login page and is in.
From there, an administrator can do anything the real owner can. The usual sequence we see is:
- upload and activate a plugin that is really a backdoor, or drop a PHP file somewhere it can be called later;
- create a second administrator account, often with a name that looks like a system user, and sometimes hidden from the users list;
- use the site to send spam, redirect visitors, or host phishing pages.
This is why malware "comes back". Someone deletes the infected files and declares the site clean; a week later it is reinfected, because the attacker still has a working login. Cleaning files without fixing accounts is mopping the floor with the tap still running.
How to close it
- One named account per person. No shared
adminlogin, ever. - Two-factor authentication for every administrator. A stolen password alone then gets an attacker nowhere.
- Least privilege. Someone who writes blog posts needs Editor or Author, not Administrator. Most sites need two or three administrators at most.
- Remove ex-staff and ex-contractor accounts the day they leave.
- Use a password manager so every password is long, unique and never pasted into chat.
- Rate-limit logins so repeated guessing is blocked, either with a security plugin or at the server.
- Turn off the built-in file editor by adding
define( 'DISALLOW_FILE_EDIT', true );towp-config.php. An intruder with a login then cannot edit theme or plugin code from the dashboard. - Keep core, plugins and themes updated, and delete what you do not use. A deactivated plugin is still code on your server.
- Watch your files. File-integrity monitoring tells you when a core or plugin file changes that should not have.
- Review the users list every month. It takes a minute and it is the single best early warning we know.
If it has already happened
If someone has logged in who should not have, a scan and a delete is not enough. Our order of work:
- Change every password: WordPress users, hosting panel, database, FTP/SFTP and the email accounts tied to admin users.
- Regenerate the WordPress security keys and salts in
wp-config.php. This logs out every existing session, including the attacker's. - Audit the users list, and check the database directly for administrator accounts that do not appear in the dashboard.
- Compare WordPress core files against a clean copy of the same version, and reinstall plugins from their official source.
- Look in the places backdoors like to hide: the
mu-pluginsfolder, any.phpfile insideuploads(there should be none), and scheduled tasks, both WordPress cron events and the server's own cron. - Only then decide whether a backup is useful. Do not simply restore last month's copy and call it fixed: if the intruder was in before that backup was taken, the backdoor is in the backup as well.
Hole two: the backup sitting in a public folder
What it looks like
The second hole is quieter, and in some ways worse, because nothing looks wrong. Nothing is infected. The site works perfectly.
Many popular migration and backup plugins work by writing a single archive file into a folder inside wp-content. That archive is the whole site: every file, plus a complete copy of the database. The database holds user accounts with password hashes, and on most business sites it also holds customer names, emails, phone numbers, enquiry form submissions and, for online shops, order histories.
Because wp-content sits inside the web root, the archive has a public URL. The plugins know this, so they usually drop an .htaccess file into the folder to block downloads. On an Apache server, that works.
The catch is that .htaccess is an Apache feature. nginx, which runs a large share of modern VPS and managed hosting, does not read .htaccess files at all. On nginx that protection is simply ignored, and if the archive's file name can be guessed or the folder can be listed, the whole site, database included, can be downloaded by anyone who asks for it.
It is easy to miss. The archive is often left behind after a one-off migration, and some server malware scanners do not report it, because it is not malware. It is an ordinary file in the wrong place, so a clean scan tells you nothing about it.
How to close it
- Do not keep backups in the web root. Send them off the server, to object storage or another provider, and keep them there.
- After a migration, delete the local archive on both the old and the new server. It has done its job.
- On nginx, add an explicit deny rule for backup and dump file types, and for your plugin's backup folder. A generic example for the
serverblock:
# Refuse common backup and database dump files anywhere on the site
location ~* \.(wpress|sql|zip|tar|gz|tgz|bak)$ {
deny all;
}
# Refuse everything inside the backup plugin's folder
# (replace the path with the folder your plugin actually uses)
location ^~ /wp-content/your-backup-folder/ {
deny all;
}
- Check the rule does not break anything you serve on purpose. If your site offers legitimate downloads such as a
.zipbrochure pack, the first rule will block those too; serve them from a different path or narrow the list of extensions. Reload nginx after testing the configuration withnginx -t. - Test it yourself, from outside. Put a harmless dummy file such as
test.sqlin the backup folder, request its URL from a phone on mobile data, and confirm you get a 403 rather than a download. Then delete the dummy file.
The PDPA angle
If a downloadable backup contains your customers' personal data, that data has been exposed, whether or not anyone downloaded it. Under Malaysia's Personal Data Protection Act you are responsible for keeping that data secure, so treat a discovery like this as a possible data breach: close it, work out what was in the file and how long it was exposed, and take advice on whether you need to notify anyone. We cover the wider obligations in our PDPA compliance guide for Malaysian websites.
Want us to check your site for both holes?
Send us your site address. We will tell you plainly whether shared logins, missing 2FA or a public backup are putting it at risk, and what it takes to fix them.
Ask for a security check WhatsApp usA 10-minute monthly security routine
Once a month, someone who owns the site should spend ten minutes on this list:
- Users: open the users list. Is every account a real, current person? Is anyone an Administrator who does not need to be?
- 2FA: does every administrator still have two-factor authentication switched on?
- Updates: are core, plugins and themes up to date? Apply anything outstanding, ideally after a fresh off-site backup.
- Unused code: delete any plugin or theme that is deactivated and not coming back.
- Backups: confirm last night's backup reached off-site storage, no archive is sitting in
wp-content, and the backup folder's URL is refused from outside. - Files: glance at your file-integrity or security plugin report for unexpected changes, and for any
.phpfile inuploads. - Leavers: has anyone left the company or finished a contract this month? Remove their account today.
What hosting and maintenance should include
If you pay someone to host or maintain your site, most of the above should be their job. Ask them:
- Do you keep backups off the server, and how long do you keep them?
- If you run nginx, how do you block backup files that plugins expect
.htaccessto protect? - Do you enforce 2FA for administrators, and will you help us move off a shared login?
- Who applies updates, how quickly, and what happens if an update breaks something?
- Do you run file-integrity monitoring, and who looks at the alerts?
- If the site is compromised, is the clean-up included, and does it cover accounts and passwords, not only files?
This is how we run our own managed WordPress hosting, and it is part of every site we build and maintain under our web development service.
FAQ
Is it safe for our staff to share one WordPress admin login?
No. A shared login cannot have two-factor authentication tied to one person, cannot be removed when someone leaves, and leaves no record of who did what. Give every person their own named account with the lowest role they need, and turn on 2FA for every administrator.
We cleaned the malware but it came back. Why?
Usually because the way in was never closed. If the attacker has a working administrator login, or added a hidden admin user, they simply log in again. Rotate every password and the salts, and audit the users list.
Our backup plugin says its archives are protected. Are they?
Often only on Apache. Many backup and migration plugins protect their folder with an .htaccess file, which nginx ignores completely. Request the backup URL yourself from outside your network: if it downloads, it is public. The safest answer is to keep no backup archives inside the web root at all.
Is a leaked website backup a PDPA issue?
It can be. A full-site backup contains the whole database, usually including customer names, emails and form submissions. If anyone can download it, personal data you are responsible for under the PDPA has been exposed, so treat it as a possible data breach.
Can we just restore last month's backup after a hack?
Not blindly. If the attacker was in before that backup was taken, the backdoor is in the backup too. After restoring, still rotate passwords and salts, audit users and check for stray PHP files.
The bottom line
Most WordPress break-ins at small businesses are not sophisticated. They come through a password too many people knew, or a backup nobody remembered. Give everyone their own account with 2FA, keep backups off the server, and check both once a month.
More reading: PDPA compliance for Malaysian websites · Best web hosting in Malaysia for 2026 · WordPress page builders for Malaysian businesses