Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I found out that i have a script that get written on top of my core index.php and also the index.php in wp-admin folder. This breaks the theme and dashboard. I have searched and cannot find any malicious code in wp-config.php or wp-settings.php

here is what i get check it

What can this be? Its not due to a plugin i know that.

share|improve this question
1  
Looks like your site has been hacked, follow instructions, provide more info if further help is required. – soulseekah Mar 9 '12 at 21:23
This definitely looks like a hack and unfortunately here is not a good place to get help dealing with it. Properly recovering from hack requires specific expertise and full access to your installation. It's out of QA scope of this site. – Rarst Mar 9 '12 at 21:36

closed as off topic by Rarst Mar 9 '12 at 21:35

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

Core files should never be modified. This is more than likely due to one of two reasons.

a) A plugin has placed this code into one of the core files. If this is the case, you probably shouldn't be using that plugin. A good plugin developer would know not to modify core files.

b) Your site has been compromised, and the script was maliciously injected.

Either way, the easiest way to resolve the issue is to re-upload the core files. I would recommend disabling any plugins you do have to ensure that this is not the issue. Once you re-upload, re-enable each plugin one at a time to see if it adds the script. If so, you know where the issue lies. If the plugins do not add the code, than your site was probably compromised, in which case you should check your server settings.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.