Develop your WordPress website locally using a localhost on your computer.
If you would like to install WordPress on your computer I’ll walk you thru the steps that you need to do to get it done quickly and easily.
WordPress is designed to live on a server. For WordPress to run on your computer you need to make our computer look like a server to WordPress. To accomplish this there are several pieces of software that will accomplish this for us. I like MAMP the base version is all that you need, and it’s free and easy to use.
Step 1: Install Server Software
Download in install MAMP. You can get the MAMP software at MAMP.info.
Step 2: Set Up And Turn On Server
After MAMP has been installed the main MAMP window will appear. It should start the servers automatically. You can tell if the servers are running because the little “lights” next to the Apache Server and MySQL Server will be green.
If for some reason they did not start automatically you can click the button below them that says “Start Servers.”
Step 3: Get your MySQL Username and Password
Once the green Apache and MySQL server lights are on you can test that your localhost server is functioning by clicking on the “Open Start Page” button in the MAMP window.
A MAMP page should open up wit the address localhost/mamp/
If you scroll down on that page you will find the information about your MySQL user name and password. The default for both is “root”.
Step 4: Set Up A Database
WordPress needs a place to store the data that you create for your site. Things like your posts, user and pages are all stored in a database file. Every WordPress site needs it’s own database file. Let’s create one. On the MAMP start page click on tools > phpMyAdmin.
On the left hand side of the phpMyAdmin page there is a database tree. At the very top of that is a button that says new. Click on this button. You can also alternatively click on the database tab on the right side of the page.
On the right side under “Databases” it will say create database with a form field that says “Database name” enter a name in that field. Set the collation to “utf8_general_ci” or the utf8 setting that matches your language.
Click on create
Remember what you named your password, you will need to know what that name is when you install WordPress.
Step 5: Download WordPress
Head over to WordPress.org to download the latest version of WordPress. You will find a prominent download button.
After downloading WordPress unzip the file and open up the folder called “wordpress” you will see a listing of all of the files and folders that are part of WordPress. Keep this window open. We will need to copy these files over to the correct location.
Reopen the MAMP window and select “preferences” select the tab that says “Web Server”. Look in the “Document Root” field. This is the location where you will need to place the WordPress files and where the files for your website will live. The default location is C:\MAMP\htdocs.
In the Web Server tab click the “open” button. This will open that folder. You can copy all of the WordPress files into this folder, but I prefer to create a new folder inside the htdocs folder. Each folder that you create in the htdocs folder can be a separate website install. Just remember to make a new database for every new website that you would like to create.
Create a new folder and copy all of the WordPress files into it.
Step 6: Install WordPress
Go back to your web browser and go to localhost/
Here you will se a link to the folder that you just created with the WordPress files. If you create multiple folders for multiple sites they will all be listed here.
Click on the link for the folder that you just created. WordPress will now begin it installation.
Select your chosen language and then click continue.
The next page tell you about the things that you will need to know to complete the install.
Database name
Database username
Database password
Database host
Table prefix
Click “Let’s go!”
On the next page enter in the database name that you just created.
Enter in the username; the default is “root”.
Enter in the password; the default is “root”.
The database host is “localhost”
The default table prefix of “wp_” is fine for most cases.
Click Submit.
On the next page click “Run the Install”
Now you will enter in some basic information about your site.
Site Title: That’s the name of your webstie.
Username: This will be the login for the administration are of your site. It’s important to select a unique name here. You do now want to use “Admin” or “Administrator” or some other generic name. This is a security issue for your site. Hackers know all of the common administrator name so come up with something unique.
Password: WordPress will create a default complex password. You can use that password or enter in your own unique complex password. It’s really important to have a complex password to prevent your site from getting hacked. Hackers employ bots that can sit on your site and guess the common Usernames and passwords. Since your site will eventually be live on the internet that means that hackers have 24 hr access with the power of bot computers to try and hack into your site.
I recommend using a services like LastPass or 1Password to help your remember you passwords and use a unique password for every website and online service that you sign up for. If one service is hacked and you use the same user name and password on all of your accounts that could be a serious problem.
Enter in your email address. This will be used to help you retrieve your password if your lose it, it will also be used to send you notification about your website, such as new comments.
The last box will ask you if you would like to Discourage search engines from indexing your site.
Since we are building our site locally this is not really a big issue and you can leave it unchecked. If you were building your site online, you may want to select this box until your site is ready for visitors. What ever you do make sure that you uncheck this setting before you site goes live!
Now click “Install WordPress”
You should now get a messages that says “Success!” WordPress has been installed and a button on the bottom to login to your site.
Log in to your site and now your are done! You have WordPress installed locally on your Windows Computer!
Great information Tim.
I followed all of the steps and actually made it to the dashboard. I tried to upload i-excel theme and it said the file exceeded the upload amount limit. After that my laptop froze. I forced shutdown withe power button and when I turned it back on to resume starting my clients website, i received the ERR_CONNECTION_REFUSED. I was sooo excited and now after 3 hours of YouTube and google I can’t seem to solve the issue. Some say it’s the McAfee software and say go into all these different settings but I am not on that level yet without step by step as you do in your videos. For now I am stuck and would really appreciate some assistance. Please help. Thanks
First suggestion unzip the theme file on your computer. Place the theme files inside of their folder it in to your WordPress folder under wp-content > themes Then in WordPress you should see the theme under Appearances theme and you can activate it then. I had a similar problem with another theme and that worked for me.
Hi Tim,
Thanks for all the great how-to help! I installed a localhost WP instance and am trying to install my Avada theme and it stops and asks Are you sure you want to do this? I click Try Again and get back to the themes page. Any suggestions? Thanks!
With Avada you have to manually install it. Unzip the Avada file and in your wordpress file place the folder in wp-content/themes
Hello Tim
I am trying to install the MAMP files but I am getting an error saying port “80” is already in use please reconfigure Apache to a free port. Any ideas.
Hmm not sure about that. Sounds like a windows configuration issue, or some other program on your computer is using that. Here is a link to the MAMP support doc on the topic. See if that helps you resolve the issue: https://documentation-3.mamp.info/en/documentation/mamp-windows/#3.2-Ports
Your IIS should have taken the 80 port. Just try with another port in MAMP
Hi Tim,
A non-developer like me enjoyed your tutorial. I already have a WordPress site hosted on Bluehost, but I want to be able to play around with creating different sites and use the steps and page examples in How-To books for my audience: authors, etc., is this the way to do it? Will I be able to download various themes and customize them and that doing so will not interfere with the WordPress already installed on my machine for my real site. Also, playing around with WordPress locally, will I be able to view page online? I am actually working on a book, but I don’t want to touch my own website pages to show the steps and examples and that’s why I was looking for a workaround. Thanks much.
Yes you can use your own computers as a test environment. You can load multiple sites the way that I have shown in this video and test and practice different things! Very handy. I use a similar method on my Mac to test and review WordPress products.
i made a website from your method now i want to host it online how can i host it and buy domain
Check out these two tutorials: How choose hosting and How to move your website
I installed wordpress on local host just as you did,my question is how can I change my site’s url so it’s easier to find me.All I get at the browser is local host and not my domain name.Please email the answer
When it is on your local machine your site can not be viewed on the internet. You need to get a hosting account in order for your website to be viewed online. Here are my current picks for hosting companies
Try ServerPress or Bitnami. Seems easier than MAMP.
Actually Local By flywheel is the easiest that I have found.
You are a best teacher dude! Installing this has become a breeze
Nice! Glad I could help out!
Hi Tim,
Great tutorial! I’m up and running but have an issue uploading photos to my media library. The upload error message pops up, and I know the fix is to use “default-to-go.php”, but it’s a file I need to upload in the cpanel file manager. Does my localhost have a cpanel? Thank you for your help.
Nancy
Is it a very large file? You should not get that error. You may get it if the file is large, which probably means it’s too large and you should look for a way to shrink it.
If that’s not the problem you can manually load the file into your website. To find out where the files are stored click on preferences and then web server This will show you where your website folder is. You can then manually place the folder in the wp-content folder > uploads > and then you can place it in the correct date folder.
Hi Tim,
Nice tutorial out there, may i ask why i am getting error 500 even if i already copied the content of wordpress
Hmm I’m not sure. Make sure that you are going to the local address. Double check the steps again and make sure you didn’t miss anything.
Hi Tim;
I finally got WP installed with no errors with Mamp in Windows 10.
My problem is I’m menu driven and don’t know where to start typing commands so I can start using WP.
I don’t know where to type in my domain name. I think it’s something like this… for zplunger.com
zplunger.com/wp-admin
Shouldn’t I be needing a username or password? Would appreciate your help.
I’ll be swaiting
This is a method of building and working on a website offline. If you want to build a website with your own domain the best way to do it is with a hosting company. What I often do is to build my site offline then transfer it to a hosting company once it’s ready. This is a bit more complex. The easiest way of getting started is to simply build you site online directly at a hosting company. If you need some help getting started with hosting here are some of my suggestions that I have tested. https://www.realwebsitehints.com/what-is-the-best-web-hosting-and-the-best-wordpress-hosting/
How easy is it to put your website live with your host?
I have a site, but their was an error with the directory that I could not fix, so I’ going to start over.
My Classipress theme stopped working.
This method of building a website is really intended to build your website offline essentially and later move it to a live hosting company. Here are my top picks for hosting companies: https://www.realwebsitehints.com/what-is-the-best-web-hosting-and-the-best-wordpress-hosting/ . Here is the easiest method that I have found to move a website: https://www.realwebsitehints.com/easy-way-move-wordpress-website/.
I can’t complete step 6, getting this error:
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
Hi Tim,
It was okay till that step “Step 5: Download WordPress” but when I move on to step 6 and open localhost/ , I don’t see any links to the folder that I have made, only the start page that says the below.
” The virtual host was set up successfully.
If you can see this page, your new virtual host was set up successfully. Now, web content can be added and this placeholder page1 should be replaced or deleted.
Server name: localhost
Document root: C:/MAMP/htdocs
1 Files: index.php and MAMP-PRO-Logo.png ”
appreciate your help
Thanks,
Shaden, be sure that you have errased everything in the C:/MAMP/htdocs folder before loading the WordPress files. Then it should work.
Omgosh, that was excellent, did each step and it worked. Thanks.
Hi Tim,
I have already installed XAMPP on my windows 10 pc. However after watching your video, you used MAMP. Could you help me out installing WordPress using XAMPP?
Hi Tim,
Thank You for this.
To be honest, I’ve never done this with MAMP.
Always love to do this with XAMMP.
But anyway, I might give this a try.
Keep sharing!!