=== KC Tools ===
Contributors: krumch
Donate link: https://krumch.com/2012/05/10/kc-tools-wp/
Tags: developer tools, debugging, phpinfo, wp-config, database, sql, ssh, server commands, troubleshoot
Requires at least: 3.0
Tested up to: 6.9
Requires PHP: 7.0
Stable tag: 2026.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Brain surgery for WordPress sites (free): server info (phpinfo), wp-config tools, database browser & query runner, and server command execution — all from the admin panel.

== Description ==

KC Tools is a **power-user plugin for developers and site administrators who can write code**.

It intentionally exposes low-level information and actions from inside `/wp-admin/` so you can debug, diagnose, or repair a WordPress installation when the normal UI isn’t enough.

**Important:** this plugin can break a site or leak sensitive information if used incorrectly. Read the security section below.

For documentation, release notes, and the plugin’s history (KC Tools WP only), see:
https://krumch.com/category/kc-tools/

This package is **KC Tools for WordPress**. **KC Tools PHP** is a separate product.

== Features ==

* **Environment**: server environment overview + PHP configuration (phpinfo-style output).
* **WordPress**: view/edit `wp-config.php` from the admin panel + create a backup; list registered menu locations.
* **Database (DB)**:
  * browse tables, inspect rows, run SQL queries, re-run last query
  * **large SQL text area** (supports long queries and multiple statements in sequence)
  * improved results table with **deep inspection** of JSON-encoded and/or serialized arrays/objects, including nested data
* **Server commands (SSH)**: run server-side commands from the admin (for power users).
* Extra developer/debug helpers (see “Hidden debug helpers”).


== Security Notice (Read This TWICE) ==

KC Tools is a “developer scalpel”. Before using it on any real site:

1. **Change the password** in the plugin file (search for `$thepassword`).
2. Review and change any default **debug email addresses** used by the debug helper.
3. Do not enable for untrusted users. Keep access restricted to admins only.
4. Use on staging when possible.
5. Be aware that the database and command tools can do irreversible damage.


6. If you use debug helpers/endpoints, **change the default debug email addresses** and avoid enabling them on public sites (`?debug_email=...`, `?my_ip=1`, shortcode `[kct]`).
== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` (or upload the ZIP from the Plugins screen).
2. **Immediately change** the password value (`$thepassword`) and any default debug emails.
3. Activate **KC Tools**.
4. Open **KC Tools** from the "Settings" admin menu.

== Frequently Asked Questions ==

= Is this plugin free? =
Yes. KC Tools WP is free and GPL.

= Was there a Pro version? =
There used to be a Pro edition, but Pro features were merged and the project now ships as **one free edition**.

= Where is the documentation / support page? =
Use the plugin page and history posts:
https://krumch.com/category/kc-tools/

= Does this include KC Tools PHP? =
No. KC Tools PHP is a different product.

== Hidden debug helpers ==

This plugin includes developer helpers such as a debug function and endpoints/shortcodes intended for controlled debugging.

**Treat them as sensitive:**

* Change any default email addresses used for debug output.
* Do not expose debug endpoints publicly.
* Use only in trusted/admin-only contexts.

Common examples (depending on your build):

* Shortcode: `[kct]` (debug output helper)
* URL endpoints: `?debug_email=...` and `?my_ip=1`


== Screenshots ==

1. KC Tools overview.
2. Database tools.
3. WP config tools.

== Changelog ==

= 2026.2.1 =
* Split the old Environment area into two separate sections: **Environment** and **WordPress**.
* In the DB section, the SQL command line was replaced with a **large text area**, allowing long SQL statements or multiple SQL commands in sequence.
* In the DB results table, JSON-encoded and/or serialized arrays/objects can now be inspected even when nested inside other encoded arrays/objects.
* UI/UX improvements for large values (expand/collapse, More/Less previews) in decoded data views.

= 2020.03.18 =
* Maintenance fix ("Friday 13" bugfix).
* Includes debug helper capabilities as described in the plugin header (debug to email/file/URL, debug shortcode, etc. — if enabled in the build).

= 2020.03.14 =
* Added wp-config view/edit with backup.
* DB tools: expanders and query improvements.

= 2020.01.19 =
* Mobile/admin UI behavior improvements and minor fixes.

= 2019.08.14 =
* DB tab: added two buttons to reuse and re-run the last SQL query.

= 2016.08.08 =
* Pro version merged into the free version (single edition).

= 2012.05.10 =
* Public release of KC Tools WP.

== Upgrade Notice ==

= 2026.2.1 =
New DB inspection capabilities (nested JSON/serialized), SQL textarea for long/multi-statement queries, and Environment/WordPress section split. Review the security warnings before enabling on production sites.

= 2020.03.18 =
Latest code release in this package. Review the security warnings before enabling on a production site.

= 2016.08.08 =
Pro features were merged into the free edition — there is only one KC Tools now.

