Home Environment Setup 5 simple steps to Set up WordPress Locally on a Mac
Environment SetupWordpress

5 simple steps to Set up WordPress Locally on a Mac

I have been working on a Mac for a long time now, but before making the switch, I used to work on Windows. When you wanted to install and set up WordPress locally back in the day, your best options were WAMPserver or XAMPP. These programs enabled you to set up a local server and everything that goes with it to run any type of project, WordPress included.

The simplest and fastest way to set up a WordPress local environment on a Mac is via MAMP (what is it with these names, right?). MAMP is an acronym for macOS, Apache, and PHP, Perl, or Python.

Everything we need to serve WordPress locally is available to us via MAMP, so let’s dig right in and get this set up in a few minutes.

5 easy steps to set up WordPress local environment.

1. Download and set up Mamp

Navigate to the MAMP website, download the MAC free version and then install it as you would with any other Application (program) on a macOS.

Once you have downloaded and installed MAMP, you have to turn on the server by pressing the ON button icon and it will open the default page/screen at http://localhost:8888/

You can change the ports by clicking the PREFERENCES icon in MAMP. If you are not sure what this means, just leave the default ports.

MAMP mac local WordPress environment

Now you need to create a folder where we will add our site. Right-click -> New folder or if you are using the Terminal mkdir folder-name and enter. Name it per your project.

Now we will go to the MAMP again, and select the folder we just created as our DOCUMENT ROOT by clicking “Choose” and navigating to our folder.

Select document root on MAMP

When we download WordPress, we will copy it to THIS folder.

2. Download WordPress

Navigate to WordPress.org and download the latest version of WordPress. Once downloaded, extract the files from .zip and copy them to the folder (which carries the name of your project) you set as your directory root in the previous step.

3. Create a database in phpMyAdmin

In order to run and use WordPress successfully we need a database. We will create a MySQL database and use phpMyAdmin to create and work with it.

We will access phpMyAdmin by entering the following URL in our browser: http://localhost:8888/phpMyAdmin

Now we will click the DATABASES link:

Create a database in PHPMYADMIN

Enter the database name (your-project-database or something similar) and click Create. Remember the database name.

4. Run the WordPress installation

The only thing left to do is to install WordPress. Luckily, this is a simple few-clicks-type-of installation.

Go to your browser and enter http://localhost:8888/your-site-name (the name you named your folder).

You will now see the welcome screen for the WordPress installation.

You will need the database name – the name you gave your database in the previous step. The username and password when installing WordPress locally via MAMP will both be root.

You can leave the host and table prefix as they are. Click “Let’s go!”.

You will now select the language for your site/admin:

Fill in your database name and other fields. If everything was entered correctly, you will see the following screen:

Run the installation, and enter the requested information:

Grab a beer. You are done.

Photo by engin akyurt on Unsplash

And that’s it. You are done. Grab a beer and enjoy.

Written by
Igor Bujas

I am a UI designer and front-end developer professional working mostly in the Shopify ecosystem. I've been working in the industry for so long that I was fixing bugs for IE5, and animating in Flash while it was still a Macromedia product. While not differentiating between the UI and the code, I am always looking to get outdoors for some alpine climbs or scuba dives. I also work as a Krav Maga instructor in Zagreb, Croatia.

Leave a comment

Related Articles

Wordpress

Add an SSL certificate to a WordPress website in 7 simple steps

To add an SSL certificate to your WordPress website, you need to...

Wordpress

Display video on desktop, but display an image on mobile in Revolution Slider

To display a video on desktop and an image on mobile using...

Shopify for DevelopersShopify for EntrepreneursWordpress

Shopify or WordPress?

Choosing between Shopify and WordPress/WooCommerce depends on your specific needs, preferences, and...

4 proven ways to speed up your Shopify store.

    We respect your privacy. Unsubscribe at anytime.