Connect with us

How to install WordPress on your local computer?


How to install WordPress on your local computer?

It’s a well know fact that not many people know that WordPress can also be installed locally, and one can even work or test offline. If you are reading this post, then you have probably installed WordPress on a live server, but not everything should be tested online – there should be a safe place where we can just experiment without thinking twice about site visitors and what would happen if we make a mistake.


Sometimes, because of some coding error like too many queries fired at one time, the entire server can crash or your site may be inaccessible due to plugin conflicts or coding mistakes.We really don’t want to take a chance and do all this experiment live. The solution is simple. Install WordPress on your own computer (laptop or desktop). And the best thing is that you don’t need to purchase anything and no need to be a coding ninja for this. Even a beginner can do this!


  • Faster loading time on local environment. On a live server, it may take more time to load the web page (because of internet speed), but locally it runs fast.
  • No need to purchase domain name and web hosting
  • Test out plugins, themes, and other tweaks faster, as now there is no need for uploading each file and folder and waiting for the task to finish. Locally, you have to just download any plugin or theme, and move/copy it to wp-content, and that’s all.
  • No fear to screw up anything. Experiment the way you want.
  • Also, it’s a best practice to never do on the fly updates on a production website without first testing it on some offline or local server.

All instructions in this post are suited to Windows users and we use a program called WAMP, but Windows users can also use XAMPP.

Mac users can use MAMP.


  1. Download and installing WampServer
  2. Download WordPress
  3. Unzip the contents of WordPress at this path: c:/wamp/www/wordpress (where wordpress is just a folder name, you can give any name to this folder)
  4. Enter this in browser and hit enter – http://localhost
  5. Click on phpmyadmin
  6. Create a new MySQL database
  7. Run this path in browser: http://localhost/wordpress
  8. Follow the WordPress installation process
  9. Enter your desired username, password, and email
  10. Login and begine using WordPress


Download WampServer from this link. WampServer is an open source project and free to use. Once downloaded, run the installer. The installation process is very simple and you can just follow the on screen instructions.

On the first screen, press “Next” and then click on “I accept the agreement”.

This is the option to select “installation directory”. By default, its path would be c:/wamp – you can change this location if you wish to:


Select if you want to create shortcuts on Desktop or Quick Launch bar:

Now that all settings are done, the installation process is ready to install WampServer. Click on “Install” button.

It may prompt you to choose your default browser. Select your preferred browser and click on open.

In this step, specify the SMTP mail server and address. If you are not sure, then just leave this as blank. Click on Next:


The installation process is completed. Check mark that “Launch WampServer 2 now” and click Finish:


Download WordPress from its official location and unzip it at this path – c:/wamp/www/wordpress (wordpress is just a folder name, you can give any name to this folder and unzip the files of WordPress in this folder). This is the path where you have installed WampServer.


Now let’s check if WampServer is installed properly or not. Just type this in your browser address: http://localhost. If WampServer is working properly then you will be able to see below page:


This is the Server Configuration page. From here you can see which extensions are installed, your existing projects, and PHPMyAdmin link. Click on this PHPMyAdmin link.


Now we will need to create a new database. If you already have a WordPress database on live server, then you can use the same database name here also. Enter the database name in “create new database” field and click on “Create”. Basically, we are just creating a new database for our WordPress installation. E.g. in below screenshot, a new database is created which is named as “wordpress”. We are not creating any new user or using a password for this task.


A message will be displayed – “Database WordPress has been created”. That’s it, your database is created!


And here comes the final step. Enter this path on your browser and hit enter –
http://localhost/wordpress (Note that “wordpress” here is a folder’s name which we used in first step, therefore your folder name might be different)

If WordPress can’t find the wp-config.php file, it will tell you and offer to try to create and edit the file itself. (You can also do this directly by loading wp-admin/setup-config.php in your web browser.) WordPress will ask you the database details and write them to a new wp-config.php file. If this works, you can go ahead with the installation; otherwise, go back and create, edit, and upload the wp-config.php file yourself.


Now we need to enter database name, username and password (of database and not of WordPress), database host and table prefix:



  • Database name: The database name which we just created in step 4. In the example above, the name of database is “wordpress”
  • user name: Enter “root” here.
  • password: Just leave this field as blank
  • Database host: Enter “localhost” here
  • Table prefix: Enter WordPress table prefix here. Or you can just leave the default wp_ table prefix as it is.

WordPress will try to connect the database and if all settings are correct, then you will see below screen:

Click on “Run the install” to run WordPress installation on your localhost web server.

Fill out site title, username, password and email address and click on “Install WordPress button“.

Finally, the success screen. Click on “Login” to login to your WordPress installation. Go ahead enter your username and password and click on “Login”.

So now let’s recap all the steps that we have performed:

  • Downloading and installing WampServer
  • Downloading WordPress
  • Unzip the contents of WordPress at this path: c:/wamp/www/wordpress (where wordpress is just a folder name, you can give any name to this folder)
  • Enter this in browser and hit enter – http://localhost
  • Click on phpmyadmin
  • Create a new MySQL database
  • Run this path in browser: http://localhost/wordpress
  • Follow the installation process
  • Enter your desired username, password, and email
  • Login

That’s done. So this is how you can install WordPress on a local environment.

Everything’s done and your WordPress should run perfectly now.

If you want to use Pretty permalinks (e.g., instead of default ugly permalinks ( then you will need to enable “mod_rewrite” setting in Wamp server. This can be done by clicking on WampServer icon in the taskbar, hover mouse over Apache > Apache modules, and then find and click on rewrite_module.


Setting up a localhost web server can really come in handy when you want to test out or experiment with something without needing to think twice about how it will affect site visitors. Many professionals and web developers use this method to install WordPress – after all, this is a smart way to work.

Now go ahead and test out how that plugin functions or how that theme looks like before deploying it directly on the live server!

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in coding

About Me:

Szabi Kisded

Hey there, I'm Szabi. At 30 years old, I quit my IT job and started my own business and became a full time WordPress plugin developer, blogger and stay-at-home dad. Here I'm documenting my journey earning an online (semi)passive income. Read more

Sign up for my newsletter and get the YouTube Caption Scraper WordPress plugin for free
(worth 29$)!

All My Plugins In A Bundle:

My AutoBlogging Plugins:

My Online Courses:

A Theme I Recommend:

Featured Posts:

To Top