How to enable – disable php on Apache2 web server

In this article we will learn how to enable or disable php service on Apache2 web server, especialy on LAMP Ubuntu. You can use a2enmod to enable php and a2dismod to disable it.

How to enable php on apache2

To enable php, just type a2enmod following with php version. For the example if you use php5.6, you can use this command:

a2enmod php5.6

And if you use php7.0, use this command:

a2enmod php7.0

How to disable php on apache2

To disable php, use a2dismod following with php version. if you use php5.6, you can use this command:

a2dismod php5.6

And if you will disable php7.0, use this:

a2dismod php7.0

Recent search terms:

Leave a Reply

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

loading...