Need to reinstall Drupal Site

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?
Who is Participating?
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.

Robcarter10Author Commented:
I followed your steps and the site is working again. Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.