WordPress Security for Business Websites: How to Protect Yours
Updates, passwords, plugins, file permissions and backup. The WordPress security measures that matter for a business site, and what to do if it's hacked.
Published 10 min read
WordPress sites rarely get hacked through sophisticated attacks. Most of the time the way in is mundane: a plugin nobody has updated in two years, a password like “admin123”, or an admin account left behind for a former contractor. The good news is that the same few measures close most of those doors. Below you’ll find what to do, in order of importance, how to tell whether your site has been compromised, and the steps to take if it has.
Where most WordPress hacks come from
WordPress itself gets regular security updates. The problems are around it:
- Outdated plugins and themes. Every plugin is code written by someone else. When a vulnerability is found, the author publishes an update, and bots start looking for the sites that haven’t installed it.
- Abandoned plugins. Some get no updates at all any more. They stay installed for years, with a vulnerability everyone knows about.
- “Nulled” themes and plugins. Pirated copies of paid products, downloaded from dodgy sites. They often come with hidden code that opens a back door.
- Weak or reused passwords. Bots automatically try thousands of combinations on the login page.
- Forgotten accounts. The agency that built the site, a former employee, a test account.
The official WordPress hardening guide stresses the same things: updates, strong passwords, plugins from trusted sources, and backup.
Updates: your first line of defence
If you do only one thing from this article, make it this: keep WordPress, your themes and your plugins up to date.
How to organise updates without breaking the site:
- Turn on automatic updates for minor releases. These usually contain security fixes and are safe. WordPress has done them automatically since version 3.7.
- Decide plugin by plugin. Simple plugins can update automatically. Big ones (the shop, the page builder, forms) get updated after a backup and, ideally, after a test on a copy of the site.
- Delete what you don’t use. A deactivated but installed plugin can still be exploited, because its files are on the server. The same goes for extra themes. Keep the active theme and one default theme as a fallback.
- Check your PHP version. WordPress recommends PHP 8.3 or newer. An old PHP version no longer gets security fixes, even if the site still works.
On a Plesk server, WordPress Toolkit shows all your WordPress sites, the updates waiting and any plugins with known issues. It can also make a staging copy of the site, so you can try an update there first.
How to tell if a plugin is abandoned
A plugin’s page in the WordPress.org directory shows when it was last updated and which WordPress version it was tested with. A plugin not updated for over a year and tested against an old version is a warning sign. Look for a maintained alternative before a problem appears, not after.
For paid plugins, check that the licence is active. Many only get updates while the licence is paid, and a shop plugin left without a licence becomes, within a few years, the oldest thing on your site.
Accounts and passwords
The WordPress login page is under constant attack from bots. It’s nothing personal. It happens to every site.
- Long, generated passwords. Use a generator, not a password you’ve made up. The WordPress guide advises avoiding names, your company name, dictionary words and short passwords. A password manager for teams solves the problem of keeping track of them.
- Two-factor authentication. You switch it on with a plugin, and it asks for a code from a phone app on top of the password. For admin accounts it’s an easy decision. We explain the principle in two-factor authentication for business.
- No “admin” username. It’s the first name bots try. Create an administrator with a different name and delete the old one, assigning its content to the new account.
- The right role for each person. Someone who writes posts needs the Editor or Author role, not Administrator. Fewer administrators means fewer dangerous accounts if one is compromised.
- A regular review. Every three months, open Users and delete the accounts of people who no longer work on the site.
Limiting login attempts helps as well. A security plugin or the server settings can block an IP address after a few wrong passwords.
Server and file settings
A few settings are done once and stay put:
- Disable the file editor in the WordPress dashboard. Add the line
define( 'DISALLOW_FILE_EDIT', true );towp-config.php. Someone who gets into the dashboard with a stolen account can then no longer edit the theme or plugin code directly. - Correct permissions. The WordPress guide recommends 755 for directories and 644 for files, with
wp-config.phpmore restrictive. Permissions of 777, set “to make it work”, let any process on the server write over your files. - HTTPS across the whole site, including the admin dashboard. Otherwise your password travels unencrypted. The steps are in our article on SSL certificates and moving to HTTPS.
- No forgotten files. Backup
.ziparchives left in the site folder, test files, old copies likeold-site/. Anyone can download them if they guess the name.
Access to the admin dashboard
The /wp-admin/ area doesn’t need to be as open as the rest of the site. The WordPress guide suggests an extra server-level password on the admin directory. Alternatively, if all your administrators work from the office, access can be limited to the company’s IP address. One caution: some plugins use the admin-ajax.php file in that same directory for features visitors see, so test the site after adding a restriction like this.
There’s also the XML-RPC interface, used by some mobile apps and older integrations. If you don’t use it, it’s worth disabling, because bots often use it for password guessing.
Changing the database table prefix from wp_, or hiding the login page, come up often in guides. They help a little. The WordPress documentation presents them as secondary measures, not basic protection.
Security plugins: what they do and don’t do
A security plugin can scan your files, block repeated login attempts and tell you when something changes. It’s useful, especially for the alerts.
It doesn’t replace updates, though. A security plugin won’t fix a vulnerability in another, outdated plugin. And if you install three security plugins at once, they get in each other’s way and slow the site down. Pick one, configure it and read its alerts.
On the server side, your hosting can add a web application firewall and antivirus scanning of your files. Ask your provider what already runs, so you don’t duplicate the same features inside WordPress.
Signs your WordPress site has been hacked
Sometimes a hack is obvious: different content appears on the home page. More often, the attacker wants to go unnoticed so they can use the site for as long as possible. Signs to watch for:
- visitors on phones get redirected to other sites, while everything looks normal from your own computer;
- pages with titles in other languages, or about products you don’t sell, show up in search results;
- the browser or a search engine displays a warning that the site is dangerous;
- new administrators appear that nobody created;
- the server sends spam, and your company emails start landing in customers’ spam folders;
- the site suddenly becomes slow, because it’s running someone else’s code.
That last sign can be confused with other causes. Our article on slow website causes helps you tell them apart.
What to do if your site has been compromised
The steps, in order:
- Don’t delete anything in a hurry. First make a copy of the site as it is now. It helps work out how they got in.
- Change every password: WordPress admin accounts, the database, FTP, the hosting control panel and the email accounts on the domain.
- Restore from a clean backup taken before the hack. This is where the number of days of backup you keep matters: if the attack started three weeks ago and you only have seven days of history, every copy is infected.
- Update everything that was out of date, straight away. If you don’t close the door they came through, they’ll be back within days.
- Look for foreign files left behind after the restore, especially in
wp-content/uploads, where there shouldn’t be any PHP files. - Request a review in the search engines’ webmaster tools if the site was flagged as dangerous.
If the site held customer data (accounts, orders, form submissions), also look at your GDPR notification obligations. A personal data breach may have to be reported to the data protection authority (in Romania, ANSPDCP), and the deadlines are short.
Backup: your safety net
Every measure above lowers the risk. Backup is what saves you when the risk materialises anyway. For a WordPress site, the backup needs to include both the files and the database, be kept for several days, and have at least one copy stored off the server. We describe the setup in detail in our guide to WordPress site backup.
Frequently asked questions
Is WordPress insecure?
Not in itself. WordPress core gets regular security updates and has a dedicated security team. The risk mostly comes from plugins, themes and passwords, in other words from what each owner adds and how they manage it. If you’re wondering how WordPress relates to hosting, our page on whether WordPress is a web host explains the difference.
How often should a WordPress site be updated?
Check for updates every week and install security updates as soon as you can. Major updates to complex plugins can wait a few days, until after a backup and a test. A site left without updates for a few months piles up publicly known vulnerabilities.
Is a free security plugin enough?
For a brochure site, a well-configured free plugin, plus updates, strong passwords and backup, covers the usual risks. Paid versions usually add firewall rules that update more often, and support. They don’t make up for a site that isn’t updated.
Who is responsible if the company website gets hacked?
It depends on your contract. The host is usually responsible for the server, and the site owner, or the agency that maintains it, for WordPress, plugins and accounts. Agree in writing who does the updates, or each side will assume the other is doing them.
Who should have an administrator account?
As few people as possible: usually one person in the company and whoever maintains the site technically. Everyone else gets a role with limited rights that matches what they do. When a contractor finishes their work, their account is deleted or downgraded the same day.
Do I need to change hosts after a hack?
Not necessarily. If they got in through an old plugin or a password, the problem follows you to any server. Moving makes sense when the server runs outdated software, has no backup, or the provider won’t help you investigate.
When it’s time to ask for help
You can handle updates and account clean-ups yourself from a well-organised dashboard. Bring in a technician when the site has already been hacked, when you don’t know which plugins are critical to how it works, or when nobody in the company has time to check for updates every week.
On TECH Consult web hosting, WordPress sites run with WordPress Toolkit in Plesk, daily R1Soft backup and SSL certificates included. If you’d also like someone to look after the rest of your company’s IT equipment, see our IT maintenance service.