AboutAll ServicesFree EmailOur WorkGuidesFAQContact
ServicesSEO ServicesEcommerce RankingSpeed OptimizationWebsite AuditGoogle Ads ManagementMeta Ads ManagementSocial Media ManagementAnalytics & TrackingShopify Catalogue SEO
Build & SolutionsWordPress DevelopmentEcommerce DevelopmentCustom EcommerceFlying CartFlying AdsFlying Blog
Free ToolsAll free tools →
Shopify toolsShopify Store Launch ChecklistShopify Product CSV CheckerShopify Variant GeneratorShopify Bulk Price EditorShopify SEO Bulk EditorShopify Redirect CSV GeneratorShopify Profit Margin and Fees CalculatorShopify Theme and App DetectorShopify App Weight CheckShopify Tracking CheckShopify Store Name GeneratorMerchant Center Readiness CheckProduct Title BuilderBarcode Generator and GTIN CheckerVolumetric Weight CalculatorDiscount Code GeneratorSpeed Report
Domain and securityEmail Deliverability CheckWebsite Security GradeDNS CheckerWhois LookupDomain Expiry Checker
SEO and crawlingAI Crawler CheckerRedirect CheckerRobots.txt GeneratorSitemap CheckerSchema Markup GeneratorWord Counter and Writing AnalyzerJSON Formatter and ViewerFavicon GeneratorCharacter CounterSERP and Social PreviewSlug GeneratorTitle Case Converter
Ads and trackingShopify Tracking CheckUTM BuilderBreak-even ROAS CalculatorAd Metrics CalculatorLTV and CAC CalculatorROI and Break-even Calculator
Store and speedSpeed ReportShopify App Weight CheckMerchant Center Readiness CheckShopify Profit Margin and Fees CalculatorShopify Theme and App DetectorShopify Redirect CSV GeneratorBarcode Generator and GTIN CheckerImage to WebP ConverterGST Invoice GeneratorE-way Bill Validity CalculatorShopify Product CSV CheckerImage ResizerImage CompressorReduce Image Size in KBPNG to JPG ConverterImage CropperPassport Size Photo MakerJPG to PDF ConverterShopify Variant GeneratorShopify Bulk Price EditorShopify SEO Bulk EditorShopify Store Name GeneratorShopify Store Launch ChecklistProduct Title BuilderVolumetric Weight CalculatorDiscount Code Generator
Profiles and messagingWhatsApp Link & QR GeneratorGoogle Review KitLinkedIn Headline GeneratorUPI QR Code GeneratorEmail Signature GeneratorvCard QR Code GeneratorQR Code GeneratorQR Code Scanner
Dedicated SitesServices ↗Care ↗Firstlight ↗Truefeed ↗Woo2Shopify ↗Shopify ↗Realty Leads ↗AnkShakti ↗

Guide

My WordPress site is hacked. What do I do?

What do I do if my WordPress site is hacked?

7 min read

Short answer

Take a full backup of the site as it is, change every password from a clean device, put the site in maintenance mode, and scan for injected code and unknown admin users. Then clean the files and database, update everything, and close the way in. If Google shows a warning, request a review once the site is clean.

Signs your site is hacked

Visitors are sent to another site, usually only from Google or on mobile. Google shows "This site may be hacked" or a red warning page. Search results show Japanese, pharmacy or casino pages that you never wrote. Your host has suspended the account or emailed about malware. Unknown admin users appear, files change without you touching them, or the site suddenly sends spam email.

Some infections hide from you. They only show to search engines or to visitors who are not logged in, so the site can look fine to you while Google sees something else.

The first hour

Do not delete files in a panic. First take a full backup of the site as it is now, files and database, and keep it. You will need it to trace how the attacker got in.

Then change the passwords for WordPress admins, your hosting account, FTP or SSH, and the database, from a device you trust. If you can, put the site in maintenance mode so visitors are not redirected while you work.

  1. Back up as isFiles and database, kept for tracing
  2. Change passwordsAdmin, hosting, FTP, database
  3. Maintenance modeStop visitors being redirected
  4. ScanUnknown admins, changed files, injections
  5. Clean and patchThen close the way in

Try it now: Website Security Grade →

Find what was changed

Check Users in the dashboard for admins you do not recognise. Compare WordPress core files with a fresh copy of the same version, and check the uploads folder, which should hold images and documents but not PHP files. Look at recently modified files, and at the database for injected links or scripts in posts, options and widgets.

A security plugin scanner helps, but it does not catch everything. Database injections and code that hides from crawlers are the usual misses.

Clean it properly

Replace WordPress core with a fresh copy, reinstall plugins and themes from their original sources, and remove anything abandoned. Remove backdoors and rogue users, then rotate the secret keys in wp-config.php so old logins stop working.

Restoring an old backup is tempting but has two problems: you lose recent orders and content, and the backup often contains the same weakness that let the attacker in.

Close the way in

Cleaning without finding the entry point is a temporary fix. The usual causes are an outdated plugin with a known vulnerability, a weak or reused admin password, or another infected site on the same hosting account.

Update core, plugins and themes, delete what you do not use, turn on two-step login, and limit login attempts. If several sites share one hosting account, check them all, because one infected site can reinfect the others.

  • Outdated pluginA known flaw nobody patched
  • Weak or reused passwordGuessed or leaked elsewhere
  • Infected neighbour siteSame hosting account, same door
Your siteClose the door, not just the damage

Clear the Google warning

Open the Security Issues report in Google Search Console. Once the site is clean, request a review and describe what you fixed. Make sure the site is clean first, since a rejected request slows you down.

If search results still show spam pages, check which URLs are indexed and remove them. A host saying the site is clean does not settle it if Google still sees a problem.

Stop it happening again

Keep everything updated, keep backups stored away from the hosting account, scan on a schedule, and watch uptime. Most reinfections come from an entry point that was never closed.

If you would rather not do this yourself, cleanup is a fixed job and a monthly care plan keeps the site updated afterwards.

How we can help

Want this done for you?

These are the services that fix what this guide describes. Prices are starting prices.

Not sure which you need? Book a free 30-minute call and bring this result, or send us a message. No obligation, no pitch deck.

WordPress malware cleanup service →WordPress support and fixes →Free website security grade check →What website maintenance costs in India →

Want free stats on your site first?

Send us the URL. We pull the numbers from your own accounts and tell you what is wrong before there is any quote, and before there is any contract.

No pitch deck, no obligation. Bring your URL and we will look at it together.