Duplicate and Auto Draft Cleaner

Description

The Duplicate and Auto Draft Cleaner plugin helps maintain a clean and efficient WordPress database by automatically removing auto-drafts and identifying/deleting duplicate posts and pages.

Key Features:

  • Auto Draft Cleaning:
    • Automatically remove old auto-drafts based on a specified time period.
    • Schedule automatic cleanups with various frequency options (5 minutes, hourly, twice a day, daily, weekly, monthly).
    • Choose whether to move drafts to trash or delete them permanently.
    • Filter by post type.
    • Manual draft cleaning available.
  • Duplicate Post and Page Detection:
    • Detects and lists duplicate posts and pages based on matching titles.
    • Allows manual deletion of selected duplicates.
    • Filter by post type and post status.
  • Automation:
    • Schedule automatic duplicate removal with various frequency options.
  • Settings Page:
    • A dedicated settings page to manage all plugin options.
    • User-friendly interface with helpful tooltips for easy setup.
    • Multi select filter available for both draft and duplicate remover.

Short Description

Automatically cleans up auto-drafts and detects duplicate posts in WordPress to keep your database clean and efficient.

Usage

After activation, an “Auto Draft & Duplicate Cleaner” sub-menu item will appear under the Settings menu on your WordPress Dashboard. Under this sub-menu you can access:

  • Drafts Tab:
    • View a list of auto-drafts, filter by time and post type, and select drafts to delete.
    • Manually clean drafts immediately.
  • Duplicates Tab:
    • View a list of duplicate posts and pages, filter by post type and status, and select duplicates to delete.
    • View the total number of duplicates.
  • Settings Tab:
    • Configure all plugin settings, including automatic draft cleaning, duplicate post removal, and automation frequency.

Settings Options

  • Draft Cleaner:

    • Auto Clean Drafts: Enable/disable automatic cleaning of auto-drafts.
    • Draft Clean Period (Days): Set the number of days after which drafts should be removed.
    • Auto Clean Frequency: Set how often the automatic draft cleaning should run (5 minutes, hourly, twice a day, daily, weekly, monthly).
    • Post Types: Select the post types that should be included when cleaning drafts.
    • Deletion Strategy: Choose whether to move drafts to the trash or permanently delete them.
  • Duplicate Remover:

    • Post Types: Select which post types to include in the duplicate post removal process.
    • Post Status: Select which post statuses should be included when looking for duplicates.
  • Automation:

    • Enable Automation: Enable/disable automatic duplicate post removal.
    • Automation Frequency: Set how often the automatic duplicate removal should run (5 minutes, hourly, twice a day, daily, weekly, monthly).

Support

For support, bug reports, or feature requests, please visit the plugin page on https://mkaion.com/duplicate-and-auto-draft-cleaner.

Credits

Plugin developed by Mainul Kabir Aion.

Installation

  1. Download the plugin ZIP file.
  2. In your WordPress dashboard, go to Plugins > Add New.
  3. Click the Upload Plugin button.
  4. Select the downloaded ZIP file and click Install Now.
  5. Activate the plugin through the ‘Plugins’ menu in WordPress.

FAQ

Q: Will this plugin delete posts or pages permanently?

A: Yes, if you choose “Delete Permanently” as your deletion strategy, the drafts and duplicate posts will be deleted permanently. By default, the duplicates are deleted permanently and drafts are moved to the trash. Be careful when selecting options and deleting posts.

Q: Can I schedule automated duplicate removal?

A: Yes, under the “Settings” tab, you can enable the automation and set a frequency for automatic duplicate removal.

Q: What happens if I change my theme?
A: The default styles will be lost. For this reason, the plugin is using its own stylesheet.

Q: The plugin isn’t working after I updated it. What should I do?
A: If the plugin is not working after updating to a new version, please deactivate and reactivate it.

Q: Where are the settings stored?
A: The settings are stored in the wp_options database table.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Duplicate and Auto Draft Cleaner” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.4.2

* Minor fixes.

1.4.1

  • Fixed the issue where the script was not correctly enqueued and the select all checkbox was not working.
  • Implemented more unique prefixes for functions and options to avoid conflicts with other plugins.

1.4.0

  • Fixed the issue where 5 minutes cron job was not working for auto draft and duplicate remover.
  • Added a custom cron schedule for 5 minutes.
  • Updated the settings to support 5 minutes for automation.
  • Enhanced the schedule_auto_draft_cleanup and schedule_auto_duplicates_cleanup functions to support the 5-minute cron job.
  • Improved the code structure for better maintainability..

1.3.1

  • Fixed the issue where the settings page was cluttered.
  • Changed the help texts to italic format.
  • Added help text as tooltips or beside the options instead of below them.

1.3.0

  • Enhanced UI and added help text to the settings page.
  • Resolved issues where the duplicate tab count was showing error and the post status was not showing.
  • Improved code quality and security.
  • The Plugin is now fully working and tested.

1.2.4

  • Addressed the fatal error in render_duplicates_tab by fixing count argument.
  • Enhanced the duplicate status selection.

1.2.3

  • Fixed the fatal error in render_settings_tab by properly using in_array.
  • Code refactor for better maintainability.

1.2.2

* Fixed the `in_array` error in `render_settings_tab`
* Improved code security.

1.2.1

* Fixed the Post Type filter on Draft tab.
* Resolved critical error on the duplicate tab.
* Fixed Post Status not showing on Settings page.
* Resolved Automation settings not showing.

1.2.0

*   Added "Filter by Time" on the drafts tab with "Most Recent" option
*   Added multi select filter for post type on draft tab.
*   Added multi select filter for post type and post status on the duplicate tab.
*   Added multi select checkboxes for post types on settings.
*   Added multi select dropdown for post status on settings.
*   Automation settings are visible now with more automation frequency options.

1.1.0

*   Added Draft listing to the Drafts tab with columns for title, creation date, and post type.
*   Added draft count on the draft page.
*   Added date filter with several options to filter drafts.
*   Added checkboxes for selecting and deleting drafts from the list.
*   Added a dropdown for "Delete Permanently" or "Move to Trash"
*   Added more options to duplicate remover automation frequency: 5 minutes, hourly, twice a day, daily, weekly, and monthly.
*   Retain Draft Original Titles when moving to trash.
*   Improved the efficiency and readability of the code.
*   Added comments for better understanding.
*   Sanitized input data.

1.0.0

* Initial Release