Select Page

WordPress is used by 27% of all websites, however, it is largely unknown that you can install it locally on you computer (PC or Mac), allowing you to work or test offline.

Why install WordPress on your computer?

Sometimes, plugin conflicts or coding mistakes can cause your entire server can crash or cause your site to become completely inaccessible to yourself and your visitors. To eliminate the possibility of causing such errors, your should never take the chance with experimenting on your live server.

Luckily, there is a simple solution that will take you a couple of minutes to setup; install WordPress on your computer.

The best thing is that you don’t need to purchase anything and you don’t need to be a coding ninja – a beginner can easily follow this guide to get WordPress up and running on their laptop in no time.

More reasons you might consider installing WordPress on a local environment:

  • 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.
  • It’s free: No need to purchase domain name and web hosting
  • Quicker testing of plugins, themes, and other tweaks: On a local environment, 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 it.
  • No fear of breaking anything: Experiment and test as much as you like without having to worry about the consequences.
  • Best practice: 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. Get into the habit of testing before making changes to your live site

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

Here’s the complete process to install WordPress locally (all steps are covered in detail in this post):

  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

Step 1. Download WampServer

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:

install wamp

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

wamp shortcut

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

complete wamp install

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:

smtp email setup

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

finish and launch wamp

Step 2. Download WordPress

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.

Step 3. Test 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:

test and configure wamp server

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.

Step 4. Create a new database

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.

create new database in phpmyadmin

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

database created in phpmyadmin

Step 5. Configure WordPress in your browser

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)

As we have not configured wordpress, and its database and other settings, you will get this screen. Click on “Create a configuration file“:

create wp config file

Click on “Let’s Go“:

start wordpress installation

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

connect wordpress to your database

Here is a detailed explanation of each of these fields:

  • 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.

run wordpress install

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

enter wordpress login details

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 what that theme looks like before deploying it directly on your live server!

Pin It on Pinterest