• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Replace a folder and all contents rather than replace changed files?

thinkjarvis

Basic Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
Version 18.0.59 Update #2
Hi we are trying to recover from a malware attack on a specific website (Not one I coded thank goodness!)

I am trying to manually replace wordpress files and folders with an original copy from the wordpress repository.

I want to do the following in the least disruptive way possible:
If I put a random file in wp-admin folder
upload a fresh zipped copy of wp-admin folder and select overwrite existing files
the random file is still there because it wasnt in the fresh zip copy

I am trying to remove files that shouldnt be there so I need to replace an entire folder and its contents not just replace files that existing the new zip.

If I cannot do this in an 'automated' way then I'll have to delete the original folder and then unzip the new one.
This will disrupt the site.

Any ideas how I can replace an entire folder and files rather than only replacing the individual files that have been changed?
 
The question is can I replace an entire folder including files that arent present in the new folder.

If you extract a zip file from the file manager it replaces files that are present but does not delete items that arent present.

I am trying to remove malicious files that shouldnt be there by replacing entire folders with the original copies from source.

So the question isnt how to remove an entire folder before restoring it
Im trying to avoid downtime - Deleting the folder first would break things so I just want to replace the entire folder to get rid of files that shouldnt be there.

A standard extract files command from plesk interface doesnt remove files that arent present in the new copy.
 
You cannot directly unzip and auto-remove files that are not part of the zip. You will need to remove the folder first.
 
Back
Top