How to Install PHP on Mac OS X

Hello dear readers! welcome back to another section of my tutorial on PHP. In this tutorial guide, we will be discussing about how to install PHP on Mac OS X System.

Mac users have the choice of either a binary or a source Installation. As a matter of fact, your Mac OS X might have come with the Apache and PHP already preinstalled. This is likely to be quite an old build, and it probably lacks so many of the common extensions.

However, if all you desire is a quick Apache, PHP, and MySQL setup on your laptop, this is certainly the easiest way to do that. All you need to do is to edit your Apache configuration file and turn on the Web server.

To install and configure PHP on Mac OS X, just follow the following steps below -

Steps to Install and Configure PHP on Mac OS X

To install and configure PHP on Mac OS X, just follow the following steps below -

sudo open -a TextEdit /etc/httpd/httpd.conf
Load Module php5_module
AddModule mod_php5.c
AddType application/x-httpd-php .php
sudo apachectl graceful

You should now see a very long table of information about your new PHP Installation message.

Alright guys! This is where we are rounding up for this tutorial post. In my next tutorial post, we are going to be studying about PHP Installation on Windows with IIS.

Feel feel to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Originally published at

A tutorial blog that provides tutorials on Web Design, Programming, Java Technologies, Mobile App Development, Database, Machine Learning, etc.