Description
Structure Viewer is a WordPress file explorer and AI context builder for developers — browse, inspect, view source code, and export the complete file structure of any installed plugin or theme, directly from your WordPress admin dashboard.
No FTP, no cPanel, no server access needed. Open any file, read its source code with syntax highlighting, search across your entire codebase, and export the full file tree as TXT, JSON, XML, PDF, or clipboard copy — all without leaving WordPress.
And if you work with any AI coding tool — ChatGPT, Claude, Cursor, Copilot, Gemini, or anything else — Structure Viewer is the missing first step. Export your plugin’s complete structure as ready-to-use AI context in one click, and give your AI the full codebase map before you ask it anything.
—
🤖 Built for AI-Assisted Development
Modern coding workflows look different than they did two years ago. You’re working alongside an AI, and your AI works better when it has structural context. Structure Viewer is designed for exactly that workflow:
- Tree-format exports purpose-built for LLM context windows — clean ASCII, no markdown noise, token-efficient
- Works with any AI tool — ChatGPT, Claude, Cursor, Copilot, Gemini, Perplexity, or any other chat or coding assistant
- One-click clipboard copy — emoji tree format that pastes into any AI chat with perfect alignment
- Filter before you export — exclude
node_modules,vendor, build artifacts, or anything you don’t want bloating your context - Read source inline — open any file in the browser modal, copy the snippet you need, paste into your AI conversation
- Auto-redact secrets — opt-in masking of API keys, tokens, passwords, AWS / Stripe / GitHub keys, JWTs and PEM private keys before content leaves the server — paste into any AI tool without leaking credentials
- Pro: Comparator — diff two versions of a plugin and feed only the changed lines to your AI for targeted code review
- Pro: FlatPack — extract just the PHP, just the JS, or just the CSS from any plugin and hand the AI a focused codebase
- WP-CLI exports — script structure dumps directly into your AI agent’s working directory
Stop pasting one file at a time. Give the AI the whole map first, then ask better questions.
—
🗂️ File Explorer
See exactly what is inside every plugin and theme:
- Interactive tree view — expandable folders with icons for every file type (PHP, JS, CSS, images, JSON, XML, and more)
- Searchable item picker — switch between All Plugins, individual plugins, All Themes, and individual themes instantly
- Live tree search — type to filter files in real time, jump between matches with next/prev navigation
- All-mode plugin filter — when viewing All Plugins or All Themes, the live search filters the plugin or theme list by name so you can find the one you want fast
- File type tag strip — one click to show only PHP files, only CSS, only images — whatever you need
- File size and modification dates — see when each file was last changed, toggle on/off
- Recently Viewed panel — jump back to any file or folder you have already opened
📄 File Viewer
Click any file to read it right there in your browser:
- Inline modal with syntax highlighting for all common languages
- File metadata: size, line count, last modified timestamp
- Auto-redact secrets badge — shown in the modal when redaction is active so you know the displayed content has been sanitised
- Fullscreen mode for reading long files without scrolling the page
- One-click download — get any file with the correct MIME type and original filename preserved
🔍 Search
Find any file across your entire plugin or theme in seconds:
- Real-time search — results appear as you type, no page reloads
- Extension search — prefix with a dot to filter by type:
.php,.js,.css,.json - File type dropdown for quick narrowing
- Results show full relative path, file size, and last modified date
📤 Export
Share or document your plugin structures in any format:
- TXT — clean ASCII tree, perfect for documentation, tickets, and AI context windows
- JSON — nested structure with file sizes and timestamps for programmatic use
- XML — standardized hierarchical format
- PDF — formatted document with header, page numbers, and automatic page breaks
- Clipboard — one-click emoji tree copy for pasting into Slack, Notion, or GitHub
📊 Dashboard
Your WordPress file ecosystem at a glance:
- Stat tiles for total plugins, active/inactive split, total themes, and total files indexed
- Largest plugins table — instantly see which plugins are heaviest with file count and size bars
- WordPress environment strip: WP version, PHP version, active theme, site URL
⚙️ Settings
Make it yours:
- Dark mode / Light mode — toggle instantly from the plugin header or apply via Settings; rendered server-side with no flash on load
- Accent color picker — Emerald (default), Violet, Blue, Amber, or Rose
- Auto-redact secrets on export (new in 2.2.2) — opt-in toggle that masks credentials in viewed and downloaded file content
- Exclude hidden files, system directories, and custom patterns (
node_modules,.git,vendor) - Settings auto-save with instant confirmation toast
💻 WP-CLI
Automate structure exports from the command line:
wp structure-viewer export plugin <folder-name>
wp structure-viewer export theme <folder-name>
wp structure-viewer list plugins
wp structure-viewer list themes
—
🚀 Structure Viewer Pro
Unlock two powerful Pro tools for developers who need to go deeper.
🔀 Comparator — Know Exactly What Changed
Ever updated a plugin and wondered what actually changed? Comparator shows you a precise, color-coded, line-by-line diff between any two versions — so you can audit updates, review customizations, and catch unwanted changes before they cause problems.
- Compare two plugin ZIPs side by side
- Compare an installed plugin or theme against any uploaded ZIP
- Compare two individual files for a targeted spot-check
- Added lines in green, removed in red, changed lines clearly highlighted
- Works on large plugins and minified CSS/JS files — auto-tokenizes before diffing
- Expand/collapse per-file diff blocks to focus on what matters
📦 FlatPack — Extract Only What You Need
Need just the CSS from a plugin? Or all the PHP files for a code review? FlatPack extracts any plugin or theme ZIP and flattens it into a single, clean download — no nested folders, no hunting through directory trees.
- Upload any plugin or theme ZIP and see all its files in a live preview instantly
- Filter by PHP, CSS and JS, images, or any custom extension — preview updates live
- Only the filtered files are included in the output ZIP
- Smart collision-safe naming: duplicate basenames get a folder prefix automatically
- Download a single flat ZIP in seconds
Upgrade to Pro from within the plugin — Settings License Upgrade to Pro.
—
🔒 Security
Security is not an afterthought. Every request to Structure Viewer is protected:
- Nonce verification on all AJAX endpoints
manage_optionscapability required — administrators only, no public access- Path traversal prevention — file paths resolved with
realpath()and verified - Input sanitized with
wp_unslash()+sanitize_text_field()before use - All output escaped before rendering
- Auto-redact secrets (opt-in) — strips API keys, tokens, passwords, AWS / Stripe / GitHub / Google / Slack keys, JWTs, and PEM private keys from viewed and downloaded file content
- Pro upload directories protected with
.htaccessdeny rules
⚡ Performance
Structure Viewer is invisible to your site’s frontend:
- Assets load only on the Structure Viewer admin page — zero impact on your site
- Dashboard stats cached with a 6-hour transient
- Lazy tree loading — only trees you expand are scanned
- FlatPack preview filtering is entirely client-side — no extra AJAX round-trips
- No external HTTP requests at runtime
Screenshots

Dashboard — stat tiles, largest plugins table, recently viewed panel, and environment info 
Dashboard appearance in Light Mode 
Explorer tab — all installed plugins view 
Explorer tab — interactive plugin file tree with live search and file type filtering 
File viewer modal — source code with syntax highlighting, metadata, and download button 
Multi-format export modal — TXT, JSON, XML, PDF, and clipboard options 
Pro: Comparator — user interface 
Pro: Comparator — color-coded difference view between two plugin versions 
Pro: FlatPack — live-filterable file preview
Installation
- Go to Plugins Add New in your WordPress admin.
- Search for Structure Viewer.
- Click Install Now, then Activate.
- Navigate to Tools Structure Viewer to start exploring.
Manual installation:
- Download the ZIP from WordPress.org.
- Go to Plugins Add New Upload Plugin, upload the ZIP, click Install Now.
- Activate and navigate to Tools Structure Viewer.
TXT, JSON, XML, and clipboard export all work without any additional setup.
FAQ
-
What is Structure Viewer used for?
-
Structure Viewer is a WordPress developer tool that lets you browse, search, view, and export the file structure of any installed plugin or theme — directly from your WordPress admin dashboard. It is used for code audits, plugin reviews, documentation, debugging, AI-assisted development, and general development workflows.
-
How does Structure Viewer help with AI-assisted development?
-
When you prompt an AI tool like ChatGPT, Claude, Cursor, or GitHub Copilot to work on a WordPress plugin or theme, the quality of its output depends almost entirely on the context you provide. Structure Viewer is built to make that first step painless.
Instead of opening files one at a time and copy-pasting code into a chat, you can: export the complete file tree of any plugin or theme as a single clean TXT, JSON, or XML payload; copy it to your clipboard with one click; paste it into your AI prompt as ready-to-use structural context. The AI now knows what files exist, how they’re organised, and where to look — before you’ve even asked it a question. From there, you can drill into specific files in the browser modal and copy targeted snippets as needed.
For larger workflows, Structure Viewer Pro adds Comparator (so you can give the AI just the diff between two versions instead of two whole codebases) and FlatPack (so you can hand the AI only the PHP files, only the CSS, or any subset that matters for the task).
-
Can I export a plugin’s structure as AI prompt context?
-
Yes — that is one of the main use cases. Use the Export tab to generate a TXT, JSON, or XML representation of any plugin or theme. The TXT format is intentionally token-efficient — clean ASCII tree, no markdown noise — so it fits cleanly inside an AI context window. You can also use the one-click clipboard copy to paste an emoji tree directly into ChatGPT, Claude, Cursor, or any other AI chat interface.
-
What does Auto-redact secrets do?
-
When enabled in Settings Security Settings, Structure Viewer scans the contents of any file you view or download and masks anything that looks like a credential — API keys, OAuth tokens, passwords, AWS / Stripe / GitHub / Google / Slack keys, JWTs, PEM-encoded private keys, and the standard wp-config credential constants (
DB_PASSWORD,AUTH_KEY, salts, etc.). The redaction happens server-side before the content reaches your browser, so the masked file is safe to paste into any AI tool, a ticket, or a screenshare. A small badge in the file viewer modal shows how many matches were redacted for the open file. The toggle is off by default — turn it on only when you actually want sanitised output. -
Is this a WordPress file manager plugin?
-
Structure Viewer is purpose-built for developers who need to read and inspect plugin and theme files — not upload or edit them. It is a read-only WordPress file explorer and code viewer. If you need to upload or manage files via the WordPress admin, a general file manager plugin is what you need. If you need to audit, document, or feed code to an AI tool, Structure Viewer is the right choice.
-
Does Structure Viewer work with WordPress themes?
-
Yes. Switch the item picker to “All Themes” or select any individual theme to browse its complete file structure, view source files, search by filename or extension, and export the full tree in any format. Everything that works for plugins works for themes.
-
Is this plugin safe to use on a live site?
-
Yes. Structure Viewer is strictly read-only — it cannot modify, delete, or upload files. Access is restricted to WordPress administrators only, and no frontend scripts or pages are added to your site. Your visitors are completely unaffected.
-
Do I need FTP or server access to use it?
-
No. Structure Viewer works entirely through the WordPress admin interface. You do not need FTP, cPanel, SSH, or any server-level access. If you are a WordPress administrator, you have everything you need.
-
Who can access Structure Viewer?
-
Only users with the
manage_optionscapability — WordPress administrators by default. There is no frontend component and the plugin adds no public-facing pages or scripts. -
Can I view all my plugins at once?
-
Yes. Select “All Plugins” from the item picker to see a collapsed tree for every installed plugin. Expand any plugin heading to drill into its files. The same applies to themes with “All Themes”. In All Plugins / All Themes mode, typing in the live search bar now filters the list of plugins or themes by name so you can find the one you want quickly.
-
Can I read the source code of a file?
-
Yes. Click any text-based file in the tree to open it in the inline file viewer with syntax highlighting. Image files open in a new browser tab. The viewer also shows file size, line count, and last modified date.
-
Can I download individual files?
-
Yes. The file viewer has a one-click Download button. The file is served with the correct MIME type and its original filename.
-
What export formats are available?
-
TXT (plain ASCII tree), JSON (nested with metadata), XML, PDF, and Clipboard (emoji tree for pasting anywhere). You can choose your preferred clipboard format (JSON, Text, or XML) in Settings.
-
Can I search inside a plugin’s files?
-
Yes. The Search tab lets you search by filename or extension across any plugin or theme in real time. Results show the full path, size, and last modified date.
-
Can I exclude certain files or directories?
-
Yes. Go to Settings Security and Exclusions to toggle exclusions for hidden files and system directories, and to add your own custom patterns such as
vendor,node_modules,*.log, or.git. -
Does it work with WP-CLI?
-
Yes. You can export plugin and theme structures from the command line:
wp structure-viewer export plugin <folder-name> wp structure-viewer export theme <folder-name> wp structure-viewer list plugins wp structure-viewer list themes -
Is there a Pro version?
-
Yes. Structure Viewer Pro adds two features: Comparator (compare any two plugin or theme versions with a color-coded diff view) and FlatPack (extract and filter files from any plugin or theme ZIP by file type). The free version includes the full Explorer, Search, Export, Dashboard, and Settings. Upgrade from Settings Licence Upgrade to Pro.
-
How does Comparator work?
-
Upload two plugin ZIPs — or select an installed plugin and upload a ZIP to compare against it. Comparator produces a color-coded, file-by-file diff showing exactly which lines were added, removed, or changed. It handles large files and minified CSS/JS by tokenising them before diffing, so you get meaningful per-rule output instead of single-line change blocks.
-
How does FlatPack work?
-
Upload any plugin or theme ZIP. FlatPack extracts all its files and shows you a live-filterable preview. Select which file types you want — PHP, CSS and JS, images, or custom extensions — and click Run FlatPack. Only the matching files are packed into a single flat ZIP for download, no nested directories included.
-
How does FlatPack handle files with the same name?
-
Files with unique basenames keep their original name. When two or more files share the same basename (for example multiple
style.cssfiles from different directories), each is prefixed with its relative folder path — for exampleassets-style.cssandcss-style.css. Any remaining collisions get a numeric suffix. -
Does Structure Viewer affect site performance?
-
No. Plugin assets are loaded only on the Structure Viewer admin page and have zero impact on your website’s frontend. Dashboard stat counts are cached. No external requests are made at runtime.
-
Does the plugin store any personal data?
-
Structure Viewer stores settings in the
wp_optionstable understructureviewer_settings. Temporary files uploaded for Comparator or FlatPack are stored in the WordPress uploads directory and deleted immediately after processing. No user data or personal information is collected or transmitted. -
Is Structure Viewer compatible with WordPress Multisite?
-
The plugin is designed for single-site use. It may function on individual subsites within a Multisite network but Multisite-specific administration is not officially tested or supported.
-
How can I support development?
-
If Structure Viewer saves you time, a coffee goes a long way. You can support development at buymeacoffee.com/blincks, or via the Support development card in Tools Structure Viewer Settings. Leaving a review on WordPress.org also helps a lot.
Reviews
Contributors & Developers
“Structure Viewer – File Explorer & AI Context Builder” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Structure Viewer – File Explorer & AI Context Builder” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.2.2
- New: Auto-redact secrets on export — opt-in toggle in Settings Security Settings that masks API keys, tokens, passwords, AWS / Stripe / GitHub / Google / Slack keys, JWTs, PEM private keys, and wp-config credential constants in viewed and downloaded file content. Safer to share output with AI tools, tickets, or screenshares.
- New: Redaction badge in the file viewer modal showing how many secrets were masked for the open file.
- New: Live search now works in All Plugins / All Themes mode — type to filter the plugin or theme list by name. The placeholder updates to reflect the current mode so the behaviour is obvious.
- New: Donate / support link on the Plugins list and in Settings Support development for users who want to fund continued development.
- Improved: Tab content no longer leaves an empty gradient strip below short tabs (Dashboard, Comparator / FlatPack tabs). The viewport background now lives on the body element so every tab feels consistent.
- Improved: Search result cap raised from 200 to 500, and the response now signals when the cap was hit so future UI can surface a “narrow your search” hint.
- Improved: Dashboard file-count cache key derived from the plugin version — every release now automatically invalidates the stale count instead of relying on a manually-bumped constant.
- Improved: Updated plugin name and short description for clarity — Structure Viewer is a file explorer and AI context builder.
2.2.1
- New: Quick dark/light mode toggle directly from the plugin header — no need to visit Settings
- Improved: Search results UI redesigned for better readability and faster scanning
- Improved: Tab navigation styling refined for a cleaner, more consistent look
- Improved: Dashboard layout adjustments for tighter spacing and visual alignment
2.2.0
- New: Pro Comparator — compare two plugin or theme versions with a color-coded line-by-line diff; supports ZIPs, installed plugins/themes, and individual files; works with large and minified files
- New: Pro FlatPack — extract and filter files from any plugin or theme ZIP by type (PHP, CSS, JS, images, custom); download as a single flat ZIP with smart collision-safe naming
- New: Dashboard redesign — stat tiles with combined plugin and theme file count; async largest-plugins table; recently viewed panel; WordPress environment strip
- New: Explorer improvements — searchable item picker; live tree search with next/prev navigation; file type tag strip; lazy loading for all-items mode; AJAX refresh button (no page reload)
- New: UI — dark/light mode with server-side class; accent color picker with 5 options (default: Emerald); branded logo
- New: Copy format setting — choose JSON, Text, or XML as the clipboard copy format in Settings
- New: Pro upsell placeholders — free users see feature descriptions and a direct upgrade button in the Comparator and FlatPack tabs
- Improved: Comparator diff engine — patience algorithm for large files; correct deletion-before-addition ordering; minified file tokenization; similar-change pairing; raised limits (5 MB / 20,000 lines)
- New: Accent color picker — customize the plugin with the color you want to see.
- Improved: FlatPack workflow — extract-all-then-filter-live; reset on new file selection; filter pills built from actual ZIP contents
- Improved: Settings — auto-save with debounce and toast; exclusion patterns UI
- Fixed: WordPress admin notices — scoped text color to plugin container only; no longer overrides WP notice colors
- Fixed: FlatPack — protection files no longer appear in extracted file list
- Fixed: Export / clipboard — “undefined” output caused by buffer pollution resolved
- Fixed: Bug Fixes — Several bug fixes and security improvements
2.1.1
- Fixed: Copy Structure button not working in Safari.
2.1
- New: Download any individual file directly from the file viewer modal (all file types including binary)
- New: PDF export with styled header, monospace tree, page numbers, and automatic page breaks
- Security: download handler with path traversal prevention, nonce verification, and MIME type detection
2.0
- Complete UI/UX overhaul — modernized interface, modal file viewer with syntax highlighting
- Multi-format export: JSON and XML added alongside TXT
- Real-time search with file type filtering, one-click clipboard copy, keyboard navigation, WP-CLI
1.2
- Settings link added to plugin listing.
1.1
- Added TXT export.
1.0
- Initial release.
