Managing form submissions efficiently is crucial for maintaining a clean and optimized WordPress website. Over time, form submissions can accumulate and take up valuable database space. If you want to remove Ninja Forms submissions automatically after a certain period, this article explains how you can achieve that using Ninja Forms and the WP Crontrol plugin.
Why Remove Ninja Forms Submissions Automatically?
Ninja Forms submissions contain user data that may not always need to be stored permanently. Automatically removing old submissions helps with:
- Reducing database size
- Improving website speed and performance
- Complying with data retention policies
- Keeping your admin dashboard organized
Step-by-Step Guide to Automatically Remove Ninja Forms Submissions After a Specific Time
1. Enable Submission Expiration in Ninja Forms
Ninja Forms offers a built-in feature to expire submissions after a set number of days.
- Go to your WordPress Dashboard.
- Navigate to Ninja Forms > Forms and select the form you want to edit.
- Click on the Emails & Actions tab.
- Find the Record Submissions action and enable the option Set Submissions to expire?
- Enter the number of days after which you want the submissions to be deleted (e.g., enter “1” for one day).
This method schedules automatic deletion at the end of each day (e.g., 12:00 AM). All submissions older than the specified days will be removed.
Screenshot:

2. Manually Run Ninja Forms Submission Deletion Immediately Using WP Crontrol
If you need to delete all existing Ninja Forms submissions right away, Ninja Forms does not offer a one-click immediate delete. However, by using the WP Crontrol plugin, you can run the scheduled deletion task manually.
Steps:
- Install and activate the WP Crontrol plugin from the WordPress plugin repository.
- In your WordPress dashboard, go to Tools > Cron Events.
- Select the All Events tab.
- Search for the event named
nf_submission_expiration_cron
. - Click on Run Now next to this event.
This will immediately delete all submissions that are due for expiration, including those submitted today. The process may take a few seconds depending on how many submissions you have stored.
Screenshot:

Additional Tips for Managing Ninja Forms Submissions
- Backup Your Data: Before deleting submissions, consider exporting them in case you need them later. Alternatively, you can make a complete backup of your website.
- Adjust Expiration Time: Set an expiration period that suits your website’s data retention needs.
- Monitor Cron Jobs: Ensure WordPress cron jobs are running correctly on your server so scheduled tasks execute on time.
- Use WP Crontrol Safely: Be cautious when running cron events manually; improper use can affect other scheduled tasks.
Conclusion
Automatically removing Ninja Forms submissions after a specific time helps keep your WordPress site clean and efficient. Ninja Forms provides an easy way to set submission expiration, and with the WP Crontrol plugin, you can manually trigger deletion if needed. By following these steps, you ensure your database stays optimized while maintaining control over your form data.
For more information about Ninja Forms features, visit their official documentation: Ninja Forms Documentation.
Leave a Reply