PHPackages                             craftcms/query - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. craftcms/query

ActiveCraft-plugin[Database &amp; ORM](/categories/database)

craftcms/query
==============

Execute database queries from the Control Panel

3.1.0(2y ago)1614.5k2[11 PRs](https://github.com/craftcms/query/pulls)1MITPHPCI passing

Since May 10Pushed 2y ago2 watchersCompare

[ Source](https://github.com/craftcms/query)[ Packagist](https://packagist.org/packages/craftcms/query)[ RSS](/packages/craftcms-query/feed)WikiDiscussions 3.x Synced 3d ago

READMEChangelog (1)Dependencies (4)Versions (20)Used By (1)

Query for Craft CMS
===================

[](#query-for-craft-cms)

This plugin lets users execute SQL queries and view their results in [Craft CMS](https://craftcms.com).

> **WARNING:** This plugin is for development purposes only and should not be installed in a production environment.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4.0.0+ or 5.0.0+.

Installation
------------

[](#installation)

You can install this plugin from the Plugin Store or with Composer.

#### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s control panel and search for “Query”. Then press **Install** in its modal window.

#### With Composer

[](#with-composer)

Open your terminal and run the following commands:

```
# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require craftcms/query

# tell Craft to install the plugin
./craft install/plugin query
```

Usage
-----

[](#usage)

Execute SQL queries by navigating to **Utilities** → **Query** in the control panel.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 59.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~357 days

Recently: every ~518 days

Total

8

Last Release

786d ago

Major Versions

v2.x-dev → 3.0.02022-05-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccdf8b493035de2343c55bd889513e3af5c04d5823482a2b186ad16adb1c3e3?d=identicon)[brandonkelly](/maintainers/brandonkelly)

---

Top Contributors

[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (39 commits)")[![angrybrad](https://avatars.githubusercontent.com/u/61869?v=4)](https://github.com/angrybrad "angrybrad (21 commits)")[![carlcs](https://avatars.githubusercontent.com/u/7516543?v=4)](https://github.com/carlcs "carlcs (2 commits)")[![i-just](https://avatars.githubusercontent.com/u/4500340?v=4)](https://github.com/i-just "i-just (2 commits)")[![benjamindavid](https://avatars.githubusercontent.com/u/2911900?v=4)](https://github.com/benjamindavid "benjamindavid (1 commits)")[![MakeilaLundy](https://avatars.githubusercontent.com/u/19892516?v=4)](https://github.com/MakeilaLundy "MakeilaLundy (1 commits)")

---

Tags

craft-plugincraft2craft3craftcmssqlyii2databasedbcmsyii2craftcms

### Embed Badge

![Health badge](/badges/craftcms-query/health.svg)

```
[![Health](https://phpackages.com/badges/craftcms-query/health.svg)](https://phpackages.com/packages/craftcms-query)
```

###  Alternatives

[craftcms/fix-fks

Restore missing foreign key constraints in the database.

1217.4k](/packages/craftcms-fix-fks)[craftcms/commerce

Craft Commerce

243416.9k153](/packages/craftcms-commerce)[dmstr/yii2-db

Database extensions

19618.8k6](/packages/dmstr-yii2-db)[craftcms/ckeditor

Edit rich text content in Craft CMS using CKEditor.

48359.1k52](/packages/craftcms-ckeditor)[summerblue/administrator

A database interface package for Laravel, modified!

29329.8k1](/packages/summerblue-administrator)[mg-code/yii2-helpers

A collection of useful helper classes for Yii framework 2.0

2022.5k5](/packages/mg-code-yii2-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
