Recently we published an article about how to install WordPress on your Windows computer using WAMP. As expected, we started to receive emails from our readers asking how to install WordPress in their Mac computer. Actually it is quite similar to Windows and in this article we will show you how to install WordPress locally on Mac using MAMP.
MAMP is an easy-to-install compilation of Apache, MySQL, and PHP bundled together for Mac. Using MAMP you can install WordPress on your Mac and test drive it. Most WordPress developers and designers use MAMP on their Mac for development purposes. However, your website on MAMP is only visible to you. In order to make it live you would need WordPress Hosting.
How to Install MAMP on Mac
Go to the MAMP website and download MAMP. Once the download is finished, open the downloaded file. Drag and drop the image file inside it to your Applicationsfolder. Follow the on screen instructions. You can now launch MAMP from Applications » MAMP.
Note: MAMP also installs MAMP Pro, so remember to click on the right one.
Before you get started, we recommend that you configure it to your liking. Click on the Preferences button to change the options. You will see a new dialog box. Lets start with the Ports tab. You need to enter ports which will be used by Apache and MySQL. Enter port 80 for Apache, and 3306 for MySQL. Setting Apache to use port 80 will allow you to access your local websites from
http://localhost instead of
http://localhost:8888. However, using port 80 also means that each time you start servers you will have to provide the admin password of your computer.
The next step is to set document root. Document root is the folder where you will create and store your websites. In the preferences dialog box, click on Apache and select the folder where you want to store your websites. Ideally, you should store your websites in a new folder inside your documents folder. You can name this folder anything you want, htdocs, mywebsites, wpdev, etc. For the sake of this example, we will call it mysite.
Click OK to save your changes. On the MAMP app screen make sure both Apache and MySQL servers are running.
Installing WordPress on Mac
Download a copy of WordPress from WordPress.org. Extract the zip file, copy the
wordpress folder inside it and paste it in your MAMP document root folder. Rename this folder to anything you want e.g. mysite.
Click on Open Start Page button in MAMP application window. A new browser window will open. Click on phpMyAdmin from the top menu bar.
phpMyAdmin is a web based application used to manage MySQL databases. In phpMyAdmin click on Databases and then create a new database. You can name this database anything you want. We will use this database name in the next step.
Open a new browser window and type
http://localhost/mysite. If you re-named the wordpress folder to something else, then use that name here. WordPress will notify you that it was unable to find
wp-config.php file. Click on Create a Configuration File button.
On the next screen provide your database information. In the database name field, enter the name of database you created earlier. For database username and password fields use root. Use localhost as your database server.
WordPress will now connect to your database and create a configuration file for you. After this it will show you a success message. Click on Run Install button to proceed.
On the next screen, WordPress will ask you to provide your website information, choose a username and password, and enter an email address. Fill in the form and then click on Install WordPress button.
WordPress will now run the installation script, create tables inside database and set up your website. You will see a success message once the installation is complete.
That’s all, now you can run WordPress on your Mac using MAMP, just like you would run WordPress on a live web server. Just launch MAMP application to start your local server and use WordPress. Once you have played with WordPress on your localhost, then you can install WordPress on a live site.