Want to setup a WordPress site on your local computer for testing purpose? Installing WordPress locally allows you to set up a local development environment to test themes, plugins and other site changes before uploading to production server. WordPress runs on server environment other than our laptops or desktops. It requires PHP and MySQL. If you want to create a local WordPress site on your Windows PC or Mac, you will need to set up a web server software (Apache) with PHP and MySQL support on your computer. In this quick guide, we will show you how to easily and quickly create a local WordPress website on your Mac computer using the free software MAMP. As an alternative, you can also install WordPress site on Mac with XAMPP, another great free solution to configure server environment on our desktop or laptop. Both of them work on PC and Mac.
Step 1. Download MAMP on Mac
MAMP comes with both free and paid versions. As the time of writing, the most recent version is V5.2. You can download it from this link. It requires Mac OS 10.10+ and 64-bit processor (Intel).
Step 2. Install MAMP on Mac
The MAMP server will be saved from its website to the Downloads folder on your Mac computer. Find it in Finder. It is a .pkg file. Double click to install MAMP on your Mac.
This installer installs the folder MAMP and the application MAMP PRO in the Applications directory. Do not move or rename the folder MAMP. If the installer detects an existing installation it will preserve the data in /Applications/MAMP/htdocs and /Applications/MAMP/conf/ssl, copy existing databases to the new installation and rename the old MAMP folder.
Step 3. Start MAMP server on Mac
Launch MAMP from the Launchpad on Mac. Click Start Server at its home screen to start Apache Server and MySQL Server at the same time.
Step 4. Create a database for WordPress
From the home screen of MAMP, click Open WebStart page to access the MAMP server home page in Safari web browser.
Click Tools > PHPMYADMIN to open phpMyAdmin the MySQL database management tool for web. Click Databases, type in the database name, then hit the Create button to create a database for WordPress site on your computer.
Step 5. Download WordPress installer
Visit wordpress.org website, the official WP website, to download the WordPress installation package onto your Mac computer. You can find the WordPress installer, a zip file named latest.zip, in the Downloads folder on your Mac.
Run Finder, choose Applications, double click MAMP to open it, then find and open the sub-folder named ‘htdocs’. Copy the WordPress installer from Downloads folder to this htdocs folder. Extract it, you will get the WordPress directory where all your website files are saved.
Step 6. Install WordPress on Mac
Go back to the MAMP server web interface, choose MY WEBSITE, click to open WordPress folder and launch the WordPress web installer.
You will be prompted to choose your preferred language. Hit Continue to proceed.
Step 7. Create WordPress site database connection
We have created a MySQL database for WordPress site using the phpMyAdmin web tool above. Now we need to create the database connection for the website. Fill in the Database Name which you have chosen above. The default Username and Password are root. Database Host is localhost by default. Optionally change a different table prefix.
Step 8. Create WordPress admin account
You need to setup the administrator account which you can use to log on your WordPress dashboard to create and manage the site.
Choose your Site Title, select admin username, password, input your email address. Finally hit the Install WordPress button to finish the WordPress configuration.