• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

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