What this usually means
- Extra rules in .htaccess that redirect certain visitors, such as those from Google or on mobile
- Code added to wp-config.php that loads another file or decodes a long string
- A .user.ini or php.ini file that loads code before every page
- Changed file permissions that let others write to the file
How to check, step by step
Take a backup first
Keep the changed version, even if it’s bad, so it can be examined.
Review .htaccess
Look for rules that mention user agents, search engines or domains you don’t recognise.
Review wp-config.php
It should hold your database details, security keys, table prefix and settings, and then load wp-settings.php. Anything else deserves a closer look.
Look for related files
Check for .user.ini and php.ini files in your site folders.
Functions that often appear in injected code (their presence isn’t proof, but it’s worth a closer look):
eval( base64_decode( gzinflate( str_rot13( auto_prepend_file
When to get help
If you find code you don’t understand in wp-config.php, don’t try to edit it live. A mistake can take the site offline. Send us the details and we’ll sort it safely.