How to Run Multiple Local WordPress Sites on a Mac Using MAMP
One of our students wanted to know how to run multiple local WordPress sites on a Mac using MAMP, so we created this tutorial for him.
1) Download and Install MAMP
Go to http://www.mamp.info/en/downloads/index.html and download the latest version of MAMP.
Once the download has completed, double-click on the file to start the installation. Note: The downloaded file may be zipped (compressed) depending on which browser (and its settings) you used to download, so you may have to double-click twice (once to unzip and once to start the installation).
Follow the installation instructions which will install MAMP on your Mac.
2) Start MAMP
Navigate to Applications > MAMP folder > MAMP icon.
MAMP will start automatically and a welcome screen page will display.
- If any of the statuses are red, please post in our support forum and one of our support techs will help you get things working as they should.
- Please note that the user is “root” and the password is “root”, while the host is “localhost”.
3) Create the Database
On your MAMP control panel, click the “Open start page” button.
Click the phpMyAdmin link.
In the “Create new database” field, enter the name of the database. In the example, I have chosen “site1”. Then click the “Create” button.
4) Download WordPress
Go to http://wordpress.org/download/ and download the latest WordPress version.
5) Move the WordPress Files to MAMP’s htdocs Folder
Copy the downloaded “wordpress” folder by right-clicking on the folder then selecting “Copy wordpress”.
Note: The downloaded file may be zipped (compressed) depending on which browser (and its settings) you used to download, so you may have to double-click on the file to unzip its contents before coping.
Navigate to Applications > MAMP folder > htdocs folder
Paste the “wordpress” folder by right-clicking within the htdocs folder then selecting “Paste Item”.
Note: You can rename the “wordpress” fold if you would like. In web development, it’s standard practice to not add spaces, capitals, or special characters in folder names. Keeping this standard will make sure everything works as it should.
6) Install WordPress
In your browser, navigate to http://localhost:8888/wordpress/ .
Note: Replace “wordpress” with whatever you renamed the folder to in step 5.
Read the instructions, then click the “Create a Configuration File” button.
Read the instructions, then click the “Let’s go!” button.
Read the instructions, then enter:
- Database Name (you created this in step 3)
- Username: root
- Password: root
- Database Host: localhost
- Table Prefix (put random two or three letters before the underscore)
Click “Submit”.
Click “Run the install”.
Fill in the fields appropriately then click “Install WordPress”.
That’s it! You’re done! Congratulations! Now you can log in and start using WordPress.
Installing Multiple Sites
To install more sites in MAMP, just repeat steps 3 through 6 as many times as needed.
DesktopServer has allows you to setup multiple isolated WordPress projects and name them with friendly ‘fake’ domain names like MAMP Pro, but for free. It also allows you to copy, and setup complete WP sites in just a few clicks. [url=http://serverpress.com/products/desktopserver/#compare]serverpress.com/products/de…[/url]
The Pro version is not free. Don’t believe this ad folks.
thank you, very helpful.
This is REALLY helpful, thanks so much.
This was very helpful, however, after installing my second WP site I am not getting the complete WordPress editor like the first one I installed. When I click on Pages > Quick Edit (or any other editing option), it appears that the page cannot find the css for the editors. I would love to send a screen cap to explain better.
Wow! Thank you! I found this information clear and clean! I have been looking for it for two days now! This is very helpful and easy to understand! I have done what I wanted to do and got the best information from you. Mahalo, Dei
Thank you very much 4 this tut! My students will appreciate it! Greetings from Germany.
I didn’t create any folder in htdocs and everything was actually in htdocs. However, I found out that I need to create another localhost website. I tried moving everything I already installed into an folder and edited the urls in dreamweaver. But it’s not working. All the urls I’ve tested out was actually localhost/wp_admin instead of localhost/folder/wp_admin as it should be. How do I fix it? Do I have to erase and start all over again?
I already have a wordpress account in htdocs folder, but I didn’t group it as a folder. It’s like “htdocs/index.php”, “htdocs/wp-login”, and so on, instead of “htdocs/wordpress/index.php”. I wanted to move everything into a folder like this, “htdocs/wordpress/index.php”. But when I do this, everything got messed up and the website only works if it’s like “htdocs/index.php”. Do I have to delete everything and start over again in order to make more multiple folders/websites?
Thank you, thank you, thank you! I watched numerous youtube videos on how to do this which all gave different advice that never worked. Thanks for finally giving me the right info!!
you are the one!
It took me one day.. and after all the trouble of reading other blogs and forums, this one is the best!
I didn’t think of backing up my work, so I lost everything, but with the amount of experience I’ve accumulated in 10 hours I am able to build up the site again in half that time.
Thank you for sharing your expertise
Thank you…….! 🙂 Lima – Perú
So helpful and simple. Thanks!
One of the best tutorials I have seen! Awesome.
Here is very nice script i build that will handle that and much much it offers two solutions a terminal script app and a web app. Both will get latest wordpress and installed it and configure mamp to map and create your lcoal host here is the link [url=https://github.com/michelve/wordpress-mamp-localhost-generator]https://github.com/michelve…[/url]
Develop and Manage WordPress. Made simple
The most powerful tool for WordPress. Install, manage & deploy your sites in a heartbeat! Get it now [url=https://pilotkit.co]https://pilotkit.co[/url]
Thanks for sharing this. Exactly the help i needed.