Title: Malicious code injected using the_content
Last modified: August 19, 2016

---

# Malicious code injected using the_content

 *  [cmarket](https://wordpress.org/support/users/cmarket/)
 * (@cmarket)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/malicious-code-injected-using-the_content/)
 * My site coxisms.com has some malicious code which has been injected directly 
   into the post content.
 * I can physically see this code in the posts when editing them and delete it.
 * The problem I have is there are over 700 posts and it will take along time to
   edit each one and remove the offending code.
 * I have upgraded WP to hopefully prevent reoccurrence but I would like to find
   out if there is a way to ‘find – replace’ the offending code form all posts?
 * Can anyone shed any light on the quickest way to do this?
 * Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/malicious-code-injected-using-the_content/#post-1849062)
 * [http://codex.wordpress.org/FAQ_My_site_was_hacked](http://codex.wordpress.org/FAQ_My_site_was_hacked)
   
   [http://wordpress.org/support/topic/268083#post-1065779](http://wordpress.org/support/topic/268083#post-1065779)
   [http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/](http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/)
   [http://ottopress.com/2009/hacked-wordpress-backdoors/](http://ottopress.com/2009/hacked-wordpress-backdoors/)
   [http://wordpress.org/support/topic/253495#post-1017842](http://wordpress.org/support/topic/253495#post-1017842)
 *  Thread Starter [cmarket](https://wordpress.org/support/users/cmarket/)
 * (@cmarket)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/malicious-code-injected-using-the_content/#post-1849250)
 * Not quite what I was asking but and always the case that after I post on here
   I find the answer!
 * How to clean / remove unwanted content from all posts in bulk.
 * What I did was login to my cpanel and go to phpMyAdmin from there I was able 
   to download a CSV version of the table containing all my posts.
 * I was then able to establish that each instance of injected code began with <!–
   more–>
 * I copied the column containing post content to another sheet and with Excel I
   used the ‘Data – Text To Columns’ function using ‘<‘ as the separator. This took
   all of the unwanted code out of the table cells.
 * I then pasted the clean column back into my table, saved as CSV then uploaded
   back in phpMyAdmin.
 * There’s lots of handy sites to help this go smoothly just by searching for ‘import/
   export SQL phpMyAdmin’
 * Now to find out how and prevent some other fool from keep uploading an index.
   htm file and also replacing my index.php file on another site… Getting bored 
   now!
 * Now all bad code gone!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Malicious code injected using the_content’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [cmarket](https://wordpress.org/support/users/cmarket/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/malicious-code-injected-using-the_content/#post-1849250)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
