WP Toolkit includes a set of one-click security measures that close the most common holes hackers use on WordPress sites. This guide shows how to secure WordPress with WP Toolkit security hardening in cPanel, which measures are safe to turn on, and how to undo one if it causes a problem.
Before you start: make a backup
Most security measures can be switched off again, but a few (such as changing the database table prefix or the admin username) can't be undone. Create a backup in WP Toolkit first so you can roll back if anything goes wrong. See the WordPress backup guide in the related links below.
How to open WP Toolkit security measures
- Log in to cPanel and go to Domains > WordPress Management (WP Toolkit).
- Find your site in the list. On its card, click Security. (If WP Toolkit has already found a problem, the card may show a warning such as Fix security or a vulnerability notice instead. Click that.)
- A list of security measures opens, each with an on/off switch and a short description.
- Turn on the measures you want. WP Toolkit applies each one right away.
WP Toolkit groups the measures by importance. The most important ones are already applied on sites installed with WP Toolkit. The rest are recommended but optional, because a few can affect some plugins.
Which security measures should you turn on?
For most sites, it's safe to turn on everything below. The table shows what to watch for.
| Measure | What it does | Watch out for |
|---|---|---|
| Block access to wp-config.php | Stops anyone viewing your database password file over the web. | Nothing, turn it on. |
| Block directory browsing | Hides folder listings. | Nothing. |
| Block access to sensitive files and .htaccess | Blocks log, config and backup files from being downloaded. | Rare plugin conflicts. |
| Disable PHP execution in cache and uploads folders, and in wp-includes | Stops uploaded malware from running. | Badly written plugins that keep PHP in those folders. |
| Block access to xmlrpc.php | Stops a common brute-force and spam target. | Breaks Jetpack, the WordPress mobile app and remote publishing. Leave it off if you use them. |
| Turn off pingbacks | Stops your site being used in pingback attacks. | Nothing for most sites. |
| Disable file editing in the WordPress dashboard | Removes the theme/plugin code editor, so a stolen admin login can't inject code. | Edit files with File Manager instead. |
| Block author scans | Hides admin usernames from bots. | Nothing. |
| Enable bot protection | Blocks known bad bots. | Nothing for most sites. |
| Configure security keys | Generates new WordPress secret keys. | Logs everyone out once. Can't be reverted. |
| Change default database table prefix | Renames the wp_ tables. | Can't be reverted; old plugins that assume wp_ may break. Back up first. |
| Change default administrator username | Replaces an "admin" username. | Can't be reverted. Note your new username. |
The exact wording in WP Toolkit may differ slightly from the names above, but each measure has a description next to it.
Check for vulnerable plugins and themes
Hardening doesn't fix a plugin with a known security hole. WP Toolkit also checks your WordPress version, plugins and themes against a vulnerability database and flags anything at risk on the site card. When you see a vulnerability warning, click it to see what's affected and update or remove that plugin or theme. Keeping everything updated is the single most effective security step. Turn on auto-updates as described in the update guide below.
How to undo a security measure
If your site, a plugin, or the WordPress admin stops working right after you applied a measure:
- Go back to Domains > WordPress Management (WP Toolkit) and click Security on the site's card.
- Switch off the measure you turned on most recently.
- Reload your site. If it works, leave that one off.
Measures that can't be reverted (table prefix, admin username, security keys) need a restore from backup if they cause trouble.
More ways to protect WordPress
- Use a strong, unique admin password and remove admin accounts nobody uses.
- Delete plugins and themes you don't use -- even deactivated ones can be exploited.
- Make sure the site loads over HTTPS.
- The Instant Access Internet Services server firewall also blocks IP addresses after repeated failed logins, which slows down password-guessing attacks.
Common questions
Does hardening make my site slower?
No. The one exception is the admin script concatenation option, which may make the WordPress dashboard load very slightly slower. Visitors won't notice.
I turned on a measure and now Jetpack or the WordPress app won't connect
Switch off the xmlrpc.php block. Those services need it.
My site was already hacked. Will this clean it?
No. Hardening prevents attacks but doesn't remove malware. Restore a clean backup from before the hack, change all passwords, then apply hardening. Open a ticket if you need help.
Related guides
- How to Back Up and Restore WordPress in WP Toolkit
- How to Update WordPress, Plugins and Themes (and Turn On Auto-Updates)
- How to Reset Your WordPress Admin Password
- How to Force HTTPS on Your Website
Still stuck? Open a support ticket and the Instant Access Internet Services team will help.
