=== WPCodeForge Database Cleaner ===
Contributors: wpcodeforge
Tags: database cleaner, database maintenance, database optimisation, database cleanup, database repair
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Inspect, clean and maintain your WordPress database with tools for revisions, metadata, transients, options, cron jobs and database tables.

== Description ==

WPCodeForge Database Cleaner is a lightweight WordPress database maintenance plugin designed to help administrators inspect and remove unnecessary database data safely and efficiently.

Over time, WordPress websites can accumulate database clutter from post revisions, auto-drafts, deleted content, spam comments, expired transients, unused metadata and other temporary or redundant records.

WPCodeForge Database Cleaner provides a straightforward administration interface for inspecting your WordPress database and carrying out targeted maintenance operations without requiring direct access to phpMyAdmin or other database management software.

The plugin provides dedicated tools for inspecting database tables, WordPress options, scheduled cron events, post metadata, user metadata, transient data and registered post types, alongside general database cleanup tools.

Database cleanup operations are performed only after an administrator explicitly requests them.

WPCodeForge Database Cleaner is developed and maintained by James William Steven Parker, creator of WPCodeForge.

== Features ==

= Database Overview =

The Database Cleaner overview provides information about your WordPress database, including:

* Database table count
* Database size
* WordPress database prefix
* Available cleanup categories
* Available database maintenance tools

The overview provides a central starting point for inspecting and maintaining the database.

= General Cleanup =

Remove unnecessary WordPress data from common cleanup categories.

Supported cleanup operations include:

* Post revisions
* Auto-drafts
* Trashed posts and pages
* Pending comments
* Spam comments
* Trashed comments
* Pingbacks
* Trackbacks
* Orphaned post meta
* Duplicate post meta
* Orphaned user meta
* Duplicate user meta
* Orphaned comment meta
* Orphaned term meta
* Orphaned term relationships
* Expired transients
* oEmbed cache data

Cleanup information is presented before destructive operations wherever practical so that administrators can review the data available for removal.

= Database Tables =

Inspect database tables belonging to your WordPress installation.

The Tables interface provides information including:

* Table name
* Row count
* Data size
* Index size
* Total table size
* Storage engine
* Table status

Tables can also be inspected to view their structure and contents.

Where supported by the database server, table optimisation can be requested from the administration interface.

= Options =

Inspect WordPress options stored in the database.

The Options interface provides information including:

* Option name
* Option value
* Option size
* Autoload status

Option values can be inspected before making changes.

Administrators can change the autoload status of supported options and remove unwanted options.

Critical WordPress options are protected from casual removal to reduce the risk of damaging a WordPress installation.

Always review an option carefully before deleting it.

= Cron Jobs =

Inspect scheduled WordPress cron events.

The Cron Jobs interface provides information about scheduled events, including:

* Hook or action name
* Next scheduled execution
* Schedule information
* Arguments

Administrators can inspect scheduled events and remove unwanted cron events where appropriate.

Use caution when deleting cron events created by WordPress, themes or plugins. Removing a required scheduled event may prevent the corresponding functionality from working correctly.

= Post Meta =

Inspect post metadata stored in the WordPress database.

The Post Meta interface provides information including:

* Meta ID
* Post ID
* Meta key
* Meta value
* Metadata size

The plugin can identify post metadata that no longer belongs to an existing post and can identify duplicate metadata entries.

Administrators can review and remove unwanted post metadata.

= User Meta =

Inspect user metadata associated with WordPress users.

The User Meta interface provides information including:

* Meta ID
* User ID
* Meta key
* Meta value
* Metadata size

The plugin can identify metadata belonging to users that no longer exist and identify duplicate user metadata.

Administrators can review and remove unwanted user metadata.

= Transients =

Inspect transient data stored by WordPress.

The Transients interface provides information including:

* Transient name
* Transient value
* Size
* Expiration information
* Autoload information where applicable

Expired transients can be identified and removed.

Transient values can be inspected before deletion.

= Post Types =

View registered WordPress post types and useful information about them.

The Post Types interface provides information including:

* Post type name
* Post count
* Public visibility
* Registration status

The interface helps administrators understand which post types are currently registered on the website.

= Database Maintenance =

WPCodeForge Database Cleaner is designed to make routine database maintenance easier without requiring administrators to manually write SQL queries.

The plugin uses WordPress APIs and the WordPress database abstraction layer wherever appropriate.

== Safety ==

Database cleaning is inherently destructive.

Before performing significant database cleanup, create a complete and restorable backup of your website and database.

WPCodeForge Database Cleaner is designed to provide administrators with information about data before removal, but no database-cleaning plugin can determine the purpose of every custom database record with absolute certainty.

In particular:

* Do not delete options unless you understand what they are used for.
* Do not delete cron events unless you understand what scheduled functionality they belong to.
* Review metadata before removing unusual or custom records.
* Take a complete database backup before performing substantial cleanup.
* Test cleanup operations on a staging website where possible.
* Do not assume that unused-looking data is necessarily safe to remove.

WPCodeForge Database Cleaner does not guarantee that removing database data will improve website performance.

Database cleanup should be treated as a maintenance operation rather than a substitute for proper website optimisation.

== Installation ==

1. Download WPCodeForge Database Cleaner.
2. In your WordPress administration area, go to Plugins > Add New Plugin.
3. Select Upload Plugin.
4. Upload the plugin ZIP file.
5. Install the plugin.
6. Activate WPCodeForge Database Cleaner.
7. Open Database Cleaner from the WordPress administration menu.
8. Review the available database information and cleanup categories.
9. Create a complete database backup before performing destructive operations.
10. Select the maintenance operation you want to perform and follow the on-screen instructions.

== Frequently Asked Questions ==

= Will this plugin delete data automatically? =

No. WPCodeForge Database Cleaner does not automatically delete database data simply because the plugin is installed or activated.

Cleanup operations require administrator action.

= Should I back up my database first? =

Yes.

Always create a complete and restorable database backup before performing significant database cleanup.

= Can this plugin improve website speed? =

Removing unnecessary database data can reduce database size and may help with database maintenance and backup operations.

However, database cleanup does not automatically make every WordPress website faster. Website performance depends on many factors, including hosting, plugins, themes, caching, queries, images and external services.

= Does the plugin require phpMyAdmin? =

No.

The plugin provides its database maintenance interface directly within WordPress.

= Can I inspect database tables? =

Yes.

The Tables section allows administrators to inspect database tables and review information such as table size, row count, storage engine and indexes.

= Can I optimise database tables? =

The plugin provides table optimisation functionality where supported by the database server.

= Can I inspect WordPress options? =

Yes.

The Options section allows administrators to inspect option names, values, sizes and autoload information.

= Can I delete WordPress options? =

Supported options can be removed from the Options interface.

Care should always be taken before deleting options because themes and plugins may rely on them.

= Can I change option autoload settings? =

Yes, where the option is eligible for modification.

Changing autoload behaviour can affect how WordPress loads data, so only make changes when you understand the purpose of the option.

= Can I clean expired transients? =

Yes.

The Transients section can identify expired transient data and remove it.

= What are orphaned post meta records? =

Orphaned post metadata is metadata whose associated post no longer exists.

The plugin can identify these records so they can be reviewed and removed.

= What are duplicate post meta records? =

Duplicate post metadata consists of repeated metadata records associated with the same post and metadata information.

The plugin can identify duplicate post meta records for review.

= Can I remove cron jobs? =

The plugin provides an interface for inspecting scheduled cron events and removing unwanted events.

Cron events should only be deleted when you understand which plugin, theme or WordPress functionality created them.

= Does the plugin work with custom post types? =

Yes.

The Post Types section can display registered WordPress post types and their associated information.

= Does the plugin work with WooCommerce? =

The free version focuses on general WordPress database maintenance and does not provide specialised WooCommerce cleanup functionality.

WooCommerce-specific database maintenance may require dedicated WooCommerce tools.

= Does the plugin replace a database backup plugin? =

No.

WPCodeForge Database Cleaner is a database maintenance tool. It is not intended to replace a proper backup and restoration solution.

= Does the plugin send database information to WPCodeForge? =

No.

The plugin does not require remote database scanning or transmission of your database contents to WPCodeForge to perform its core cleanup functions.

= Does the plugin require an external service? =

No.

The core functionality operates locally within your WordPress installation.

= Is the plugin compatible with WordPress multisite? =

The plugin is designed primarily for standard WordPress installations. Multisite-specific database management requires additional care because network installations have different database and site structures.

Always test database maintenance functionality on a staging multisite installation before using it across a network.

== Privacy ==

WPCodeForge Database Cleaner does not require an external account or remote service for its core functionality.

The plugin processes database information locally within the WordPress installation.

The plugin does not intentionally transmit database contents, database records or website analytics to WPCodeForge.

== Support ==

For plugin information, documentation and support resources, visit:

https://wpcodeforge.com/

== Screenshots ==

1. Database Cleaner Overview showing database size, table count and available database maintenance information.
2. Database Cleanup tools for removing unnecessary WordPress database data.
3. Additional Database Cleanup options and administrator controls.
4. Database Tables showing available table inspection and optimisation tools.
5. WordPress Options showing option information and autoload controls.
6. Cron Jobs showing scheduled WordPress cron events and available controls.
7. Post Meta showing post metadata and available inspection tools.
8. User Meta showing user metadata and available inspection tools.
9. Transients showing transient data and available cleanup options.
10. Post Types showing registered WordPress post types and related information.

== Changelog ==

= 1.0.0 =

* Initial release.
* Added database overview.
* Added general database cleanup tools.
* Added post revision cleanup.
* Added auto-draft cleanup.
* Added trashed post cleanup.
* Added pending comment cleanup.
* Added spam comment cleanup.
* Added trashed comment cleanup.
* Added pingback cleanup.
* Added trackback cleanup.
* Added orphaned post meta detection and cleanup.
* Added duplicate post meta detection and cleanup.
* Added orphaned user meta detection and cleanup.
* Added duplicate user meta detection and cleanup.
* Added orphaned comment meta detection and cleanup.
* Added orphaned term meta detection and cleanup.
* Added orphaned relationship detection and cleanup.
* Added expired transient cleanup.
* Added oEmbed cache cleanup.
* Added database table inspection.
* Added table size and row information.
* Added table structure inspection.
* Added table optimisation.
* Added WordPress options inspection.
* Added option value inspection.
* Added option autoload management.
* Added option deletion.
* Added WordPress cron inspection.
* Added cron event management.
* Added post meta inspection.
* Added user meta inspection.
* Added transient inspection.
* Added post type reporting.
* Added WordPress admin settings.
* Added WPCodeForge branding.
* Added internationalisation-ready plugin structure.
* Added uninstall cleanup.
* Added administrator capability checks and nonce protection.

== Upgrade Notice ==

= 1.0.0 =
Initial release of WPCodeForge Database Cleaner.

== Credits ==

WPCodeForge Database Cleaner was created and developed by James William Steven Parker, creator of WPCodeForge.

Website:
https://wpcodeforge.com/

Copyright © 2026 WPCodeForge. All rights reserved.

== License ==

WPCodeForge Database Cleaner is free software, licensed under the GNU General Public License version 2 or later.

You may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this plugin. If not, see:

https://www.gnu.org/licenses/gpl-2.0.html
