A local auto body business came to me through Leadbrew, the SEO agency where I work, with a website whose layout had suddenly broken. The first assumption was a hosting problem. It was not: the site had been hijacked at the database level, and visiting the WordPress admin sent people to an unrelated casino site. This is how I found the real cause, cleaned it up, and verified it.

The Symptoms
- The site layout was broken: styling and scripts were not loading properly.
- Opening the WordPress admin redirected to an unrelated casino website.
- The hosting provider had already reinstalled WordPress core as part of its own malware cleanup, but the problems remained.
What I Found
I started by checking the places malware usually hides: .htaccess, index.php, must-use plugins and the child theme’s functions.php. All were clean, which meant the infection was not in the files. The database told a different story.
- Hijacked URLs. The
siteurlandhomeoptions in the database had been rewritten to an attacker-controlled domain. That is why CSS and JavaScript loaded from the wrong place and why the admin redirected. - Sixteen rogue administrator accounts. Along with the two legitimate admins, there were sixteen extra users with full control, which is the kind of foothold that lets an attacker come back.
- Leftover media records. A handful of fake attachment records pointed at the attacker domain. They were not visible on the site, so I documented them rather than deleting blindly.
What I Did
- Exported the database before changing anything.
- Reset
siteurlandhometo the real domain and confirmed the front end rendered normally. - Removed the sixteen rogue accounts from the users and user-meta tables, then re-verified that only the two legitimate administrators remained.
- Found that the homepage still carried five references to the attacker domain. They came from the theme builder’s cached critical CSS, which had been generated while the URLs were wrong, so the icon font was still being requested from the attacker’s server.
- Regenerated the builder’s cache and re-checked the homepage and key pages.


The Result
- Site URL and home address restored; layout rendering normally.
- Administrator accounts reduced from 18 to 2.
- Attacker-domain references on the homepage reduced from 5 to 0, confirmed on the homepage, About, Services, Contact and Blog pages.
Hardening Recommendations
A cleanup is only half the job. I flagged the remaining work for the site owner: update WordPress core, the theme and all plugins; reset hosting and WordPress admin passwords; run a full malware scan; check Google Search Console for security warnings; confirm daily backups are on; and remove a high-risk file-manager plugin that was still active. The original entry point had not been identified at the time of writing, which is why updates and a scan come next.
Takeaways
- A “broken layout” can be a security incident. Check the site URL settings before blaming the host.
- Clean files do not mean a clean site. Always inspect the database, users and cached assets.
- Verify the fix with evidence: counts of bad references, the user list, and the pages themselves.
Dealing with a hacked WordPress site? I handle full WordPress malware removal, including backdoor and persistence removal, SEO damage repair and security hardening. To keep sites protected afterwards, see my website care plans.