Setup WordPress in your computer with MAMP

Last updated: November 2, 2020
You are here:
Estimated reading time: 4 min

This article describes how to install WordPress locally on your computer using MAMP. MAMP is free software (with a paid version) that will setup a server on your computer. You won’t need the paid version for running WordPress on your computer. MAMP gives you options like choosing Apache or Ngnix as a server but I suggest leaving everything in its default values. MAMP will also install a MySQL server that you can administer through PhpMyAdmin.

You can watch the video to see how the setup goes or read on for the text version which has a few more details.
Walkthrough of the setup

Download MAMP

In order to download MAMP you need to go to their site at https://www.mamp.info/. Click on the Free Download button and it will take you to a page where you can choose your operating system in order to download the proper file.

MAMP homepage

Choose your operating system (Mac or Windows) for the download to start. Save the file in a folder you can remember later.

Choose your Operating System

Install MAMP

Once you have downloaded your file double click on it to run it. It will open up a dialog for a wizard that will guide you through the installation process.

MAMP Installation Wizard

Once finished you can find MAMP installed under the folder Applications -> MAMP. This folder is important because inside it is the “htdocs” folder which is where your site files will reside.

MAMP is under Applications – MAMP

The MAMP application is a small window which you are able to hide while using it. In order to start the servers click on the “Start” button at the top right corner.

MAMP application panel

Starting the server will open a window in your default browser showing you the address as “localhost” with a port of 8888. From this screen you can access tools like PhpMyAdmin (under Tools in the main menu).

MAMP welcome screen

Downloading WordPress

MAMP does not include WordPress so you will have to download it separately. WordPress is also free software and you can go to this link – https://wordpress.org/ – to download a copy. Save the file in a place you can easily find later.

WordPress Download page

Creating your site

In order to install WordPress we need to unzip the WordPress package files into a folder in the htdocs MAMP folder. You can name the folder whatever you like, we can use “test-site” as an example.

Add uncompressed WordPress files to site root at MAMP -> htdocs

Creating your Database

At this point we need to create a database using PhpMyAdmin. You can find it through the MAMP page menu in your localhost (http://localhost:8888/MAMP/). It will be under “Tools -> phpMyAdmin”

Link to manage your databases

When phpMyAdmin opens you will see at the left sidebar the menu. The first option says “New”. Click it to create a new database.

Create a new Database with phpMyAdmin

You can then go ahead and put the name of your database in the blank field, then click “Create”. I try not to use dashes (-) when creating databases, but as you can see you can use underscores ( _ ).

Create a new Database with PhpMyAdmin

You will now see your database in the file tree in the left sidebar. It lists things alphabetically so yours might not be at the end of the tree if you used a different name.

Your new database

Installing WordPress

Once you have your files under a folder in the “htdocs” you can go ahead and load the url of the site to follow the WordPress installer. This will be something like http://localhost:8888/yoursitename/. This will show the first screen of the WordPress installer which prompts you to choose a language for the install.

Make sure you create a folder under “htdocs” with your site name and put the WordPress files there, otherwise the entire site in localhost will be your WordPress site. Ideally you will want to have many WordPress installs in your server not just one. So you will use a different folder for each one.
Choose the language of the install

This next dialog box will give you further instructions on the information you need to continue the installation. The database name is the one you chose on the step 5 “Creating your Database”. MAMP uses the user “root” and password “root” for the databases.

If you wish for more secure credentials for your database you can create a new user/password combo on phpMyAdmin and assign it to the database but do NOT change or delete the “root” user.
Gather information about your install

In this dialog box you will enter the information you gathered in the preceding step. Click on “Submit” to continue.

Add user information

Now the WordPress installer checks to see if everything is correct and then prompts you to continue the installation. Click on “Run the installation” to continue.

WordPress checks before continuing the installation

The next dialog will ask for specific information for your WordPress site. I know, there’s a lot of information here in addition to the database credentials. My advice is that you save this information in a secure place for later reference.

Follow the guidelines that WordPress gives you to generate your username and I would use the strong passwords it generates. I would only use weak passwords if you don’t plan to move the site to a hosting server on the internet.

Once you have all this information saved up click on the “Install WordPress” button to finish the installation.

WordPress information

The next screen will tell you if the install was successful, giving you your username so you can go ahead and log in to the backend of WordPress.

WordPress success message – Log in to your site

Viewing your site

If you click directly on the “Log In” button you were shown in the last step of the installation, you will go to the log in page for WordPress. If for some reason you lost this button you can log in from this address – http://localhost:8888/yoursitename/wp-admin/. Remember to change “yoursitename” to the name you gave the folder you created.

Please save your WordPress username/password somewhere safe. If you forget your login you might not be able to recuperate the password by clicking on the “Lost your password?” link because localhost doesn’t have a mail server so mail will not be sent and you can’t change it directly on the database either.
Log In to WordPress

Once you log in successfully you will be taken to your WordPress Dashboard. From here you can start adding content to your website.

WordPress dashboard

You can view the front of your site by clicking on the site name (next to the little house icon) in the top left of the dashboard then click on “Visit Site”. The current theme will be the latest one WordPress has published in this case it is Twenty Twenty.

Now start playing with your site and make it awesome!

Your WordPress Website!

Stopping the server

Once you have finished working with your site for the day you can stop the server by clicking the “Stop” button in the MAMP panel.

Stop the servers

Thank you for reading.

Was this article helpful?
Dislike 0 0 of 0 found this article helpful.