How to Set up WordPress Locally Using MAMP and XAMPP?

When I begin creating websites on WordPress, the thing I battled with most was making sense of how to set up WordPress locally. I didn’t know how programmers take their code on the internet: How would they change between creating a website and making it live? Where do these programmers make changes if needed, if the site is online?

Every WordPress beginner struggle with this question: “How to set up my coding environment?” Streamlining your coding is especially significant in WordPress in order to try out changes and test your codes.

live chat plugins for WordPress website
How to set up WordPress locally

An answer for issues is utilizing the free MAMP and XAMPP application to create your WordPress on localhost. When you build up a site locally, it mimics an online situation while you design your site on a computer and do not put your website on the internet for the world to see. MAMP and XAMPP enables you to WordPress themes, plugins and codes without potentially harming your website.

It is a good call for beginners to test their site on the local environment before you mess with your live website. It will keep your development process hidden from everyone and also finish your work much faster as now you don’t have to wait for files to upload on the live server when you edit.

I made this guide so that learners can understand how to get MAMP fully operational on your computer for building up a local WordPress site. I’ll break the process into steps and hopefully, it won’t be daunting at all for you.

What is MAMP? 

For the new beginners, it won’t be easy for you to grasp all the concepts at once, so first I will tell you about MAMP.

MAMP represents Macintosh, Apache, MySQL, and PHP. It is a free application and you can download your Mac devices. It gives you access to an Apache server which is an open-source server.

  • Macintosh: a working framework
  • Apache: an open-source web server
  • MySQL: database management system
  • PHP: server-side coding language (on which WordPress website runs)

These four components meet up and make a web server for your PC on which you can build whole sites and see what they would resemble online.

MAMP enables you to run a WordPress website on your PC just (without any other individual having the option to see it since it isn't on the web), which is the reason this software is amazing for testing out new things on your site, rolling out improvements, or designing a website from scratch.

6 Steps to Set up WordPress Locally

Step 1: Install WordPress on your computer 

The first step involves downloading the latest version of WordPress on your computers from It will be a zip folder. Next, open up a new finder window. In your user directory, create a new folder called “Sites”.

Step 2: Download, Install and launch MAMP

The next step is to install MAMP on your desktop. Do this by visiting the official MAMP website. Download below the free version of the software, which is sufficient for WP beginners. After the download is completed, click on the downloaded file and start the installation process.

Go to your Applications folder and click on the MAMP folder to launch it.

How to set up WordPress locally

Step 3: Setting the ports 

After launching MAMP, get it to run servers on your local system. At this step, you will edit the post settings to –

  • Apache port setting at the default is 8888. It implies when you visit your local site you’ll have to type the port number in the browser.
  • Change this setting to 80 and click on ‘Okay’. It implies you won’t have to type any number in the browser when you are asked for your computer’s password.

Step 4: Configure the web and document root

In this step, click on the Web Server tab to make sure it is Apache. Now set the document root. Here all your local site files will be saved. The default document root of MAMP is: Macintosh HD > Applications > MAMP > htdocs. Now, we will change that.

In the first step, we created the new “Sites” folder with WordPress install. It is going to be our new document root. For this, click the gray folder button which has three white dots. A pop-up will appear; here you will choose the document root place.

Here you are not changing the location of MAMP, simply telling MAMP where to search for the files. Now, click on the Open start page option in MAMP. The green light will signal that the servers are turned on.

Step 5: Create a Database

Before using WordPress locally, you need to create a database to install your website. MySQL is one of the best databases in the world and all files on WordPress run on this database.

After clicking on the Open start page, your computer will provide you details of your MySQL database settings. Next, click on the phpMyAdmin section at the top of the screen. Now, click the Databases at the top of the screen.

Click on Create. In this field, write the name of your database. If you are running one site, call the database WordPress: but in case you want to run more than one local site, give a name that resembles your website.

After you have written the database name, click on the Create button. A database will be created.

Step 6: The Famous Five Minute Install

In this step, open your web browser and visit localhost/WordPress in URL. If you have not changed your port settings, type localhost:8888/WordPress. In case, you have renamed your folder name, use that name.

Now it will ask you to select the language you want to work with. Click on the Continue button.

Next will be the screen, where you have to fill information about the database you created earlier in this guide. Now click on the ‘Let’s go’ button. Type the following-

  • Database Name: WordPress (or whatever name you have given to your database)
  • User Name: root
  • Password: root
  • Database Host: localhost
  • Table Prefix: wp_

Click on the ‘Submit’. Next, it will ask you some general site and your login information. The credentials set up here will be used to log into the WordPress dashboard later. After filling out the information, click on the Install WordPress button.

Now you have to do is log in to your WordPress Local Host Site. You can access the WordPress Dashboard and start designing your site locally.

What's XAMPP?

Are you seeking to make a local WordPress site? For this, you'll need to set up local internet server software (like Apache), Perk, PHP, and MySQL on your desktop.

PHP is a backend programming language while MySQL Is database management software. Both of these play an integral role in running WordPress site. But installing and running these elements individually is time taking and quite difficult, especially for novices.

This is where you will want the assistance of XAMPP. It makes it very simple for you to make WordPress website on local server by permitting you to install these elements in 1 spot and go. Many WP novices use XAMPP to prepare the locally hosted environment so as to conduct WordPress. Here, you can test topics, experimentation with coding and plugins, and so on without harming your website.

It is free and open software available for all to download. XAMPP comes with a fantastic backup community support which is useful if something goes wrong.

How to Use XAMPP to Set Up WordPress Locally in 3 Steps?

Step 1: Download and install XAMPP on your computer

During this step, you need to visit The XAMPP website (Apache buddies ) and pick the appropriate download link on the homepage according to your operating system.

Once the download is completed, install XAMPP on Your operating system. This part of the installation procedure doesn't need much on your part. Pick the default setting as it will work best for most users. After finishing the wizard, check on the ‘beginning the control panel now' option. You'll find a message to install Bitnami for XAMPP. You don't need this to set up XAMPP, so just uncheck the box. Click ‘Next' to complete the setup wizard.

After the installation is finished, you can launch the Control panel to begin working.

Step 2: Run XAMPP and Configure Your Environment

XAMPP application by hitting ‘Start'. XAMPP will begin Apache and MySQL program. You will notice Windows Firewall telling, click on'Enable Access' for both programs to run it on your desktopcomputer.

Next, you will see green light highlighted on Check the status of the two Apache and MySQL are running and green. This is going to make sure your database management and server software are ready for your local environment. At this time, you have successfully installed XAMPP on your computers. Now you are prepared to create a local WordPress site using XAMPP.

Step 3: Creating a Local WordPress Website with XAMPP

At this time you need to download WordPress. You can go The site and Download WordPress. Following the download WordPress, extract files from the zip folder. Find wordpress folder and then copy it. Now move to your XAMPP folder.

On Windows it would be like that – C:/Program Files/XAMPP/htdocs or C:Xampphtdocs folder.

Paste your WordPress folder inside htdocs. You can rename this folder so it would be simple for you to identify your local website.

Next, open your web browser ant type localhost/folder name. Here you are able to make a database for your site. It will consist of name, database username, password, and server information. Now see phpmyadmin in XAMPP control panel. It can allow you to handle your databases using an easy to use interface. Click Database on the very best. Here you can provide a name for your new database, and then click the create button.

As Soon as You have created a database, then you can use it to get Your WordPress site. Go to /localhost/folder name/ and click on the'Let's Go'. Next, it will request you to give WordPress database information you made earlier. This measure will differ from a normal install is your database details. Input them like given below-

Database Name = Name of the database you've made
Username =”root”
Password = leave blank
Now, click on the Submit button.

Once you complete the process, you are able to see your new WordPress install running perfectly in your local server atmosphere. After Developing a local WordPress site, you may work with it like dwell WordPress site.

For more information, visit WordPress development company in India.

6370/4, Sector 52, Faridabad, Haryana 121005
Mon - Sat: :09:30-18:30
Copyright © 2022. All rights reserved.