Disabling Xdebug in Laravel Homestead

Note, these instructions are for Homestead 7, so may change in future versions.

To configure Xdebug and other PHP-FPM modules, you have to go the directory shown below:-

cd /etc/php/7.2/mods-available 

To disable Xdebug, edit the Xdebug ini file:-

sudo nano xdebug.ini

Comment out the first line so the Xdebug module is not loaded, so the file should look like this:-

xdebug.remote_enable = 0
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.max_nesting_level = 512

Then restart PHP-FPM by running the following command:-

sudo service php7.2-fpm restart

If you’re running a different version of PHP, just edit the command as appropriate.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top