Skip to content

Instantly share code, notes, and snippets.

@xnau
Last active June 18, 2021 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xnau/a733096f698de4db04395c1fbb31bc84 to your computer and use it in GitHub Desktop.
Save xnau/a733096f698de4db04395c1fbb31bc84 to your computer and use it in GitHub Desktop.
Removing Unused Columns from Participants Database
on any administrative page, add ?pdb-remove-orphan-columns to the URL, then hit return to execute it.
This will delete the columns that do not have a corresponding field definition from the main Participants Database table.
WARNING: THIS WILL DELETE DATA
Always work with a backup for operations like this.
for example:
https://xnau.com/wp-admin/admin/php?pdb-remove-orphan-columns
@xnau
Copy link
Author

xnau commented May 17, 2021

Probably unnecessary because there is no performance penalty for unused columns, however in the interest of good database housekeeping, you may want to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment