A Chassis extension to install and configure XHGui on your Chassis server. This extension also has XHProf as a dependency so it will be installed and configured automatically as well.
- Add this extension to your extensions directory
git clone --recursive [email protected]:Chassis/Chassis_XHGui.git extensions/chassis_xhgui - Note: The folder that you clone into must be called
chassis_xhgui. - Run
vagrant provision.
- Add
- chassis/chassis_xhguito yourextensionsin yaml files. e.g.extensions: - chassis/chassis_xhgui - Run
vagrant provision.
Please note:
vagrant provisioncan take quite a few minutes due to the amount of Composer dependencies in XHGui. So when you see the provisioning process taking a long time onService[php7.0-fpm]please be patient as this is the stage where Composer dependencies are being installed.
Browse to http://vagrant.local/xhgui in a browser. If you have a custom host hame it will be http://<yourhostname>.local/xhgui.
If you're using custom paths you'll need to change the URL to add your custom base. For example: If you've Chassis located in a chassis folder then the URL will be http://vagrant.local/chassis/xhgui or http://<yourhostname>.local/chassis/xhgui.
This extension enables the XHProf profiler for every request. You can control whether or not the profiler runs from the profiler.enable callback function that is contained within the extensions/chassis_xhgui/xhgui/config/config.php file.
From this callback function you can perform logic based on $_SERVER values, php_sapi_name(), etc, but remember that WordPress has not loaded at this point so you can't use any function that WordPress provides.
'profiler.enable' => function() {
if ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp-admin/' ) ) {
// Disable the profiler for requests to wp-admin:
return false;
}
// Enable the profiler for all other requests:
return true;
},Further information about configuring the profiler and other XHGUI options can be found in the XHGUI repo documentation.
- Add
- chassis/chassis_xhguito yourdisabled_extensionsin yaml files. e.g.disabled_extensions: - chassis/chassis_xhgui - Run
vagrant provision.