• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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 Wordpress site restoration doesn't delete files

thinkjarvis

Basic Pleskian
Server operating system version
Ubuntu 20.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.49 Update #2
When using WP-Tookit to take a backup of a site and then restoring it. I have found that it is not deleting files added to the media library after a restoration.

For context - I am bulk importing products and files into a WooCommerce site.

  1. I create a backup in WP-Toolkit for the specific wordpress install
  2. I run my import process which automatically adds images from an external source to the media library and attaches them to posts
  3. Unfortunately the import failed and created duplicates of images. The image library contains thousands more images than it should.
  4. I go to restore my backup in WP-Toolkit
  5. This has restored the site back to where it was but has not deleted any images from the media library.
  6. I therefore no longer have a true copy of the site and a bloated media library full of images no longer in the wordpress database.
Is a restoration from within WP-Toolkit not supposed to restore the files and database back to the previous version?
Surely this should have overwritten the uploads folder with the old one instead of merging them?


I am assuming here that the restore process merges the old files with the new rather than replacing them from the backup?

Can someone confirm if this is the expected behaviour of restorations from WP-Toolkit?

For context this totally breaks WordPress and caused bloat in the uploads folder.
 
Can someone confirm if this is the expected behaviour of restorations from WP-Toolkit?
Yes, this is expected behavior.

Thank you for your feedback and use case. We will look into this when we will improve the backup feature.
 
Yes, this is expected behavior.

Thank you for your feedback and use case. We will look into this when we will improve the backup feature.
Hi @Mr.D

I would expect the restore to match the backup. Merging seems a bit daft with how WordPress databases work.

I had to purchase a media clenser app to fix the problem.

The pro version can scan the file system / uploads folder and compare it to the media library. It was able to delete all of the non database linked images in bulk - Solving the issue.

Is it possible for this to be considered for a future release? It means the backup and restore function is broken - Because it isnt restoring the site to an earlier version it is merging the two versions.
 
Please consider to restore the site to an empty document root directory. For example you can easily remove existing files from a directory using "File Manager". It is a very easy step. We'll still consider integrating this as an option in future releases, but at the moment it is not much trouble to do a few extra clicks before a restore to overcome the limitation.
 
Please consider to restore the site to an empty document root directory. For example you can easily remove existing files from a directory using "File Manager". It is a very easy step. We'll still consider integrating this as an option in future releases, but at the moment it is not much trouble to do a few extra clicks before a restore to overcome the limitation.
Managing multiple sites - Yes restoration into a different folder first is a lot of trouble. We may have to agree to disagree here.

I do not think this is an option in Plesk? I would have to take the backup, extract it manually into a new folder then manually overwrite files to suit the resoration. This is not a quick process compared to just clicking restore.

Hopefully it can be considered for a future release.

Thanks for providing this work around though. I'll use this every time I need to restore a site from now on instead of the restore button!
 
Back
Top