Title: 404 Not Working After Hack
Last modified: August 21, 2016

---

# 404 Not Working After Hack

 *  [thebassman](https://wordpress.org/support/users/thebassman/)
 * (@thebassman)
 * [12 years ago](https://wordpress.org/support/topic/404-not-working-after-hack/)
 * One of my sites was hacked a couple of weeks ago via a vulnerability in a plugin(
   SQL injection). I’ve cleaned up all the spam and removed the plugin, but Google
   is still flagging the site has being hacked because the URLs that were created
   aren’t going to the 404 like it should (example: [http://www.scypa.ca/?p=buy-celebrex-generic-online](http://www.scypa.ca/?p=buy-celebrex-generic-online)).
   I can’t figure out how to resolve this – is there a setting I’m missing?
 * Thanks in advance.

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

 *  [BenSucuri](https://wordpress.org/support/users/rngdmstr/)
 * (@rngdmstr)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/404-not-working-after-hack/#post-4857488)
 * Sounds like it is probably your .htaccess file.
 * Try replacing the .htaccess in your root directory with the basic WP one:
 * [http://codex.wordpress.org/htaccess](http://codex.wordpress.org/htaccess)
 *  [BenSucuri](https://wordpress.org/support/users/rngdmstr/)
 * (@rngdmstr)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/404-not-working-after-hack/#post-4857489)
 *  Thread Starter [thebassman](https://wordpress.org/support/users/thebassman/)
 * (@thebassman)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/404-not-working-after-hack/#post-4857492)
 * That’s what I thought as well. My htaccess file is the basic WP one – still having
   the problem. Any other ideas?
 *  [BenSucuri](https://wordpress.org/support/users/rngdmstr/)
 * (@rngdmstr)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/404-not-working-after-hack/#post-4857493)
 * Do you know what the filename was in the plugin folder that was responsible for
   the spam?
 * By the sounds of it, there is some code referencing that file. Since it is no
   longer there (or empty) the page displays as blank rather than not found.
 * Connect via SSH and use the grep command to search for that filename, and you’ll
   likely find the culprit.
 * If you don’t know what the filename was you can deduce a solution as follows:
 * 1) Replace all your core WordPress files (don’t delete wp-content!)
    2) If that
   doesn’t work, disable plugins by renaming it to ‘plugins2’ in wp-content, and
   then try that spam link again and see if it grants a 404 or not. If you get a
   404, you can replace your plugins one by one until you find the culprit. 3) Change
   your theme in wp-admin and test again, if it grants a 404 you know its your theme
   files

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

The topic ‘404 Not Working After Hack’ is closed to new replies.

## Tags

 * [hacked](https://wordpress.org/support/topic-tag/hacked/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [BenSucuri](https://wordpress.org/support/users/rngdmstr/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/404-not-working-after-hack/#post-4857493)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
