I have been hacked and someone is adding scripts that redirects all pages, how do I stop this ?

Posted May 17, 2019 1.8k views
ApacheAutomated Setups

Please I need urgent attention, this is the third time the hacker is adding redirect script on all the web posts.. All of them,

There is security breach somewhere.

aNY Help !

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

You need to either remove or update the “Wordpress Live Chat” plugin, since it has a vulnerability

  • ‘Wordpress Live Chat’ - I don’t have such plugin installed. Is there anything else I could do to stop the hacker ?


Please note that the majority of the hacks reported are most likely due to outdated applications. Most of the times hackers leave backdoors in the document root of your website to regain access. It is also possible that some plugins have poor scripts, which allows hackers to insert various malformed queries and remotely execute the code and perform any intended action.

You can follow the below steps to harden your website security and prevent it from happening again.

  1. Scan the files and database. Wordfence plugin can be handy here.

  2. Make sure Dangerous PHP functions are disabled. Some common functions to rule out are eval, preg_replace, exec etc.

  3. Disable PHP execution in the uploads folder.

  4. Restrict wp-admin to certain IPs from which you access Wp-admin Dashboard.

  5. Remove unused themes and plugins.

  6. Limit Access to the Wp-Content Directory.

  7. Restrict access to PHP files from plugin and theme directories.

Most of the hardening rules will be configured via .htaccess and make sure that your WordPress core, plugins and themes are all up to date.

Let me know if you have any further questions.

Prakash Jha
Developer Support