Two simple steps that make WordPress harder to break into.
Attackers are especially fond of two routes in WordPress: injecting code through the theme and plugin editor, or dropping a PHP file into the uploads folder. tyrosec closes both with one click – and checks that it works.
Well-known hardening, rarely done.
Every hardening guide says to switch off the WordPress file editor and block PHP in the uploads folder. It rarely happens: edit wp-config.php by hand, write an .htaccess – on every server, for every website.
And whether an .htaccess works at all depends on the web server: under nginx or with AllowOverride None it is silently ignored. You think you’re protected, and you’re not.
Apply, verify, and be able to undo.
tyrosec detects your WordPress installations and shows for each one which hardening is missing. One click sets DISALLOW_FILE_EDIT in wp-config.php or creates an .htaccess that blocks PHP in the uploads folder.
Then tyrosec checks the effect: the configuration must be valid, the website must still respond, and a PHP request to the uploads folder must be rejected. If the hardening doesn’t work, tyrosec rolls it back automatically and tells you why.
What tyrosec changes
- File editor off
define('DISALLOW_FILE_EDIT', true);inwp-config.php: theme and plugin files can no longer be edited in the WordPress admin – not even from a hijacked admin account. tyrosec checks the syntax before and whether the website responds after. - No PHP in uploadsAn
.htaccessin the uploads folder prevents PHP files placed there from being executed. Images and documents keep loading. - Effect checkAfter creating it, tyrosec requests a non-existent PHP file in the uploads folder. Only if the web server rejects it does the hardening count as applied.
- Automatic rollbackIf the website runs on nginx or Apache ignores the
.htaccess, tyrosec rolls the change back and tells you.
Safely reversible
- Back byte for byteUndo restores the previous state of the file exactly.
- Your changes stayIf someone has edited the file since, tyrosec refuses to undo rather than overwrite that change.
- LoggedEvery hardening and undo is logged with person and time in the server’s history.
- Only when enabledLike every measure, hardening only works on servers where you have enabled it locally:
sudo tyrosecd actions enable harden, undo withactions disable harden.
Questions about hardening
What does DISALLOW_FILE_EDIT do?
The constant switches off the theme and plugin editor in the WordPress admin. Whoever takes over an admin account can no longer write code into theme or plugin files directly from the browser. Installing and updating plugins remains possible.
Does the uploads block work under nginx?
An .htaccess only works under Apache with overrides allowed. Under nginx the effect check notices this and tyrosec rolls the change back. For nginx you need a location rule in the server configuration; tyrosec reports PHP files appearing in the uploads folder regardless.
Is this available for other applications?
One-click hardening is currently available for WordPress. For Magento, Shopware, Laravel and other detected applications, tyrosec raises an alert for PHP files in the media folder.
Does this replace a security plugin?
No, it complements one. The hardening closes two common routes, and tyrosec monitors the rest of the server. More under WordPress security.
More features
See what’s happening on your server in two minutes.
Install the agent with a one-liner, wait for the initial scan, done. 14 days free, up to 3 servers, no credit card required.