Install
Prefer to watch? This 5-minute video walks through every step below on our test site.
- In your dashboard, go to Plugins → Add New and search for “Moatline Malware Scanner”, or upload the plugin zip.
- Activate it. The set-up wizard opens: say what kind of site it is and who logs in, review the protection plan, add your alert email and two-step login, and lock the site. Nothing changes until you click Apply, every change can be undone on the last step, and your first scan runs in the background meanwhile. You can skip it, or run it again later from Settings → Advanced.
The Malware Scanner menu has six tabs: Overview (score, lock state, what to do next), Scan & Clean, Protect, Advisor, Activity and Settings. The Simple / Advanced switch at the top right hides or shows the fine-tuning options.
Requires WordPress 5.0+ and PHP 7.0+. Works on Apache, LiteSpeed and Nginx.
Run a scan
Open Malware Scanner → Scan & Clean and click Scan now. Past scans are listed under Scan history. The scan runs in separate steps, so large sites don't hit server time limits:
- Must-use plugins, plugins and every installed theme
- WordPress core files,
wp-config.phpand the site root - Drop-ins and
wp-login.php - Fake image files and payload files used by known malware
- PHP files in the uploads folder
- Posts, pages, revisions, Elementor data and widgets
- The live home page, loaded the way a logged-out visitor sees it, to catch scripts added while the page is built
- The database: malicious options, cron jobs and rogue administrators
You can Pause a scan and Resume it later, even after leaving the page (within 24 hours), or Stop it to start fresh.
Understand the results
Each finding shows its type, how serious it is, where it is and the malware family it matched.
- Modified plugin file: the file differs from the official WordPress.org release. Reinstall that plugin to replace it with a clean copy.
- Webshell or PHP in uploads: PHP files never belong in uploads. Delete the file with your host's file manager or FTP.
- Injected script in a post or widget: click Edit content, switch to the code editor and remove the injected script.
- Hidden administrator: an administrator account that doesn't show on the Users screen. Attackers hide their accounts this way. If it's your own agency account, hidden on purpose so clients can't delete it, add it under Settings → Scans → Trusted agency accounts: one per line, the username, a space, then its email address. Both must match, so an attacker's hidden account is still reported.
- False alarm: click Hide for now to hide it until the next scan. For a finding in the database or settings that you have checked is safe, click Always ignore: it is listed under Settings → Ignored findings, where Stop ignoring brings it back, and if Moatline finds something different in the same place it reports that. For a file or folder, add it under Settings → Scans → Skip these files and folders. Known vulnerabilities can't be ignored; update or remove the plugin instead.
Caching and security plugins such as WP Rocket, LiteSpeed Cache and Really Simple Security rewrite their own files (advanced-cache.php, object-cache.php and similar) when you change their settings. Moatline shows this as a note, not a threat, and still checks those files for malware.
I think I've been hacked
Click I think I've been hacked on the Overview. It opens the checklist we follow when we clean a site: lock the site, run a full scan, remove what it found, change passwords and replace the security keys, check users and plugins added in the last 30 days, and check outside WordPress (Search Console owners and sitemaps, your domain's name servers, verification files and extra folders). Steps tick themselves off when Moatline can see they are done, and the last step gives you a summary to keep or send to a client.
After an infection
Removing the malicious code is only half the job. Attackers usually still have a way back in. Once the scan is clean:
- Change every administrator password and remove admin users you don't recognise.
- On Malware Scanner → Protect, under Users & admins (Advanced view), click Log out everyone and Regenerate keys and salts.
- Revoke application passwords you don't use.
- Click Clean database on Scan & Clean to remove known reinfection cron jobs. Everything it removes is backed up first, and Restore last backup puts it back.
- Turn on Lock, block PHP in uploads and turn on two-step login. The Security Advisor lists what is still missing.
- Scan again a day later to make sure nothing came back.
For a full walkthrough, see our guide on how to remove malware from WordPress.
wp-content/plugins and wp-content/mu-plugins with your host's file manager.Security Advisor
The Advisor tab lists Recommended for this site: a short list Moatline builds from how your site is actually set up (and from your answers in the set-up wizard), so you only see what applies to you. The top three are on the Overview too, and each group on the Protect tab has a Turn on button for its own recommendations. Each item has a label:
- Urgent: a setting an attacker can use right now, such as new accounts getting a powerful role when anyone can register.
- Recommended: protection that suits almost every site, such as two-step login for administrators, blocking PHP in uploads, limiting failed logins, email alerts and updating Moatline automatically.
- Check: something to look at yourself, such as backups that are missing or old.
- Suggestion: worth considering, but it depends on the site. For example, turning off “Anyone can register”, hiding usernames or moving the login page.
Click Apply on an item, or Apply all recommended to turn on every Urgent and Recommended item at once. Suggestions are always left for you to decide. Every change can be undone under History on the Advisor tab. Click Not for me to hide an item; it comes back only if something on the site changes. The list is checked again after every plugin change.
Lock
Lock makes the site read-only for code and accounts. While it is locked, nobody can install, upload, delete or edit plugins and themes, create users, make anyone an administrator, change the registration, site address or admin email settings, or upload code files. That stops the attacks that work through a stolen password, a stolen remote-management key or a plugin bug, because the attacker can't add a backdoor plugin or a new administrator.
Turn it on in the set-up wizard, or under Malware Scanner → Protect → Files & code → Lock. A padlock then appears in the admin bar at the top of every dashboard page.
- Unlock: click the padlock and choose Unlock for 30 minutes or Unlock for 1 hour. The site locks itself again when the time is up, or click the padlock and Lock now when you're done.
- Every unlock is logged and emailed to your alert address, with the user and IP address, so you'll know if someone else did it.
- Ask for a password to unlock (optional): unlocking then also needs your password, or your two-factor code if you use it, so someone with a stolen login can't unlock the site. Recommended for shops and sites managed by an agency.
- Allow updates while locked (on by default): plugins, themes and WordPress can still be updated from Dashboard → Updates without unlocking. Updates only replace software with its newer official version; installing, uploading and deleting still need unlocking.
Lock doesn't get in the way of normal work: posts and pages, media uploads, comments, logins, shop orders, new customer accounts, WordPress automatic updates, WP-CLI and your host's tools all keep working. Every blocked attempt is written to the Activity Log, and a blocked new administrator is emailed to you.
DISALLOW_FILE_MODS was added to wp-config.php by your host or by hand, the padlock shows Locked by host and the site can't be unlocked from WordPress. Earlier versions of Moatline used that line; version 1.3 moves it to Lock for you, so automatic updates keep running.File editor & uploads
Three lighter settings sit under Lock on the Protect tab:
- Turn off the theme and plugin file editor adds
DISALLOW_FILE_EDITto wp-config.php, removing the built-in editors attackers use to add code. Installs and updates keep working. - Block PHP in uploads writes a rule to
wp-content/uploads/.htaccess(Apache and LiteSpeed), so a webshell can't run even if one gets uploaded. On Nginx, add the rule shown on the page to your server configuration. - Block web access to the update folder adds a rule to the main
.htaccessso nothing inwp-content/upgradecan be opened from the web (Apache and LiteSpeed). WordPress never needs it, and it stops attacks like the one fixed in WordPress 7.1.4.
Custom login URL
On Malware Scanner → Protect, under Logins, enter a login address such as team-access, switch on Custom login URL and save. Bookmark the new address before you save.
Logged-out visitors who open /wp-login.php or /wp-admin then see a normal “page not found” page, so the new address isn't revealed. Logged-in users aren't affected. Addresses WordPress already uses, such as “login” and “admin”, can't be chosen.
Two-step login
- Go to Users → Profile and find Two-factor login.
- Scan the QR code with an authenticator app (Google Authenticator, Microsoft Authenticator, Authy, 1Password…).
- Enter the 6-digit code and click Update Profile.
- Save the 10 backup codes somewhere safe. Each works once.
Once it's on, password logins over XML-RPC are refused for that user, so the code can't be skipped. Apps should use application passwords.
XML-RPC & Jetpack
XML-RPC is an old remote-access door that attackers use to guess passwords and edit posts. On Malware Scanner → Protect, under Spam & bots, choose a mode:
- Allow: no change (the default).
- Jetpack-safe: only Jetpack's signed requests get through. Pick this if you use Jetpack.
- Block: XML-RPC is refused completely.
You can also refuse password logins over XML-RPC and turn off system.multicall. If you activate Jetpack while XML-RPC is blocked, Moatline switches to Jetpack-safe mode and tells you. On Apache and LiteSpeed you can add a server rule to .htaccess with one click; it's removed when you click again or deactivate the plugin.
The same section can block REST API batch requests from logged-out visitors (the door used by the 2026 wp2shell attacks on WordPress core), hide usernames and turn off application passwords.
Sessions & security keys
- Active sessions lists every logged-in session with IP address and browser, including sessions left behind by deleted users.
- Log out everyone ends every session, including yours.
- Force password reset for other admins makes other administrators set a new password at their next login.
- Regenerate security keys & salts replaces the keys and salts in wp-config.php, which signs out every stolen cookie at once.
Automatic updates
New malware detections reach your site only when Moatline is updated. Under Malware Scanner → Settings → Updates, switch on Update Moatline automatically: each new version then installs by itself 24 hours after it is released. The wait gives time for any problem with a release to be caught first. It covers Moatline Pro too, and works while the site is locked. It is off until you turn it on, as WordPress.org requires.
Copy settings to other sites
Set up one site the way you want it, then give other sites the same Moatline settings: scans, alerts, protection, login options, trusted agency accounts and, with Pro, the Pro features and your report details.
- On the site you set up, go to Malware Scanner → Settings → Copy settings and click Export settings. This downloads a small file. API keys and the agency key are left out unless you tick Include API keys and the agency key; keep the file private if you do.
- On the other site, open the same card, choose the file under Import settings and confirm. Its settings replace that site's.
Scan results and ignored findings are never copied. The custom login address is only switched on where it works, and an empty key in the file never removes a key the site already has. Every import is written to the Activity Log. With WP-CLI: wp moatline settings export --file=moatline.json and wp moatline settings import moatline.json.
Managing many sites? The agency dashboard copies settings to all of them at once, without files.
Agency dashboard (Pro)
Agencies and freelancers can see every site in one place on moatline.io/portal: threats, WordPress and PHP versions, updates waiting, known vulnerable plugins, lock status and the administrators on each site, plus a white-label monthly report for your clients.
- Install Moatline and Moatline Pro on the site.
- Go to Malware Scanner → Settings → Pro → Agency dashboard, paste your agency key (it starts with
mlk_) and save. - The site appears in your dashboard within a minute, with buttons that open the site and its dashboard in a new tab. Custom login addresses from Moatline, WPS Hide Login, All In One WP Security and Solid Security are detected.
With Moatline Pro 1.5 or newer, each site's page in the dashboard has a Lock card. Anyone on your team can lock a site; owners and admins can unlock it for 30 minutes or an hour, for example while a developer installs a plugin. The command reaches the site within seconds, or within 15 minutes if the site's firewall blocks it. Every unlock is logged on the site and emailed to its owner. The page also shows Recent activity: plugin installs, new must-use plugin files and unlocks made on the site itself, and warnings are emailed to your team. Plugin installs need Moatline 1.3.2 or newer.
With Moatline Pro 1.6 or newer, owners can click Copy settings on the Sites page: pick a master site, check its settings, then tick the sites that should get them (use the search box and Tick all for long lists). Sites the dashboard can reach change straight away, the others within 15 minutes, and each site logs the change. Each site keeps its own agency key, scan results and ignored findings, and you choose whether each site keeps its own alert email and whether API keys are copied. A site owner can switch this off under Settings → Pro → Agency dashboard by unticking Let the agency dashboard copy settings to and from this site.
Each site sends a short security summary once a day and after each scan. No posts, customer data, files or passwords are sent. See the privacy policy for the full list. Sign-in is by email link, and you can invite your team from Account. To get an agency key, email support@moatline.io.
Locked out?
Add one of these lines to wp-config.php, above the line that says “That's all, stop editing!”, log in, then remove the line again:
// Bring back /wp-login.php if you forgot your custom login address
define( 'NNMS_DISABLE_LOGIN_URL', true );
// Turn off two-step login checks if you lost your phone and backup codes
define( 'NNMS_DISABLE_2FA', true );
// Unlock Moatline Lock if you can't reach the admin bar
define( 'MOATLINE_UNLOCK', true );
If you can't edit wp-config.php, rename the wp-content/plugins/moatline-malware-scanner folder with your host's file manager. That switches the plugin off.
Uninstalling
Deleting the plugin keeps your settings and everyone's two-step login setup, so a reinstall picks up where you left off. To remove everything, tick Delete all plugin data on the Settings page first.
Lock stops as soon as the plugin is deactivated, so the site can install and update plugins again. The file editor lock and the uploads rule stay on purpose, so removing the plugin never quietly weakens a hardened site. Turn them off on the Protection page first if you want them gone.
Need help?
Email support@moatline.io. If your site is hacked right now, Next Nova Technologies offers hands-on malware cleanup.