Security9 min read
Imunify360 found malware on your WordPress site: what it changed and how to recover
Imunify360 flagged malware on your WordPress site in cPanel. See what its cleanup changed, restore the right files, verify core and plugins, and recover.
By Hamza Ahmad AslamAI & WordPress Developer | Speed Optimization & Site Security

On this page
- What Imunify360 does when it finds malware on WordPress
- Read the list of infected files in cPanel
- Decide what to do with each file
- Verify WordPress core and plugins with WP-CLI
- When to restore the original instead
- Find how the malware got in
- If your host suspended the cPanel account
- Next step
- Frequently asked questions
When Imunify360 finds malware on a WordPress site, its default action is cleanup: it cuts injected code out of a legitimate file, or empties a file that is malicious from top to bottom. Open Imunify360 in cPanel, read the reason and status of every file on its list, and change nothing until you know which files were emptied. The original of each cleaned file can be restored for 14 days unless your host set a different period.
What Imunify360 does when it finds malware on WordPress
Imunify360 is a server security suite from CloudLinux that hosting companies install on their servers. Its malware scanner checks files when they change and during scheduled scans. The host decides what happens to a detection. According to the Imunify360 configuration reference (opens in a new tab), the default action is cleanup, and the other option is to show the file in the dashboard without touching it. A host can also switch on restoring a clean copy from backup first, before that action runs.
Cleanup works in one of two ways:
- If malicious code was injected into a legitimate file, such as a plugin's PHP file or
index.php, cleanup removes the injected part and leaves the rest of the file. - If the whole file is malware, such as a web shell (a script that lets an attacker run commands on your server), cleanup makes the file zero bytes by default instead of deleting it.
Older help pages and some host emails still say files were "quarantined". The Imunify360 dashboard documentation (opens in a new tab) says that, starting with ImunifyAV(+) version 6.2, the Quarantine and Delete actions were removed from Imunify360's interface and command line, and that files quarantined before then can no longer be restored. If your host's message mentions quarantine, ask which action ran on your account.
Imunify360 can scan the database too. Its database scanner supports WordPress, Joomla and Magento 2, and unless the host turned it off, database findings are cleaned and reverted from the same list as files.
Read the list of infected files in cPanel
Open Imunify360 from your cPanel home page. The Files tab lists infected files in four columns: when each file was detected, its path from the server root, the reason and the status. The History tab records every action taken on every file, and it shows whether a scan, a manual action or the real-time scanner caused it.
The reason column holds a signature ID, and the Imunify360 user interface guide (opens in a new tab) explains how to read one. Take SMW-SA-05155-wshll as an example:
| Part of the ID | Example | What it tells you |
|---|---|---|
| First part | SMW | SMW is server malware, CMW is client malware |
| Second part | SA | INJ means code was injected into a legitimate file; SA (standalone) means the whole file is malicious |
| Third part | 05155 | The number of the signature |
| Fourth part | wshll | The kind of malware, for example wshll for a web shell; mlw stands for malware |
Some IDs carry a fifth part, a number such as 0, which is the version of the signature.
The second part says what was detected, and the status says what happened to the file. If the status is Cleaned or Content removed, an INJ file most likely had code cut out and still holds the rest of its code, and an SA file was most likely emptied.
The status column has four values. Infected means a threat was found; if an info icon sits next to it, cleanup failed and the icon shows why. Cleaned means the file was cleaned up. Content removed means the file's content was removed during cleanup. Cleanup queued means the file is waiting for its turn.
Decide what to do with each file
Take a backup of the site's files and database before you change anything, so you can go back if a replacement goes wrong. Then work down the list with this table. The file paths are examples.
| What the list shows | Where the file is | What it means | What to do |
|---|---|---|---|
Cleaned, INJ | WordPress core: wp-admin/, wp-includes/ or a root file such as index.php | Injected code was cut out of a core file | Replace core with a fresh copy of the same version and language, then verify the checksums |
Cleaned, INJ | A plugin or theme from the WordPress.org directory | Injected code was cut out of a plugin or theme file | Reinstall it at the version you run; plugins can then be checksum-verified, themes cannot |
Cleaned, INJ | A premium plugin or theme, or your own code | Nobody can check this file against a public checksum | Compare it with a fresh download from the vendor or with your own repository |
Cleaned or content removed, SA | A file WordPress does not ship, such as a PHP file in wp-content/uploads/ | A standalone malicious file was emptied | Delete the empty file, note its path and date, and look for how it got there |
Cleaned or content removed, SA | A core, plugin or theme file the site loads | A file the site needs is now empty, so a page or feature may break | Replace it from a clean source; if you are sure the file was clean, treat it as a possible false positive |
| Infected, with an info icon | Anywhere | Cleanup did not finish | Read the reason on the icon, then replace or clean the file by hand, or ask the host |
| Infected, no icon | Anywhere | Nothing was changed; the malware is still in the file | Clean or replace it by hand as in the rows above, or ask the host to run cleanup |
| Cleanup queued | Anywhere | Nothing has happened yet | Wait, then check the History tab |
Once the list is worked through, load the pages a visitor uses: the home page, a post, a contact form and the admin. On a WooCommerce store, add a product to the cart and go as far as the payment step. A blank page or a critical error after cleanup can mean a file the site needs lost code. Your host's PHP error log names the file where the error happened.
Verify WordPress core and plugins with WP-CLI
If your host gives you SSH access, WP-CLI (the WordPress command line tool) can compare your files with the checksums WordPress.org publishes for each release. wp core verify-checksums (opens in a new tab) checks core, and wp plugin verify-checksums checks plugins from the WordPress.org directory.
# Core files against the official release of your version and language
wp core verify-checksums --include-root
# Every plugin from the WordPress.org directory, without running the site's plugins and theme
wp plugin verify-checksums --all --skip-plugins --skip-themes
wp core verify-checksums does not load WordPress, so it is safe to run on an infected site. The plugin commands do load it, and the global --skip-plugins --skip-themes options keep normal plugins and the theme from running while they work. Must-use plugins, drop-ins such as object-cache.php and wp-config.php still load.
Example output, when a core file differs from the release:
Warning: File doesn't verify against checksum: wp-includes/version.php
Error: WordPress installation doesn't verify against checksums.
To replace core with a clean copy, first find the version and language you run, because a download without --locale is the English package. The verify-checksums page also recommends passing your site's --locale and --version if verification fails.
# Shows the WordPress version and the "Package language", for example en_US or de_DE
wp core version --extra
# Core at that version and language, without the default themes and plugins
wp core download --version=<version> --locale=<package language> --skip-content --force
--force overwrites files but does not remove files an attacker added. Run wp core verify-checksums --include-root again and read every File should not exist warning above the result: extra files do not make the check fail. Delete unknown PHP files, and ask the host before removing anything else, such as .user.ini or .well-known/.
For a plugin from the WordPress.org directory, reinstall the version you run. Use this only for plugins from WordPress.org: if a premium plugin's folder name matches a directory slug, --force replaces it with a different plugin.
# Replace plugin-slug with the plugin's folder name; note the version it prints
wp plugin get plugin-slug --field=version --skip-plugins --skip-themes
# Reinstall that exact version, typed in by hand
wp plugin install plugin-slug --version=<version> --force --skip-plugins --skip-themes
Run both checks again afterward. Core should report that the installation verifies against checksums, with no warnings above that line. Themes and premium plugins have no public checksums: reinstall a WordPress.org theme with wp theme install <slug> --version=<version> --force, and premium code from the vendor's download.
Without SSH, the WordPress.org guide for a hacked WordPress site (opens in a new tab) says you can replace the wp-admin and wp-includes folders safely with the same version over SFTP. It also warns against the reinstall buttons in the WordPress admin: they overwrite files but do not remove files an attacker added.
When to restore the original instead
The restore original action appears for a cleaned file when Imunify360 still holds the original. It puts the file back exactly as it was before cleanup, so if the detection was right, it also puts the malware back. Use it only when you have read the file and are confident it was clean, for example a script you wrote yourself that the signature misread.
The time limit is short. By default the original stays available for 14 days, and a host can lower that to one day. After that, a clean copy has to come from a backup or from the vendor.
Your host may hide the ignore list tab from cPanel users; showing it is the host's setting. Reporting a false positive to Imunify360 is a command run on the server, so send your host the file's full path and the signature ID from the reason column, and ask them to submit it.
Find how the malware got in
Cleanup removes what the scanner recognized. It does not close the way in, such as an outdated plugin, a stolen password or a backdoor the signatures did not match. While that stays open, the attacker can put the same files back.
Run a second check that does not depend on Imunify360's signatures. The steps to scan WordPress for malware online and on the server include file dates, unknown admin users and PHP files in places WordPress never puts them. Then change every password that touches the site: WordPress administrators, cPanel, SFTP and FTP, and the database user in wp-config.php. Update everything, and delete plugins and themes you do not use. The full order for cleaning a hacked WordPress site covers what to do between those steps and when a restore beats a cleanup.
If your host suspended the cPanel account
Imunify360 cleans files; suspending the account is a separate step your host takes in WHM, cPanel's server panel. According to cPanel's account suspension documentation (opens in a new tab), the host can record a reason when it suspends an account, and if it locks the suspension, only someone with root access to the server can lift it. Ask for that reason first, because it tells you what they expect fixed.
If cPanel asks you for a new password rather than showing a suspension, Imunify360 may have found the old one compromised. The configuration reference has that password reset switched on by default, and you set a new password through cPanel's reset process.
Then send the host a short report, for example:
Subject: Malware cleanup finished for example.com, please review the suspension
Account: <cPanel username> Domain: example.com
Imunify360 detections reviewed: <number> files (attached: path, reason, status, what I did)
Replaced from clean sources: WordPress <version> core; plugins <slug and version for each>
Checksums: wp core verify-checksums and wp plugin verify-checksums --all now pass, premium plugins skipped (output attached)
Emptied standalone files removed: <paths>
Passwords changed: WordPress administrators, cPanel, SFTP/FTP, database user
How it got in: <what you found, or "still investigating">
Please rescan the account and let me know if anything else is needed to lift the suspension.
Next step
If this is the first time the site has been hacked, the guide to fixing a hacked WordPress site takes you through each stage in order, from the first signs to keeping the site clean afterward.
If you would rather hand it over, my WordPress malware removal service starts with a free assessment. A standard cleanup of one site with working hosting access is a fixed $99, and if the same infection comes back within 30 days of the cleanup, I clean it again free.
Frequently asked questions
Does Imunify360 delete WordPress files?
Not by default. Cleanup removes injected code from a file, and a file that is malicious throughout is made zero bytes instead of being deleted, unless the host changed that setting. According to the Imunify360 dashboard documentation, the Delete and Quarantine actions were removed. The History tab in cPanel shows what was done to each file.
How long can I restore a file Imunify360 cleaned?
The original stays available for 14 days by default, and a host can set that as low as one day. Within that period, the restore original action puts the file back exactly as it was before cleanup, malware included if the detection was right. After it, use a backup or a fresh copy from the vendor.
Why does Imunify360 keep finding malware after I restore a backup?
A backup taken after the break-in holds the same malicious files, and the way in is still open. Restore from a backup older than the break-in if you have one and scan it before it goes live, then update WordPress, plugins and themes and change every password before the site goes back online.
Can I run an Imunify360 scan myself from cPanel?
Only if your host allows it. The scan button appears in cPanel when the host gives users that permission, and the setting is off by default. If you cannot see it, ask your host to rescan the account after you have replaced the affected files.
How this article was made: drafted with AI assistance from a researched brief, then checked against primary documentation before publishing.
Message
Ask me about your site
Tell me what is wrong or what you need built. I reply by email.
Share this article
Keep reading
Security10 min read
cPGuard supply chain attack: check your server and WordPress sites
The cPGuard supply chain attack put root-level server credentials at risk through a malicious automatic update on November 2, 2026. Check your cPGuard update history first, even if you have already patched the server.
- Security
- WordPress
- Incident Response
Security11 min read
DreamHost data breach: what to check on your WordPress site now
The DreamHost data breach exposed FTP/SFTP credentials and some webmail accounts, putting affected WordPress sites at risk of unauthorized changes. Start by checking DreamHost's reset notice and securing your file-access and email accounts.
- Security
- WordPress
- Incident Response
Security12 min read
Ultra Addons for Contact Form 7 vulnerability: check, update and recover
The Ultra Addons for Contact Form 7 vulnerability (CVE-2026-102435) affects plugin versions 3.5.54 and earlier when PDF Generator is enabled and a form uses it. Version 3.5.55 fixes the flaw. Check your installed version and PDF Generator settings first, then update and look for signs of deleted files.
- WordPress
- Security
- Plugins