WordPress security means maintaining core, plugins, access and server so that known vulnerabilities are closed before attackers find them. WordPress runs about 40 percent of all websites (W3Techs, as of September 2026), which makes it a favourite target for automated attacks. Most successful hacks exploit vulnerabilities that were patched long ago.
Is WordPress Secure?
The WordPress core is well protected. A dedicated security team looks after it, and since version 3.7 WordPress installs minor security updates automatically. The risk lies in the extensions. Of the 11,334 new vulnerabilities reported in the WordPress ecosystem in 2025, 91 percent were in plugins and 9 percent in themes. The core accounted for six, all of them low priority (Patchstack, State of WordPress Security in 2026).
So Why Does WordPress Have a Reputation for Being Insecure?
Because many installations are no longer maintained after launch. According to Patchstack, 46 percent of the vulnerabilities reported in 2025 had no update available when they were disclosed. For particularly attractive vulnerabilities, mass attacks start a median of five hours after disclosure. If you only update every few months, your website stays open for that long.
1. Install Updates Promptly
Outdated plugins are the number one way in. Known vulnerabilities are publicly documented, and bots search specifically for websites where they are still open. Check core, theme and plugins every week and install security-critical patches immediately, always with a backup first.
Since WordPress 5.5 you can enable automatic updates for individual plugins directly in the plugin overview. That is worthwhile for non-critical plugins. Updates for shop, booking or form plugins are better tested on a staging copy first.
2. Secure the Login
- No username “admin”. It sits at the top of every attack list.
- Strong, unique passwords from a password manager.
- Two-factor authentication for all administrators.
- Limit login attempts, otherwise brute-force attacks carry on indefinitely.
3. Clean Up User Permissions
Delete the accounts of former employees, test accounts and access for service providers who no longer work for you. Anyone who only writes posts gets the “Author” role instead of administrator rights. That limits the damage if an account falls into the wrong hands.
4. Clear Out Plugins and Themes
Because 91 percent of new vulnerabilities are in plugins, every installed plugin increases the attack surface. This also applies to deactivated plugins, because their files remain on the server and can often be called directly. Delete everything you do not use.
For the remaining plugins, check when the last update was released. A plugin that has not been updated for more than a year is often no longer maintained by its developer. Replace it with a maintained alternative. Never install cracked premium versions from unofficial sources (“nulled” plugins and themes). They often contain malicious code from the moment you download them.
5. Backups That Work in an Emergency
Set up daily automatic backups and store them externally, not on the server that could be hacked. Restore a backup as a test once a quarter. Only then do you know that recovery will work when it counts.
6. Malware Scan and File Integrity
Check the installation monthly for modified files and malicious code. Between scans, watch for warning signs such as unknown admin accounts, sudden redirects, spam pages in the Google index or warnings in the browser.
7. Harden the WordPress Configuration
You set these options once and only check them again after a migration or relaunch.
- Disable the file editor. In wp-config.php, set the constant
DISALLOW_FILE_EDITto true. This locks the theme and plugin editor in the dashboard, so anyone who captures an admin account can no longer inject code there. - Disable XML-RPC if no app and no service such as Jetpack uses it. Many brute-force attempts run through this interface.
- Hide error messages. On the live website,
WP_DEBUGis set to false so that visitors do not see file paths and version numbers. - Check file permissions. Folders 755, files 644, and wp-config.php even more restrictive at 440 or 400, depending on the host.
8. Server and HTTPS
A current PHP version, a valid SSL certificate and a server-level firewall form the protective layer that sits with your hosting. A specialised WordPress hosting service includes it instead of leaving it to you. It does not replace updates, though. In a Patchstack test, the protection systems of various hosts blocked only 26 percent of test attacks on known vulnerabilities.
How to Find Malicious Code in WordPress
Unfamiliar redirects, unknown administrators or spam pages on Google point to a hack. Work through these steps in order.
- Check Search Console. In the “Security issues” report in Google Search Console, Google flags hacked content and malware. A search for site:yourdomain.com shows spam pages that did not come from you.
- Scan from the outside. An external scanner such as Sucuri SiteCheck checks the public pages for known malware and blocklist entries.
- Compare files with the originals. With WP-CLI,
wp core verify-checksumschecks all core files against the official checksums, andwp plugin verify-checksums --alldoes the same for plugins from the WordPress directory. Without the command line, a security plugin such as Wordfence handles this comparison. - Search for suspicious code. PHP files have no place in the wp-content/uploads folder. Obfuscated code with
eval(orbase64_decode(in theme and plugin files is a strong indication, but not proof. - Check users and the database. Delete unknown administrators and remove injected scripts from posts, widgets and the options table.
- Clean up and close the gap. Renew all passwords and the security keys (salts) in wp-config.php. Restore a clean backup or reinstall core and plugins. Then close the vulnerability the attack came through, otherwise the website will be infected again within a short time.
The 8 Checks as a Checklist
| Check | Interval | Done when… |
|---|---|---|
| 1. Updates | weekly, critical patches immediately | core, theme and all plugins are up to date |
| 2. Login | set up once, review every six months | all admins use two-factor login and no account is called “admin” |
| 3. User permissions | quarterly | every account belongs to an active person and has only the role it needs |
| 4. Plugins and themes | quarterly | nothing unused is installed and every plugin received an update in the last year |
| 5. Backups | daily and automatic, tested quarterly | an external backup exists and can demonstrably be restored |
| 6. Malware scan | monthly | the scan reports neither modified files nor malicious code |
| 7. Configuration | once, and after a migration or relaunch | the file editor is locked, XML-RPC has been checked and debug output is switched off |
| 8. Server and HTTPS | monthly | the PHP version still receives updates and the SSL certificate is valid |
Frequently Asked Questions About WordPress Security
Is a security plugin enough?
No. A security plugin such as Wordfence scans files and blocks suspicious access. It does not replace updates, backups or cleaned-up user accounts. It mainly covers parts of check 2 and check 6.
How can I tell that my website has been hacked?
Typical signs are unfamiliar redirects, unknown user accounts, spam content in the Google index, browser warnings, a notice in the Search Console “Security issues” report or a message from your host. Act quickly. Lock access, restore a clean backup and close the cause.
Is WordPress less secure than other systems?
No. WordPress is attacked more often because it runs about 40 percent of all websites and a single exploit hits many sites at once. The core is well maintained, and the risk grows with the number of unmaintained plugins and themes.
Do small websites get hacked too?
Yes. Attacks are automated. Bots search the whole web for a specific vulnerable plugin version, regardless of how large or well known a website is. A small trade business with an outdated plugin is therefore just as exposed as a large online shop.
Do I need technical know-how myself?
Not for the basics. You set up updates, login protection and backups through the dashboard and a security plugin, without any programming. For check 7 and the search for malicious code you need access to files and the server. If server access is unfamiliar to you, it is better to hand these steps to a service provider.
Who takes care of all this on an ongoing basis?
That is what maintenance contracts with updates, daily backups, monthly security checks and fixed response times are for. With us, this is part of WordPress support from 59 euros a month. Which tasks belong to ongoing care is explained in our article on WordPress maintenance.
Published on Last updated on



