Report this

What is the reason for this report?

Wordpress Sites Forwarding To Unknown Domain

Posted on November 16, 2020
Will

By Will

Hi DigitalOcean, I’m running Ubuntu 20.04 with a LEMP stack. There are two WordPress sites on this Droplet. I recently added the second, and wonder if somehow the WordPress site was compromised, because now both sites are unresponsive, when attempting to visit either site, they both forward to a crypto-based website (Virus?)

Can you help troubleshoot this issue?

Thanks, W



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.
0

Accepted Answer

Thanks, Bobby.

I solved the issue by:

  1. Deleting all files inside /var/www/yourdomain.com where the infected files were placed
  2. Uploading fresh versions of the files via sftp
  3. Resetting passwords, including mysql database user password
  4. Following your instructions above to create .htaccess files
  5. And adding a reCaptcha in the login page

Hi there @willbeing,

Yes indeed, this sounds like the sites might have been compromised.

What I could suggest is running a scan for both websites, you could use a plugin like Wordfence to do so. Another option is to scan both sites with software like Maldet for example.

If you are unable to clear the malicious content, the safest bet would to restore a backup of your sites to a clean state. And then follow the steps from this answer here on how to secure your websites:

https://www.digitalocean.com/community/questions/how-to-secure-wordpress-without-a-security-plugin

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.