PHP profiling using webgrind and Xdebug

Install xdebug

sudo apt-get install php5-xdebug

Then update config

Add following line in /etc/php5/fpm/conf.d/20-xdebug.ini

xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp

After that please restart php5-fpm

sudo service php5-fpm restart

Load page you want to optimize

It will take time (If its taking too much time then need to optimize 😛 )

Install webgrind

Simply decompress the package into a folder in your server and load its path it in the browser. It is written in php5 and it does not have dependencies to configure.

wget && unzip

Open webgrind in your browser and observing the result

You can get more details from github


One thought on “PHP profiling using webgrind and Xdebug

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s