Table Module — User Guide

Table of Contents

The Table Viewer module is a built-in database management tool inside Advanced Analytics. It allows WordPress administrators to browse, inspect, search, edit, insert, and delete rows in any database table — including both WordPress core tables and custom tables created by plugins or themes.

Who is this for?
You need the Administrator role (the manage_options capability) to access the Table Viewer. Other user roles will not see the menu item or be able to perform any operations.

Key Features

  • Browse all database tables in your WordPress installation
  • View full row details in a modal overlay
  • Add new rows to any table
  • Edit existing rows with type-aware form fields
  • Delete individual rows or use bulk delete
  • Search across all columns in a table
  • Sort by any column (ascending or descending)
  • Export table data to CSV
  • View detailed table information (structure, indexes, foreign keys, health)
  • Optimize tables to reclaim fragmented space
  • Truncate non-core tables
  • Drop non-core tables
  • Searchable dropdown for quick table navigation
  • WordPress core table identification with WordPress icon indicator

Enable / Disable the Module

The Table Viewer is a standalone module that can be enabled or disabled independently of other Advanced Analytics features.

  1. Navigate to Error Logs → Settings in the WordPress admin sidebar.
  2. Click the “Tables Options” tab (or scroll to the section headed Tables list options).
  3. Toggle the “Enable tables module” checkbox.
  4. Click Save Changes.
wp-admin/admin.php?page=advan_logs_settings
Important: Disabling the module removes the Table Viewer sub-menu item from the admin navigation. No data is lost — the module simply becomes hidden. Re-enabling it restores full access.

Accessing the Table Viewer

Once the module is enabled, find it in the WordPress admin sidebar:

  1. In the WordPress admin menu, look for the Error Logs main menu.
  2. Click the “Table viewer” sub-menu item.
  3. The Table Viewer loads showing the default table (wp_options).
wp-admin/admin.php?page=advan_table

Selecting a Table

The Table Viewer can display any table in your WordPress database. Use the searchable dropdown above the table list to switch between tables.

How to Switch Tables

  1. Click the table dropdown (located above the data table, on the left side).
  2. Start typing the name of the table you want to view. The dropdown filters results in real time.
  3. Click the desired table from the filtered list, or use / arrow keys and Enter to select.
  4. The page reloads and displays the selected table’s data.

WordPress core tables are marked with a WordPress icon () in the dropdown to help you distinguish them from custom tables.

Tip: You can clear the search text by clicking the clear button (×) inside the dropdown input to see all tables again.

Browsing Table Data

The main view displays the selected table’s data in a paginated, sortable list table (using WordPress’s native WP_List_Table interface). Each row shows the table’s columns, with long cell values automatically truncated to 100 characters. Truncated values show an ellipsis ([…]) indicator.

Column Headers

Each column header displays:

  • The column name from the database
  • The column data type (e.g., bigint(20), varchar(255), longtext)

The primary key column’s rows include action links beneath the value: View, Edit, and Delete.

Use the Search box on the right side of the table to filter rows.

  1. Enter your search term in the search input field.
  2. Click the Search button.
  3. The table reloads showing only rows where any column contains your search term (case-insensitive LIKE match).
  4. To clear the search, remove the text and click Search again.
Note: The search operates across all columns in the table, including the primary key column. It uses a SQL LIKE %term% wildcard match.

Sorting Columns

All columns in the Table Viewer are sortable. Click any column header to toggle the sort order:

  • Click once to sort in ascending order (ASC).
  • Click again to sort in descending order (DESC).

A small arrow indicator appears next to the currently sorted column. By default, the table is sorted by the primary key column in descending order.

Pagination & Screen Options

The table displays data in pages. You can configure how many rows are shown per page.

  1. Click Screen Options in the top-right corner of the admin page.
  2. Set the “Number of items per page” field to your preferred value (default is 20).
  3. Click Apply.

The pagination controls at the top and bottom of the table let you navigate between pages. The total number of records and pages is displayed.

Viewing a Record

To see the full contents of a row (including values that are truncated in the list view):

  1. Find the row you want to inspect.
  2. Click the “View” link beneath the primary key value in the first column.
  3. A modal overlay opens displaying all column names and their full values in a table format.
  4. Click the × button or click outside the modal to close it.
  • Copy to clipboard — Click the clipboard icon () to copy the raw HTML content of the row data to your clipboard.
  • Share — On devices that support the Web Share API, click the share icon () to share the row data via your device’s native sharing dialog.

Serialized PHP values are automatically formatted and displayed in a readable format.

Adding a New Row

You can insert new rows into any table directly from the admin interface.

  1. Click the “Add New” button in the page header (next to the table heading).
  2. A form appears with fields for each column in the table.
  3. Fill in the values. Auto-increment primary key columns are automatically skipped (the database assigns them).
  4. Click “Add Row” to insert the record.

Type-Aware Input Fields

The add/edit forms automatically generate appropriate input types based on the database column type:

Column Type Input Type
INT, BIGINT, DECIMAL, FLOAT, etc. Number input (with step=”any” for decimals)
CHAR, VARCHAR Text input (max 255 characters)
TEXT, LONGTEXT, MEDIUMTEXT, TINYTEXT Textarea (10 rows)
DATE Date picker
DATETIME, TIMESTAMP Date-time picker
TIME Time picker
YEAR Number input (1900–2100)
ENUM Select dropdown with defined values
SET Checkboxes for multi-selection
JSON Textarea with JSON placeholder

Editing a Row

  1. Find the row you want to edit.
  2. Click the “Edit” link beneath the primary key value.
  3. The edit form loads with the current values pre-filled.
  4. Modify the values you want to change.
  5. Click “Save Changes” to update the record.
Warning: Do not edit or save records that contain serialized data! Editing serialized values through a plain text field will corrupt the serialization format and may cause data loss. Always make a backup first before editing any data.

Deleting Rows

To delete a single row:

  1. Find the row you want to remove.
  2. Click the “Delete” link beneath the primary key value.
  3. A confirmation dialog appears asking “You sure you want to delete this record?”
  4. Click OK to confirm. The row is permanently removed from the database.
Caution: Deletion is immediate and permanent — there is no trash or undo. Always back up your database before deleting records.

Bulk Actions

To delete multiple rows at once:

  1. Check the boxes next to the rows you want to delete. Use the top checkbox to select all visible rows.
  2. From the Bulk Actions dropdown, select “Delete”.
  3. Click Apply.
  4. The selected rows are permanently deleted.

CSV Export

You can export the current table’s data to a CSV file for offline analysis or backup purposes.

  1. Select the table you want to export.
  2. Optionally apply a search filter to export only matching rows.
  3. Click the “CSV Export” button (located above the table, next to the table dropdown).
  4. A progress bar appears showing export progress.
  5. Once complete, the CSV file is downloaded automatically.
Note: The export respects any active search filter. The Cancel button appears during export so you can abort long-running exports.

Table Information Modal

The Table Information modal provides detailed metadata about the currently selected table.

  1. Click the “Info” button (with the info icon) above the table data.
  2. A modal opens with four sections of information.

Information Sections

Table Structure

Shows all columns with their properties:

  • Column — The column name
  • Type — Data type (e.g., bigint(20) unsigned)
  • Null — Whether the column accepts NULL values
  • Key — Key type (PRI for primary, UNI for unique, MUL for index)
  • Default — The column’s default value
  • Extra — Additional attributes (e.g., auto_increment)

Indexes

Lists all indexes defined on the table:

  • Key Name — The index name
  • Column — The column the index is on
  • Unique — Whether it is a unique index
  • Type — The index type (e.g., BTREE)

Foreign Keys

Shows foreign key relationships (if any):

  • Constraint — The constraint name
  • Column — The local column
  • Referenced Table — The table being referenced
  • Referenced Column — The column in the referenced table

Table Health

Displays table health metrics:

  • Optimization status — Indicates if the table needs optimization (has fragmentation)
  • Row count — Total number of rows
  • Data size — Size of the data in the table
  • Index size — Size of the indexes

The Help tab in Screen Options also shows table metadata including engine, version, row format, row count, data lengths, auto-increment value, creation and update timestamps, and collation.

Optimizing a Table

Tables with fragmented space can be optimized to reclaim disk space and improve performance.

  1. Open the Table Information modal by clicking the “Info” button.
  2. Scroll to the Table Health section.
  3. Click the “Optimize Table” button.
  4. Wait for the optimization to complete. A success or error message appears next to the button.
Note: You can run optimization even when the table is reported as well-optimized. The button is always available. After optimization, the table info automatically refreshes to show updated metrics.

Truncating a Table

Truncating removes all rows from a table but keeps the table structure intact.

  1. Open the Help tab from Screen Options and navigate to the “Config” panel.
  2. Click the “Truncate Table” button at the bottom.
  3. A confirmation message appears: “You sure you want to truncate this table? That operation is destructive”
  4. Click OK to proceed. The page reloads with an empty table.
Danger — Destructive Operation: Truncating is irreversible. All rows in the table are permanently deleted. Make a backup before proceeding. Truncating WordPress core tables is not permitted.

Dropping a Table

Dropping permanently deletes the table and all its data from the database.

  1. Open the Help tab from Screen Options and navigate to the “Config” panel.
  2. Click the “Drop Table” button (only visible for non-core tables).
  3. A confirmation message appears: “You sure you want to delete this table? That operation is destructive”
  4. Click OK to proceed. The table is removed and you are redirected to the default table view.
Danger — Destructive Operation: Dropping a table is irreversible. The table and all its data, indexes, and structure are permanently removed. Make a backup before proceeding. WordPress core tables cannot be dropped.

WordPress Core Tables

The Table Viewer distinguishes between WordPress core tables and custom tables (added by plugins or themes).

Core Table Protections

  • WordPress core tables are marked with a WordPress icon () in the table selector dropdown and the page heading.
  • Core tables cannot be truncated via the Table Viewer.
  • Core tables cannot be dropped — the “Drop Table” button is hidden for core tables.
  • Individual row operations (view, edit, delete) are available on core tables.

Core Tables Include

All standard WordPress tables such as wp_options, wp_posts, wp_postmeta, wp_users, wp_usermeta, wp_comments, wp_commentmeta, wp_terms, wp_termmeta, wp_term_taxonomy, wp_term_relationships, wp_links, and any multisite tables if applicable.

Object Cache Notice

If your WordPress site uses an external object cache (such as Redis or Memcached), the Table Viewer displays a notice at the top of the page:

Object Cache Detected: An external object cache is active. If you make changes to table data, you may need to flush the object cache for the changes to take effect.

This alert reminds you that changes made directly to database rows may not be immediately reflected in WordPress if the affected data is cached in the object cache layer.

Help Tabs

The Table Viewer provides contextual help via the WordPress Screen Options → Help tab at the top of the page. Two panels are available:

Help Panel

  • Overview of how to use the Table Viewer.
  • Instructions for filtering, searching, and selecting tables.
  • Notes on bulk operations and destructive actions.

Config Panel

  • Table metadata: name, engine, version, row format, row count, average row length, data length, index length, data free, auto-increment value, creation time, update time, check time, and collation.
  • Truncate Table button for emptying the table.
  • Drop Table button for permanently removing non-core tables.

Multisite Networks

The Table Viewer is multisite-aware. When accessed from the Network Admin context, the table selector dropdown shows all tables in the database, including tables for individual sites in the multisite installation.

The table switching and all operations correctly resolve the admin URL context (site admin vs. network admin) to ensure proper navigation and redirect behavior.

Troubleshooting

Table Viewer menu item is not visible

  • Ensure the Tables module is enabled in Settings → Tables Options.
  • Verify you are logged in with the Administrator role (or have the manage_options capability).
  • Check if the menu_admins_only setting is enabled — when enabled, only users with manage_options can see the menu.

Changes to data are not reflected on the site

  • If an external object cache is active, flush the cache after making changes.
  • Some plugins cache data in transients or custom caches. You may need to clear those as well.

Edit/delete actions result in errors

  • The database user defined in wp-config.php must have the appropriate MySQL privileges (SELECT, INSERT, UPDATE, DELETE) on the table.
  • Tables without a primary key or unique index may behave unexpectedly during edit operations. The Table Viewer falls back to the first indexed column or the first column in the table.

Serialized data appears corrupted after editing

  • The Table Viewer does not support safe editing of PHP serialized data. If you need to modify serialized values, use a specialized tool or WP-CLI.
  • Always take a backup before editing rows that contain serialized data.

CSV export is slow or fails

  • Large tables may take longer to export. The progress bar shows real-time export status.
  • Use the Cancel button to abort if needed.
  • Consider applying a search filter to reduce the number of exported rows.
Need developer documentation?
See Table Module Developer Documentation for architectural details, class references, sandbox internals, condition evaluator API, and code examples for extending the Snippets module programmatically.
← 0 Day Analytics – Transients Module Developer Documentation 0 Day Analytics – Table Module Developer Documentation →
Share this page
Back to top