How to disable XDebug
I think that my server became slow since I installed XDebug. So, in order to test my hypothesis I want to disable XDebug completely. I've been searching for tutorials on how to do this but I can't find such information.
Verified Answer (156 Votes) ✓
php.ini and look for XDebug.
Set xdebug autostart to false
Disable your profiler
Note that there can be a performance loss even with xdebug disabled but loaded. To disable loading of the extension itself, you need to comment it in your php.ini. Find an entry looking like this:
zend_extension = "/path/to/php_xdebug.dll"
and put a
; to comment it, e.g.
;zend_extension = ….
Check out this post XDebug, how to disable remote debugging for single .php file?
Answer #2 (97 Votes)
An easy solution working on Linux distributions similar to Ubuntu
sudo php5dismod xdebug sudo service apache2 restart
Answer #3 (34 Votes)
In Linux Ubuntu(maybe also another - it's not tested) distribution with PHP 5 on board, you can use:
sudo php5dismod xdebug
And with PHP 7
sudo phpdismod xdebug
And after that, please restart the server:
sudo service apache2 restart