Lightning for AI Agents
Lightning 5 provides deep visibility into OpenCart performance and functional problems. Agents can inspect live requests, SQL queries, application code, modifications, logs, caching and server activity to produce concrete, ready-to-apply recommendations—or independently try candidate fixes and test their results using the available controls.
The tools are accessible through a browser already signed in to the store’s administration. Paths below are relative to the store’s base URL, including its subdir, if any.
Lightning Toolboxindex.php?li_op=tools
Central directory of server, database, file and Lightning diagnostic tools.
Lightning Dashboard and Settingsindex.php?lightning
Opens the Lightning widget. Shows cache sizes, usage statistics, live requests, background activity and configuration. Provides optimization settings, enable/disable controls and cache clearing for testing configuration changes.
Notices and Health Checks
Available through Notices in the Lightning panel. Reports detected integration, configuration and hosting problems, including PHP acceleration, HTTPS, CRON and database latency.
Page Performance Summary
Available in Lightning information on the storefront and the X-OpenCart-Lightning response header. Shows whether a page was generated or served from cache, its cache age, server processing time, SQL counts and image-processing activity.
Recorded Request Profile
Open the URL in the X-Lightning-Log response header, typically ?log_ID. Shows the profile of an actual completed request, including AJAX requests: timings, SQL and recorded application calls, without repeating the original action.
Deep Profiling
Add ?li_sql or &li_sql to the target page URL, or use Deep profiling / Retest in a report. Generates a detailed profile of a new execution, breaking down PHP, SQL, Lightning, image resizing, WebP and waiting time. Identifies expensive calls, repeated queries and their source locations.
SQL Inspector
Open Inspect beside a query in a profile; the URL uses index.php?li_op=inspect&data=.... Executes and measures a SELECT query, displays its execution plan, tables and indexes, and supports testing forced or ignored indexes. Agents can add indexes directly in SQL Inspector, manage existing indexes, change table engines and rerun queries to measure the results.
SQL Optimization Evaluation
Open Evaluate in a profile containing optimized queries. Compares original and Lightning-optimized SQL performance, highlighting gains and regressions. Executes original queries and compares them with recorded optimized timings; executes the optimized version too when the recorded result came from cache.
SQL Tablesindex.php?li_op=search&search=tables
Shows table sizes, engines, collations, columns, records and indexes. Includes index editing, engine conversion and table maintenance operations.
SQL Optimizations Checkindex.php?li_op=optimization
Examines catalog conditions relevant to query optimization: product sort orders, missing descriptions, store assignments, disabled products and future availability dates. Provides corresponding bulk-adjustment actions.
Source Viewerindex.php?li_source=catalog/model/catalog/product.php:123
Displays the actual deployed file, highlights a line and shows its modification time. Useful for tracing errors and comparing original files with generated modification copies. The storage/... prefix resolves to the configured storage directory.
Search in Filesindex.php?li_op=search&search=TEXT
Finds literal text, case-insensitively, across PHP, TPL and Twig files. Add &js=1 to include JavaScript and CSS. Useful for locating routes, functions, SQL fragments, error messages and session keys. Search text is URL-encoded.
Modifications Viewerindex.php?li_op=search&search=ocmod
Shows OCMOD/vQmod entries, their status and patch contents. Helps identify extensions that alter a controller, model, library or template.
Changed Filesindex.php?li_op=search&search=changed
Lists recently modified files. Useful for locating manual changes, deployments or generated files associated with a regression.
Logs Viewerindex.php?li_op=lg
Lists error and debug logs for reading and live monitoring. Useful for PHP failures, extension errors and recurring background problems. Selected logs support a literal &filter=TEXT filter.
Session and Request Environmentindex.php?li_op=s
Shows Lightning’s early session snapshot and, with administrative access, server/request variables. Useful for investigating language, currency, customer-group, cart and session-related behavior.
Server Infoindex.php?li_op=server
Displays PHP information, loaded extensions and OPcache health. Helps identify missing capabilities, configuration issues and stale bytecode. Includes an OPcache reset control.
Process Viewerindex.php?li_op=ps
Shows live CPU usage by process. Helps identify resource-intensive PHP workers, database processes and background jobs.
SQL Process Viewerindex.php?li_op=ps&sql=1
Shows active database queries, their duration and execution state. Useful for investigating slow requests, concurrent workloads and queries waiting on locks.
Disk Space Analysisindex.php?li_op=free
Identifies large directories, cache usage and storage pressure. Includes cleanup actions.
Inodes Analysisindex.php?li_op=free&inodes=1
Identifies directories containing large numbers of files. Useful when hosting file-count limits are exhausted despite sufficient free disk space.
CRON Job Activityindex.php?li_op=show_cron
Displays the live stream of Lightning background work, cache generation and job progress. Useful for investigating stalled or incomplete processing.
Mailboxindex.php?li_op=mailbox
Shows queued, sent and failed messages, message contents and delivery errors. Supports searching by recipient or subject, retrying delivery, editing, sending and deleting messages.
Access Controlindex.php?li_op=access&op=control
Shows Lightning access rules and blocked-request information. Useful for investigating unexpected blocking and adjusting allow/block rules.
Analyze with ChatGPT
Available through the ChatGPT button on supported diagnostic pages. Exports the current report or source text together with store and version context for AI analysis.