WordPress is a free and open source software which you can customize with themes and plugins. If you decided to learn or host your site using self-hosted WordPress platform, then the first thing you need is to setup a local server environment (also called localhost). This will help you to play around with admin dashboard settings, install various themes and plugins and build your site locally on your computer. Once you are done, you can easily move the local site to live hosting environment to make the site available publicly. You have many options to setup a local site like MAMP, XAMPP, WAMP, Local WP, etc. In this article, let us explore installing WordPress localhost site using MAMP on Mac.
Install WordPress on Mac
MAMP stands for My Apache, MySQL and PHP which is an application (both free and Pro versions are available) allows you to install Apache, PHP and MySQL on macOS to develop WordPress sites. Earlier it was available only for Mac and subsequently there is also a Windows version available. Below are the steps involved in creating a local WordPress site.
Don’t have time to follow the lengthy process with MAMP? Try Kinsta’s managed WordPress hosting with 5 free staging sites. You can also use DevKinsta app to create multiple local WordPress sites.
1. Download MAMP for Your Mac Chip
Go to MAMP site and download the latest MAMP for macOS. Make sure to select the correct version for your Mac based on Intel or Apple M1/M2 processor chips. You can find this information from “About The Mac” menu by clicking on the Apple logo in your Mac.

Installer package will start downloading to your “Downloads” folder.
2. Install MAMP App on Mac
Once download is completed, double click on the .pkg file to run the installer. You can see the steps are listed in the right sidebar section of the installer. First screen will show the “Introduction” and click on “Continue” button to proceed further.

Make sure to read the “Read Me” instructions listed on the next screen. It will instruct not to delete or rename “MAMP” folder along with other details regarding your processor and reinstallation. If you are trying to reinstall MAMP, then check this article on how to replace existing files with newer version.

Next, accept the license terms and MAMP will automatically select the installation location under “Applications > MAMP” folder in your Mac. Earlier, there was an option to change the installation folder which is no more available. So, the installer will skip “Destination Select” section and take you to the next section.

The “Installation Type” section will show that the app will take 1.64 GB space on your system. So, make sure you have sufficient storage space on your Mac and click “Install” button.

When prompted, provide the admin password to start the installation and it will take a minute to complete the setup process. Finally, you will see a “The installation was successful” message indicating the local server setup is finished and click on “Close” button


You will be asked to delete the installer package file and click “Move to Trash” button. Since the file is more than 400 MB in size, this will help to regain some storage space instead of leaving the file unattended in “Downloads” folder.

3. Delete MAMP Pro Version
The standard install by default will install MAMP and 14 days free trail version of MAMP PRO. Earlier, you could deselect MAMP Pro option by clicking on “Customize” button when you reach “Installation Type” section. However, this is no more possible and you will be forced to install both MAMP and MAMP Pro.

You can find both MAMP and MAMP PRO apps are added in Launchpad and Applications folder. Simply drag and drop MAMP PRO in “Trash” to uninstall the app.

Note: Do not move MAMP out of the Applications folder or rename it once it is installed. When you upgrade to new MAMP version, the old application will be renamed like “MAPM_Curent_Date_Time” and new application will be created with the name MAMP. All existing folders and files inside “htdocs” folder will be transferred to new MAMP folder, hence you can just delete the your old installation “MAMP_Current_Date_Time” after upgrading.
4. Configuring MAMP
Once installed successfully, launch MAMP from Launchpad or from Applications folder (/Applications/MAMP/MAMP).

MAMP has a super simple user interface as shown below. Make sure to select the “Web Server” as “Apache” and choose your PHP version from the list. After that click on the “Preferences…” button to configure your local server’s access.

Note: MAMP added NginX server as an experimental feature from version 3.0.6. Selecting NginX without appropriate configuration will results in a 502 – Bad Gateway error when you open you localhost site.
There are four settings available under preferences – General, Ports, Server and Cloud.
5. MAMP General Settings
Set whether you want to the local server to start/stop when you start and stop MAMP. Otherwise, you need to manually click the “Start” or “Stop” button on top right corner of the app. If you add a URL in the favorite link, there will be a “favorite link” tab appear when WebStart page opens.

PHP-Cache is the option to speed up the execution of PHP codes and by default it is switched off. You can turn on to any available caching methods under that drop-down. It is recommended to disable “PHP-Cache” to off state to avoid conflicts with certain plugins when working in WordPress dashboard.
6. Select Ports Carefully
It is necessary to define ports in order to access server programs through network so that multiple programs can run on a same server. There are two options to set ports for Apache / MySQL servers in MAMP:
- Set Web & MySQL ports to 80 & 3306 – when you click on this button the following ports will be set:
- Apace Port – 80
- Nginx port – 80
- MySQL Port – 3306
Since 80 is the commonly used port for internet access, if you save this settings you will be prompted to enter your Mac administrator password for starting and stopping Apache server. You can access your site with the URL as http://localhost. (This is the settings we use for our further discussion).

- Set Web & MySQL ports to MAMP default – when you click on this button following ports will be set:
- Apace Port – 8888
- Nginx port – 8888
- MySQL Port – 8889
If you use this settings then your local site to be accessed with the URL http://localhost:8888 and you do not need to enter password for starting and stopping server.
7. Select Document Root
The document root is the place where all your WordPress HTML, PHP and image files are stored. Either you can use default document root “/Applications / MAMP / htdocs” or choose another location by clicking on “Choose” button.

8. Cloud Setup
MAMP also offers a cloud setup to sync all your local server files (including database) in Dropbox. In this way, you can access the files from any other computer if needed. Enable cloud option and select “Dropbox” from the list. This will open Dropbox website where you can authorize MAMP to store content in your Dropbox cloud account. You can also set the encryption key to protect your data with a password. If you do not want to use cloud sync, disable the option and click “OK” button to close the pop-up window.

9. Checking Localhost URL
At this point, opening localhost in your browser will show a placeholder page with URL http://localhost like below. This indicates that you have setup and configured MAMP correctly on Mac.

10. Creating Database for WordPress
Now that you have configured MAMP to access Apache and MySQL servers, launch MAMP and click on the “Start” button to launch local servers. If you have selected “Open WebStart Page” under “General” preferences as explained above, then start page will open by default or else click on “WebStart” button in the MAMP main screen. When you are in the WebStart page, go to “MySQL” section and click “phyMyAdmin” link.

Alternatively, you can directly open the link http://localhost/phpMyAdmin/ in a new tab to open database management section.

Under “Databases” tab enter database name and click on “Create” button to create a database. Remember the database name, this is the name you need to use for WordPress installation. You do not need to choose “Collation” option, which will be automatically assigned during WordPress installation.
11. Installing WordPress on Mac
Go to wordpress.org site and download the latest WordPress version to your local Mac. Extracting this zipped file with the default Mac “Archive Utility” will create a folder named “wordpress”. Open this folder, copy all files/folders and paste them inside document root folder defined in MAMP preference settings under “Server” tab. By default, the document root folder is “/Applications / MAMP / htdocs /” and paste all files/folders there.

Note: If you paste the complete “wordpress” folder inside “htdocs” folder then you will be installing WordPress under a sub-directory called “wordpress” and your WordPress access URL should be http://localhost/wordpress. If you copy and paste the content of “wordpress” folder then you are installing WordPress in root directory of “htdocs” and hence your WordPress access URL should be http://localhost.
12. Connect WordPress to Local Database
Now that you setup MAMP servers, database and installed WordPress, guess what next? You need to connect WordPress installation to the MAMP MySQL database so that WordPress can save your content in that database tables. In order to do that, open “htdocs” folder in your Mac and locate “wp-config-sample.php” file. Right click on the file name, select “Duplicate” to create a copy of the file and change the name to “wp-config.php”. Open “wp-config.php” file and add the following details under MySQL settings section:
- Database name – Same name which you created in step 10.
- User name – root
- Password – root
- Hostname – localhost
The code in “wp-config.php” file will be looking something like below:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', Database name as you created in step3);
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'root');
/** MySQL hostname */
define('DB_HOST', 'localhost');
Edit “wp-config.php” file with simple text editor like “TextEdit” and do not use word processors like Pages or Word to avoid the quotes being changed to different style resulting in not able to open your WordPress site.

If you try to open your localhost URL without setting up “wp-config.php” file, then you will see a message like below:

Click on the “Create a Configuration File” to create “wp-config.php” file by providing database details and then again click on “Run Install” button in the next screen to go to next step.
Related: 10 MAMP tips to work like a pro with WordPress.
13. Configure WordPress Login Details
Launch MAMP and start the servers if not started automatically.

Open your localhost URL http://localhost (or http://localhost:8888) in Safari or any other browser. You will see a welcome screen from WordPress asking you to provide login details for WordPress admin dashboard.

Enter required details and click on “Install WordPress” button, you will be seeing a success message after completion of installation as below:

Open localhost URL in a browser to see the look of your new WordPress local site or click on “Log In” button to logon to your WordPress admin dashboard.
Create localhost WordPress sites with DevKinsta app from Kinsta hosting. You can have multiple WordPress installations and move the changes to live server instantly without hassle.
14. Opening WordPress Admin Dashboard
Now you have setup everything and ready to build your WordPress site. Ensure you launched MAMP and Apache / My SQL servers are started successfully. Open WordPress admin URL http://localhost/wp-admin/ (or http://localhost:8888/wp-admin/), enter user name and password you have provided in step6 to login to WordPress admin dashboard.

The admin dashboard provides unlimited capabilities to start building your site. As mentioned, you can install themes, plugins and play around with the settings to learn WordPress.

If you plan to create large amount of content locally, then it is also possible to move your localhost WordPress site’s content to live WordPress site. Similarly, you can duplicate live site to local environment to keep a local copy of your site for testing purposes.
Frequently Asked Questions
No, free MAMP version does not allow you to setup SSL locally. You can go for MAMP Pro or other apps like DevKinsta from Kinsta.
One, free MAMP allows you to create only one site. You need the Pro version or go for Local WP for creating multiple WordPress sites locally on your Mac.
Plugins offering caching, online transactions and third-party server integrations (like Jetpack) will not work locally. In some cases, you can’t activate the license on localhost site.
The WebStart page will show MySQL database details along with options to access your locally hosted site, favorite link and tools like phpMyAdmin.
Using port 80 in MAMP preferences needs you to provide password for starting/stopping servers.
If you have setup “MAMP default” ports (8888 / 8889), then you should use http://localhost:8888 to access your local site instead of http://localhost.
You can use other free apps like XAMPP, WAMP or Local WP. Otherwise, you can create a online staging site on your server with managed hosting platforms like Kinsta or SiteGround.








Thank you for your amazing article. You have made the process so simple!
Your article explains the process and uses screen shots, effectively guiding you through the process – the only one I have come across that does so.
I have tried to setup WP on my local using 3-4 different sites without success.
Thank you.
Simply brilliant!
Hi there…great article, but did not include a vital piece of info I’m trying to figure out.
I have a successful local install of a WP site, using the default MAMP ports. However, now I’d like to install a second local site (and maybe more), so my understanding is I should change the MAMP web & mysql ports to 80 & 3306.
But some questions:
1. IS it actually necessary to change the ports for multiple WP installations on localhost per above, and if so, why?
2. Assuming it is necessary, I did so…and I was no longer able to access my DB via phpMyadmin @ localhost:3306, nor the WP site @ localhost:80. The sequence was: MAMP was running/servers running. I stopped the servers, reset the prefs to the alt ports, and then restarted the servers…checked for the site & phpMyAdmin. Nada :-(
3. If I do get this working, would I need to then switch the webserver document root in the prefs each time before starting the servers, to choose the applicable site? Would they both open via the same ports?
Thanks in advance,
Suzanne
By default MAMP is meant for single virtual server and you should go for MAMP Pro for multiple servers.
It will not work with switching ports or document root. You should tweak the Apache configuration file http.conf and the hosts file to define different document root for different virtual host server. (we did not try this).
Thanks for the wonderful article, it was well explained with details and i could able to install it successfully following the instructions.