MAMP allows WordPress developers to develop quickly and safely directly on their computer without an Internet connection or the hassle of managing the individual programs that WordPress requires to run.
In this post, I’ll share how to install WordPress with MAMP in order to kick up your local development style.
What is MAMP?
MAMP is a free, downloadable web development application that can be installed on a macOS or Windows operating system. The program gives you local access to an Apache server, which is a web server software that bridges the gap between PHP and web browsers.
Macintosh, Apache, MySQL and PHP (MAMP) are the four components that are bundled together to create the MAMP program:
- Macintosh – MAMP was originally built to run on the macOS operating system, but it can now also run on Windows. For details, check out WAMP, LAMP, or XAMPP.
- Apache – An open-source cross-platform web server.
- MySQL – An open-source relational database management system.
- PHP – The server-side scripting language on which WordPress is built.
Why MAMP?
Local WordPress development with MAMP has a variety of excellent benefits that can help you optimize your development process. Using MAMP means you can:
- Develop locally on your own computer.
- Work without needing internet access.
- Keep your local install as a partial or full backup.
- The lack of an internet connection increases your security a little and also the speed of your machine.
For details, check out WordPress Local Development: What It is and When to Use It.
Getting More with MAMP PRO and MAMP Cloud
MAMP has a premium version called MAMP PRO that has a variety of extra features such as unlimited hosts, configurable web servers, easy WordPress installation and migration, and much more.
Additionally, with MAMP PRO you’ll get the recently introduced MAMP Cloud, which is also available on MAMP as a trial.
MAMP Cloud allows you to save and load your host and data from one database using Dropbox. This means you can work from any computer you need to – a real plus for digital nomads.
Installing MAMP
To install WordPress with MAMP you’ll first need to download the application from the MAMP website.
The process is outlined below using a Mac.
Click the Free Download button on the front page and you’ll be taken to the Downloads page.
To use the latest version of the software MAMP recommends running macOS 10.10 or later. If you’re running an older version of macOS, click the Older MAMP & MAMP PRO versions link.
Once you download the package, click the package icon to launch the installer. Walk through the installation setup until MAMP is installed.
After you have installed MAMP, you can find it in your Applications folder. MAMP PRO comes bundled with a limited trial version so you will see that icon as well.
Open the MAMP folder by clicking the icon. You can start the actual program from here. This folder is also where you’ll access your future WordPress files.
Click the elephant icon to launch MAMP.
The MAMP application window will appear with options to try MAMP Cloud as well as the button you’ll click to Start Servers later. The server status lights in the upper right corner will let you know when the servers are running by turning green.
Before starting the servers, check and set MAMP’s settings.
Setting Ports
A port allows multiple server programs to run on a single machine. Each individual port, designated by a number, is a place to transmit and receive data through a specific program.
MAMP Ports
The default MAMP ports are 8888 for Apache, and 8889 for MySQL. When you turn on the MAMP servers and access your local server through your web browser, you’ll need to include the Apache port number in the URL.
The URL will be: http://localhost:8888.
Alternatively, if you don’t want a port number in the URL, you can switch the Apache port to 80 and MySQL port to 3306. This will make the local server URL http://localhost.
The only downside to this configuration is that you’ll always be asked for your Mac’s administrator password when starting the MAMP servers.
To switch your ports, click on MAMP in your Mac’s top navigation bar then select Preferences. Then, click on the Ports tab.
You can update Ports by either selecting and changing the port numbers directly or by clicking one of the Set MAMP ports to default or Set Web & MySQL ports to 80 & 3306 buttons.
Changing Your Document Root
While you’re still in Preferences, you can change the Document Root for your local MAMP files. This doesn’t change the location of the MAMP application itself but rather where MAMP can find your local website files.
The default Document Root folder on your computer is Applications > MAMP > htdocs. You can change this by going to the Web Server tab and clicking Select.
Once you have completed your Port and Web Server customizations, click OK.
Start the Servers
Click the Start Servers button on the MAMP panel. Setting your ports to 80 and 3306 will prompt you to enter your Mac administrator password.
If the servers successfully turn on, the server status lights on the MAMP panel will turn green and the MAMP start page should open in your default web browser. If it doesn’t open, click the Open Start Page in the MAMP panel.
How to Install WordPress with MAMP
Now that MAMP is installed and setup, the final task is to install WordPress with MAMP.
Create a Database
The first step to install WordPress with MAMP is to create a MySQL database. On the MAMP start page in your web browser, select Tools > phpMyAdmin.
PhpMyAdmin is a software tool that lets you access and manage all of your website MySQL databases.
Select either New in the left-hand sidebar or the Databases tab. Under Databases > Create database, enter a name for your database, preferably in all lowercase letters and with no spaces.
Don’t change the collation setting as MySQL will automatically assign it during the WordPress installation process.
Select Create to generate a new database.
Download WordPress
We’ll install WordPress with MAMP manually so download a fresh copy from WordPress.org.
Move the downloaded ZIP file to your document root folder and unzip it. This folder will be Applications > MAMP > htdocs if you kept the default MAMP setting.
Once unzipped, the folder created will be named “wordpress.” You should rename it to be more relevant to your website.
Set Your Timer
You’re now ready for the famous 5-Minute Install. In a web browser, enter the localhost URL followed by the name of your newly created folder.
Depending on your port settings, the URL will be http://localhost:8888/your-folder-name or http://localhost/your-folder-name.
Next, you should be greeted with the WordPress logo and the option to choose your language.
Select your language and click Continue.
Then, WordPress will welcome you and let you know what details you need to proceed.
Using this installation method isn’t crucial, but it can be easier than editing files directly.
If you prefer changing your credentials in your wp-config.php file, you can do so at this time.
Otherwise, click Let’s go!
You’ll be brought to a screen to enter your database connection details.
Enter the following information:
- Database Name – Name of the database you created in phpMyAdmin
- Username – root
- Password – root
- Database Host – localhost
- Table Prefix – Can stay as “wp_” or be changed to something else in order to improve security as well as to distinguish between multiple WordPress installations
Click Submit.
WordPress will let you know that it’s connecting with your database, then click Run the installation.
Input your Site Title, Username, Password and Your Email.
Finally, click the Install WordPress button.
Afterward, you’ll receive confirmation that you can log in to the site.
You can log in to your new local site by visiting one of the URLs below, depending on your MAMP settings, as previously mentioned:
- http://localhost:8888/your-site-folder-name/wp-admin
- http://localhost/your-site-folder-name/wp-admin
MAMP It Up
After you install WordPress with MAMP once, the process becomes more straightforward each time.
You can locally host a whole army of websites on this development server thanks to its lightweight nature and powerful stack.
Have you ever installed WordPress with MAMP before? What do you look for in a local development application? Let us know in the comments below.
Thanks for this comprehensive tutorial, it was very useful to me.
Thank you! We glad it helped You!
Thank you miss! Best Tutorial I have ever seen!
Your diagrams were very helpful. I appreciate you writing this article. I am so excited to launch my first server using MAMP tonight!
Hello! We are glad you have found something useful and am glad you are launching your own server!
Hi, thanks for the post. It has been really helpful. But my apache server doesn’t start. please help, I have run out of ideas ?? Also I’m using windows 10
Hey, i wanna to say that your informations really helps me a lot.
Thanks so much for the effort taken to share, You saved me so much time. Appreciated.
Hey Sam! No problem 🙂 im glad you didn’t waste your time and got what you wanted! Hope you have a great one! Cheers.
Thank you for the tutorial, appreciate!
No problem! I am glad you enjoyed and we appreciate the review you have left!
Very useful tutorial. Thank you!
Thank you for your review and hope you can enjoy our future posts as well! Cheers!
Thank you so much for your feedback and am glad you found it useful!
This is of great help. I’m new to this world of WordPress and Mamp pro. I have bought your LMS module from envato. I’m trying to view it on mamp pro and then upload to sitegroung go geek. I have acute learning disability and will call or write in for help through your support. Your tutorial did allay my fears a great extent. But, the guide is easy to understand for first timers. Bravo, Bravo, Gentlemen. Keep the world moving. Thank you. Vijayann from Canada. Winnipeg.
Of course and I am glad there was a solution to your problem! We will continue to improve and thank you for your review! Cheers!
Thank you so much!
Anytime! Thank you for enjoying our posts!
Thank you for the very useful tutorial. Worked without problems at first time.
Best regards