This is for a site that has been “optimized” by multiple plugins and may have .png, .jpg, and .webp versions of each image along with backups. This guide will tach you how to remove everything that is unneeded.
- Take a backup of the entire wp-config folder or the whole site.
- In any current image optimizers or caching tools that have image optimization built-in (Such as LiteSpeed), see if there is an option to revert to the original unoptimized images. Enable that if so.
- Disable any .webp functionality.
- If a plugin supports removing backups or the optimized images, run those processes.
- Disable any image optimization tools.
- Via FTP figure out where the most files are and remove any unneeded .zip backups and check the image file structure. Spot any still existing .webp images or .bk.optm.jpg image extensions.
- Via SSH remove all .webp and backup files. CD to the site Uploads folder and then run the following commands. You can exclude -delete to view all files first.
- find . -name “*.bk.optm.jpg” -type f -delete
- find . -name “*.bk.optm.jpeg” -type f -delete
- find . -name “*.bk.optm.png” -type f -delete
- find . -name “*.webp” -type f -delete
- Make sure the site is still working.
- Run one single optimization tool again. We recommend WP compress to optimize the local files and then serve them in .webp format from a CDN. (not stored locally)