radykal | Support Center Chooser

For which product do you need support?

Fancy Product Designer Multistep Product Configurator

Start a new topic

WP Clean Old Data & Media

WORDPRESS WooCommerce


Regarding different discussions here and after my own research for a solution reducing space on the server:


1, Delete media files after X days/months (/uploads/fancy_products_uploads) 


2, Clear the database after X days/months (especially _fpd_data stored in woocommerce_order_itemmeta as it causes a lot of data)


3, Optional: Connecting the frontend user upload with AWS S3 or similar


Thanks!




8 people have this question
1 Comment

This process can be done without any new feature to the plugin.


1. We do the same on our servers with Cron-Jobs. Most provider are providing Cron-Jobs which are running linux commands in a specific time interval. For example you can use this command:


find path/to/folder -maxdepth 1 -mindepth 1 -path "/*" -mmin +15 -exec rm -rf {} \;


This will delete all files in the folder directory that are older than 15 minutes. Here some tutorials about Cron Jobs:


2. There are third-party plugins that  allows to delete specific post types which are older than a specific date.


Orders in WooCommerce are custom post types. As soon as you delete an order, it will also delete the related order item meta data.

Login or Signup to post a comment