Code Monkey home page Code Monkey logo

query-debug's Introduction

runcommand/query-debug

Find the query causing your performance issues.

Build Status

Quick links: Using | Installing | Support

Using

wp query-debug [--url=<url>] [--format=<format>]

Executes a request to WordPress to identify which queries are run, and how long they took. Useful for taking a peek into which pages might be having performance issues.

$ wp query-debug --url=http://wp.dev/2016/04/14/hello-world/ --format=summary
Loading http://wp.dev/2016/04/14/hello-world/ executed 28 queries in 0.006749 seconds.

Use the --debug flag to inspect the main query and rendered theme template:

$ wp query-debug --url=http://wp.dev/2016/04/14/hello-world/ --debug
Debug (query-debug): Main WP_Query: is_single, is_singular
Debug (query-debug): Theme template: twentyfifteen/single.php

OPTIONS

[--url=<url>]
	Execute a request against a specified URL. Default to the home URL.

[--format=<format>]
	Render results in a specific format.
	---
	default: summary
	options:
	  - summary # Summary including number of queries and total time.
	  - table # List of all queries.
	  - json
	  - yaml
	  - count # Total number of queries.
	---

Installing

Installing this package requires WP-CLI v0.23.0 or greater. Update to the latest stable release with wp cli update.

Once you've done so, you can install this package with wp package install runcommand/query-debug.

Support

This package is free for anyone to use. Support is available to paying runcommand customers.

Think you’ve found a bug? Before you create a new issue, you should search existing issues to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version. Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please create a new issue with description of what you were doing, what you saw, and what you expected to see.

Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project. Once you've decided to work on a pull request, please include functional tests and follow the WordPress Coding Standards.

Github issues are meant for tracking bugs and enhancements. For general support, email [email protected].

query-debug's People

Contributors

danielbachhuber avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.