Skip to content

Conversation

@peoyli
Copy link

@peoyli peoyli commented Nov 22, 2025

Hi Lester,

This PR introduces several small but meaningful enhancements to WP-DBManager with a focus on improving usability, readability, and traceability without changing core functionality or breaking existing behavior.
All patches are self-contained, minimally invasive, and follow the plugin’s coding patterns.


1. Optional Backup Comments (Manual + Cron)

Feature Addition

  • Adds a comment field to manual backups
  • Saves comments in a small .txt file alongside the backup
  • Automatically creates a timestamped comment for cron-based backups
  • Displays associated comments in the Manage Backup DB list
  • Removes comment files when their backup file is deleted

Benefit: Makes it far easier to identify the purpose of a backup (e.g., before updates, migrations, testing), improving traceability without affecting existing backups.


2. Collapsible “Backup Environment Checks” Panel

The long diagnostic section on the Backup Database page is now wrapped in a WordPress-style collapsible box:

  • Opens automatically if any check reports an error
  • Starts collapsed when all checks pass
  • Fully toggleable by the user
  • Reduces clutter and makes the page much easier to navigate

No diagnostic content was changed — only how it is presented.


3. Clearer Submenu: Add Explicit “Database Info” Entry

Adds a first submenu item labeled “Database Info”, matching other submenu naming and replacing the automatically generated generic “Database” label.
This makes navigation clearer without altering permissions or page structure.


4. Improved Backup Action Button Placement

The action buttons (Download / Restore / Delete / E-Mail / Cancel) on the Manage Backup DB page have been refactored into a reusable function and are now shown:

  • Above the backup list
  • Below the backup list (original behavior)

This improves usability when many backups exist and avoids unnecessary scrolling.


5. Support for Optional Custom Admin Stylesheet

If database-admin-css.css is present in the plugin directory, the plugin automatically loads it for admin pages.
This makes UI customization possible without modifying core plugin files.


6. Additional Small UI Enhancements

  • Automatically selects the most recent backup when entering Manage Backup DB
  • Changes the default “GZIP Database Backup File?” setting from NoYes
  • Minor redirection improvements after creating a backup

Overall Goals

  • Improve daily usability of the plugin
  • Reduce visual noise
  • Make backups easier to understand and manage
  • Add a long-requested feature (backup comments)
  • Maintain backward compatibility and plugin structure
  • Keep each change minimal and easy to review

All new features degrade gracefully and do not affect existing installations.


If you have any questions or prefer some changes to be separated further, I’m happy to adjust the PR.

…s been done.

Transfer the message to be shown on the return page using a URL parameter.
…en on errors, cleaner layout

- Replace always-expanded backup check output with a collapsible section
- Section starts closed when all tests pass
- Automatically expands when any test reports an error
- Keeps manual toggle behavior and reduces visual clutter
- Improves readability and accessibility of the Backup Database page
…tabase” label

- Adds a clearly named first submenu item for database-manager.php
- Replaces WordPress' auto-generated label (“Database”) with “Database Info”
- Improves menu clarity while keeping existing capability requirements
…list

- Adds a comment field to manual database backups
- Saves comments in a .txt file alongside the backup
- Displays stored comments in the Manage Backup DB list
- Cleans up comment files when backups are deleted
- Automatically adds timestamp comments to cron-generated backups
- Improves traceability when performing updates or debugging issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants