WordPress website is redirecting to another website how to fix?

iThemesforests.com
2 min readJun 23, 2019

--

Check for Malicious Codes Inserted in WordPress site

If your WordPress website is infected with malicious redirects, check the following areas for suspicious code:

  • Core WordPress Files
  • index.php
  • index.html
  • .htaccess file
  • theme files
  • header.php (in the themes folder)
  • footer.php (in the themes folder)
  • functions.php (in the themes folder)

Few instances of malicious code presence which resulted in randomly redirects visitors to malicious sites on hacked WordPress sites.

WordPress website is redirecting to another website how to fix?

1.Restore your backup file.

Most of the hosting offers regular backup of your wordpress website. You can restore the backup file yourself or ask your hosting team to restore the backup for your. Once backup process is done check if the issue still exist. If the result is same or you don’t have a backup then follow other solutions.

2. Scan your wordpress website

There are various ways of checking your site and in any case you find that your website has been hacked with a malicious script, you need to generate a complete backup of your website. While removing malware from wordpress site you might make any mistake and then that backup acts as your savior. Once you have backed up your complete website, you’re ready to run a website scan using a WordPress Malware Scanner.

3. Find the Malicious Code

There are number of places where you can locate the malicious code on your website.

  • In case, the website is redirecting to an anonymous website(s), then look for the suspicious code in the following areas:
  • check both index.php and index.html!
  • .htaccess file
  • In case your website is triggering visitors for downloads, please have a look at out the following places:
  • Header.php
  • Footer.php
  • Your website’s index file (Check both)
  • Your theme’s files

WordPress website is redirecting to another website how to fix?

--

--

iThemesforests.com
iThemesforests.com

Written by iThemesforests.com

Free wordpress tips and tricks, Mobile and pc fixes, seo tips

No responses yet