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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.