Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EliyaCohen's avatar

How can I disable the xdebug?

each time when I run composer update .. I get this message:

You are running composer with xdebug enabled. This has a major impact on    runtime performance. See https://getcomposer.org/xdebug

I tried to find the code below in the php.ini file, but unfortunately I haven't found anything..

;zend_extension = "/path/to/my/xdebug.so"

My PHP version is PHP 5.6.15-1+deb.sury.org~trusty+1 (cli) So my question is, How can I disable the xdebug?

0 likes
7 replies
bashy's avatar
bashy
Best Answer
Level 65

First do

php -i | grep "php.ini"

Then from the grep search, edit the php.ini which it loads.

If it's not in there, you will need to check the conf.d folder (located near your php.ini maybe) for a file called (or similar) ext-xdebug.ini

9 likes
cbj4074's avatar

@EliyaCohen Bashy's solution is rather helpful because it is more generic, but for the sake of posterity, the preferred means by which to disable xdebug on Debian (or Ubuntu), which you appear to be using, is:

 php5dismod xdebug

This simply deletes the symbolic links to xdebug.ini (most commonly in /etc/php5/fpm/conf.d and /etc/php5/cli/conf.d).

To renable xdebug, it's the opposite:

 php5enmod xdebug

Conversely, this creates symbolic links for xdebug.ini in the effective conf.d directories (for FPM, CLI, etc.).

It's necessary to restart the PHP daemon (if using one) to render the changes effective.

9 likes
bashy's avatar

@cbj4074 True, I always forget about that command. It's good to know how to manually do it though :)

1 like
stephanj's avatar

Bashy you are a CHAMP!

This post saved me hours of trial and error.

Thanks so much for your contributions.

I feel so inadequate sometimes when I read your responses.

3 likes
meyubaraj's avatar

In php.ini find zend_extension="path_to\php_xdebug.dll" and comment it out. restart your apache server.

Please or to participate in this conversation.