Answered

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!




9 people have this question
  • 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.

  • I'm pretty sure all are familiar of the related discussion, but here's a link just in case: https://support.fancyproductdesigner.com/support/discussions/topics/13000022983/page/1?url_locale= It is not so simple as just use plugin to delete old orders. Then you will loose all statistics and details about old orders. The feature request is to have possibility to clear FPD data in old orders. There is no plugin for that. FPD should have some maintenance routine available to have it clear FPD data from orders that are older than certain date.
  • Hello everyone, hello rady kal,


    The immense database size affects us a lot and unfortunately this often leads to crashes in our shop. Which of course is very annoying!

    Is there now a solution to reduce the size of the database or at least to control it?

    We, like probably many others, would be very grateful if the problem could be taken up again.


    Thank you very much, best regards Chris

Login or Signup to post a comment