How to install a WordPress development environment on your Mac

A local WordPress installation allows you to work offline and have complete control of your site during development. This article explains what you need and how to configure your development environment.

Requirements

To set up a local WordPress installation as described in this article, you’ll need a computer running Mac OS X 10.10 or later and the following:

  • WordPress – The WordPress application files.
  • MAMP – A free application that you install on your Mac to create a local server environment.

Download WordPress

Go to wordpress.org/download and download the .zip version of the latest stable release of WordPress. In your user directory, create a folder called Sites\WordPress. Move the downloaded .zip file from the default download folder to the new WordPress folder. The full path should be Macintosh HD > Users > [your user name] > Sites > WordPress.

Download MAMP

MAMP is an application that installs a local server environment on your Mac. MAMP stands for:

M – Mac, the operating system MAMP is running on.

A – Apache, a web server.

M – MySQL, a database server.

P – PHP, a scripting language.

Go to https://www.mamp.info/en/downloads/ and download the Mac OS X version of MAMP. MAMP is available in a free version and a professional paid version. The free version includes everything you need for installing WordPress locally.

Install MAMP

Locate the downloaded MAMP installation package and double-click it to begin the installation.

When the installation is complete, open Applications > MAMP in Finder. Double-click MAMP to launch the application. If you’re asked whether you want to launch MAMP or MAMP Pro, select Launch MAMP.

Click Preferences.

Click the Web Server tab. Ensure that Apache is selected, then click the folder icon next to Document Root.

In the Finder window, select the Sites\WordPress folder you created after you downloaded the WordPress .zip file. The Document Root should now be [your user name] > Sites > WordPress.

Start the servers

In MAMP, click Start Servers.

The Apache and MySQL should servers start, and a new tab will open in your web browser. The URL displayed in this tab is https://localhost:8888/MAMP and lets you know that MAMP is correctly installed and displays details about the installation.

Create the MySQL database

The next step is to create the MySQL database that your WordPress installation will use. Go to https://localhost:8888/phpmyadmin/ in your web browser to open phpMyAdmin. Click Databases. In Create database, enter a name for your WordPress database and click Create.

Extract the WordPress files

In Finder, open the folder that contains the WordPress .zip file. This is also the folder you’ve set as the Document Root in MAMP. In this example, the full path is Macintosh HD > Users > [your user name] > Sites > WordPress. Double-click the .zip file to extract it. The files are now in a new folder called WordPress.

Install WordPress

In your web browser, go to https://localhost:8888/wordpress . The first page of the WordPress configuration should be displayed. Choose your language and click Continue.

On the next page, click Let’s Go. Enter the database details as shown, except Database Name should be the name you chose when creating the database in phpMyAdmin. Click Submit.

If the database settings are correct, click Run the install. If there are errors, you’ll see details so you can correct them and begin the installation again.

Enter the details in Information needed and click Install WordPress.

When the installation is complete, click Log In.

Congratulations! You now have a fully functional WordPress installation running locally on your Mac.

Application URLs

Here are the URLs you’ll need to administer MAMP and your local WordPress installation. Remember that MAMP is located in the Applications\MAMP folder and must be running for your WordPress installation to work.

  • MAMP – https://localhost:8888/MAMP/
  • phpMyAdmin – https://localhost:8888/phpmyadmin/
  • WordPress Dashboard – https://localhost:8888/wordpress/wp-admin/
  • WordPress site – https://localhost:8888/wordpress/

If you need help with your HostPapa account, please open a support ticket from your dashboard.

Related Articles

Get online with our affordable web hosting

Get online with our affordable web hosting

Learn more now
HostPapa Mustache