Need to reinstall Drupal Site

Robcarter10 used Ask the Experts™
My drupal site is down. According to my web host, it has been infected with PHP based malware. Their recommendation was to backup any data (such as images or style sheets) and remove all of the Drupal installed files and malware. Then, upload a new copy of Drupal from the Drupal website and restore that data. I am not sure which directories I should copy over to the new installation. I know enough to copy over the settings.php so that it will connect to the same database. Past that, I am uncertain. Can anyone help me out?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Back up your database first.

I would replace all Drupal distribution files, modules and themes with freshly downloaded versions.
- Download Drupal
- Go to /modules (Drupal 8), /sites/all/modules (Drupal 7) and download fresh copies of modules found in there.
- Go to /themes, /sites/all/themes and download fresh copies of the themes
- Copy you /sites/default/ directory to your fresh install

Search your /sites/default/files/ directories for any .php files, those are probably malware scripts that have been uploaded to your site.

Once that's done, you will probably need to run the update.php script.
hi you need to use sitelock they will clean your website without needing to re-install it is a common kind of problem i had this issue few years ago once used them that has fixed.

re-installing will not fix the issue.



I followed your steps and the site is working again. Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial