Calculate WordPress Performance with Profile WP CLI Command

Advertisement

Introduction Introduction

WP CLI Profile command helps you to quickly identify the slowness of your WordPress website.

How to Install? How to Install?

To install the WP CLI Profile package, You need a WP CLI working on your website. Quick read the article how to setup WP CLI

Make sure you have latest WP CLI release. Use command wp cli update to update your WP CLI.

Execute below command to install the profile package.

wp package install git@github.com:wp-cli/profile-command.git

Top ↑

All All

wp profile stage --all --fields=hook,time,cache_ratio --spotlight

Top ↑

Single Stage Single Stage

// Stage - bootstrap  : E.g.
wp profile stage bootstrap --fields=time,cache_ratio
// Stage - main_query : E.g.
wp profile stage main_query --fields=time,cache_ratio
// Stage - template   : E.g.
wp profile stage template  --fields=time,cache_ratio

Top ↑

All Hooks All Hooks

wp profile stage --all --fields=hook,time,cache_ratio --spotlight

Top ↑

Hooks by Single Stage Hooks by Single Stage

wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight
wp profile stage main_query --fields=hook,time,cache_ratio --spotlight
wp profile stage template --fields=hook,time,cache_ratio --spotlight

Top ↑

Single Hook Single Hook

wp profile hook plugins_loaded --fields=callback,time,location
%d bloggers like this: