-
Use Homebrew
- Make sure
homebrew/php55orphp56has been tapped. brew updatebrew install php56-xhprof
- Make sure
-
Symlink
xhprof.soto MAMPln -s /usr/local/Cellar/php56-xhprof/254eb24/xhprof.so /Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/xhprof.so -
Edit
php.inifile. At the very bottom, add:[xhprof] extension = xhprof.so xhprof.output_dir = /tmp/xhprof -
Restart MAMP
-
Enable / Install devel and xhprof
drush en devel xhprof -y -
Check PHP Info
- Visit
drupal-site/devel/phpinfo CMD+Ffor “xhprof”
- Visit
-
Winning.
How to install XHProf with MAMP and Drupal 7
A quick walkthrough for installing and enabling XHProf profiling in a MAMP + Drupal 7 local environment.