Family Encyclopedia >> Electronics

How to install WordPress locally on Mac using MAMP

Do you want to install WordPress locally on Mac? Installing WordPress on your computer allows you to test WordPress before starting a blog. In this article, we will show you how to install WordPress locally on Mac using MAMP.

Tipping: Not using Mac? We also have a tutorial on how to install WordPress locally on Windows.

How to install MAMP on Mac

The first thing you need to do is visit the MAMP website and download MAMP. Once the download is complete, you will need to open the downloaded file and drag the image file into your Applications folder. Then simply follow the instructions on the screen.

After installation, you can go ahead and run MAMP from the Applications »MAMP on your computer.

Note: MAMP also installs MAMP Pro (paid version), so remember to right click.

Before you begin, we recommend that you configure a few settings to enhance your MAMP experience. You can do this by launching the Preferences menu and then switching to the ports tab.

Enter port 80 for Apache and then click the OK button.

Configuring Apache to use port 80 will allow you to access your local websites from http://localhost instead of http://localhost:8888. However, this also means that every time you start the MAMP servers, you'll need to provide the administrator password for your computer.

The next step is to set the document root folder. This will be the folder where you will create and store your websites. By default, MAMP uses the /Applications/MAMP/htdocs/ folder, but you can change this to a more accessible location.

In the preferences dialog, click the Web Server tab, and then select the folder where you want to store your websites. Ideally, you should store each of your websites in a new folder within the Documents folder.

You can name this folder whatever you want. For example, htdocs, mywebsites, wpdev, etc. For the sake of this article, we'll call it allwebsites.

Click OK to save your changes.

Installing WordPress on Mac

Now that you've got MAMP set up, let's go ahead and install WordPress on your Mac computer.

You must first visit the website to download a copy of WordPress. After downloading the file, you need to unzip it.

Next, copy the wordpress folder inside and paste it into the root folder of your MAMP document. You can rename this folder to anything you like (example:mysite, wpbeginner, etc.).

WordPress needs a database to store all of your website data, so you'll need to create a database before installing WordPress. Don't worry, it's not as difficult as it seems..

Simply click on the Open web home page Button in the MAMP application window. A new browser window will open where you should click on Tools »phpMyAdmin from the top menu bar.

phpMyAdmin is a web based application used to manage MySQL databases. In phpMyAdmin, you need to click on Databases and then create a new database.

You can give this database any name you want, but write it down because you will need the database name in the next step. For this tutorial, we'll call it test_db..

Now that you've created the database, it's time to install WordPress.

Go to http://localhost/mysite in a new browser tab. If you change the wordpress folder name to something else then use that name here.

You will now see the first step of the WordPress installation wizard asking you to select a language.

Select the language you want to install WordPress in and then click the Continue button.

On the next screen, WordPress will inform you of the information it will need to complete the installation. Click the 'Go' button to move forward.

Next, you will be prompted to enter your WordPress database information. You already know the name of the database from the previous step. For username and password, you need to use root . For the database host, you need to use localhost .

Once you are done, click the submit button to continue.

WordPress will now connect to your database and create a configuration file for you. After this, it will show you a success message. Click the 'Run Setup' button to continue.

On the next screen, WordPress will ask you to provide your website information, choose a username and password, and enter an email address. Go ahead, fill out the form, and then click the Install WordPress button.

WordPress will now run the installation, and you'll see a success message once it's done.

You can now go ahead and login to the locally installed WordPress site on your Mac computer.

Test WordPress locally on Mac

The purpose of a local installation is to help you test WordPress or develop a website on your computer. Here are some things you might want to try.

  • Finding perfect WordPress themes and giving them a try.
  • Test essential WordPress plugins locally.
  • Learn WordPress programming by creating your own plugins and themes.

Moving your local WordPress installation to the live website

Once you've played around with WordPress locally, you'll want to move it to a live website. This is the only way others will be able to see your website.

For this you will need a domain name and a web hosting account. A domain name is the address of your website on the Internet, and web hosting is where your website files are stored.

We recommend using Bluehost. They are one of the largest hosting companies in the world and an officially recommended WordPress hosting partner.

Fortunately, they are offering WPBeginner users a discount on hosting and a free domain name. Basically, you can get started for $2.75 per month.

→ Click here to claim this exclusive offer from Bluehost ←

Once you've purchased hosting, check out our article on how to make a website to install WordPress.

If you've already built a full website on your localhost, you can go ahead and follow our guide on how to move WordPress from localhost to live site.

We hope this article helped you learn how to install WordPress locally on Mac using MAMP. You may also want to see the types of websites you can create with WordPress.

If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.