How to Install WordPress Locally (Local Host)

WordPress is a free and open-source software to design Websites, blogs, etc. You need hosting and domain to install it and publish your site.

But, do you know you can install WordPress on localhost?

Localhost means your own computer. The operating system doesn’t matter as you can easily install WordPress on Windows 10, Windows 8, Linux Distros like – Ubuntu, CentOS or any flavor, and Apple OS X (Mac), even host multiple websites on your local desktop without incurring any cost using this method using  Software like XAMPP, WAMP, MAMP.

Install WordPress Locally

We will divide this article into two parts. First, we are going to install XAMPP and then WordPress. Before going further, let me tell you Locally installing WordPress helps you to,

  • Learn WordPress at no cost
  • Test the blog before making live to the world.
  • Review Plugins, Themes

Install XAMPP

XAMPP is a completely free, open-source, and easy to install Apache distribution containing Apache HTTP Server. It is cross-platform that means it is available for Windows, Linux, and Mac OS x for 32 bit or 64-bit versions. It supports Windows 10, Windows 8, 7, and Vista.

This is the way you can install XAMPP on Windows,

Download XAMP from here. Double-Click the XAMPP installer. This is a wizard-driven installation where the installer asks for the setup option like components, folder, etc.

xampp-setup-welcome

Next, Choose components like Apache, MySQL, FileZilla FTP Server, etc. You need only Apache, PHP, and phpMyAdmin for WordPress.

XAMPP select components

Select the Installation folder. Do not install XAMPP under program files if you are not the Admin of desktop, as it will prohibit you to copy any files in that folder. Choose either the C or D drive.

choose installation folder

Just uncheck the box and click the Next button.

Bitnami for XAMPP

That’s it and installations starts.

xampp-install-begin

Installation is complete and you are ready to use the XAMPP server. Select the checkbox if you want to open the control panel. Click on the finish button.

xampp-complete-setup

Start XAMPP

No, go to Windows -> Start -> XAMPP Control Panel to launch it. You need to start Apache and MySQL service before installing WordPress. Click on the Start button for each service. The module name turns green and ports get populated, that means you are good. Both services started successfully.

xampp-control-panel

Install WordPress

Now, we will install WordPress as the necessary infrastructure is ready.

Download WordPress from the Download Page. Extract the .zip file to your local machine.

WordPress stores post and all other information in Database tables. So you need to create a MySQL Database and user.

Create User and Database

Open a web browser and type http://localhost in URL. Click on phpMyAdmin. On phpMyAdmin click on New to create a new database.

phpmyadmin-create-mysql-database

The next step is to create a username for the database. You can see (+)MySQL tree on the left-hand side menu. Expand it and locate the user table.

phpmyadmin-create-user

Enter Host, User, and Password. Attache the password function to the password field as shown below. This encrypts it after saving. Select all required privileges except Shutdown.

Scroll the page and click on Go at the end of the page to insert records.

phpmyadmin-create-user-information

Ignore the below warning.

1 row inserted.
Warning: #1364 Field 'ssl_cipher' doesn't have a default value
Warning: #1364 Field 'x509_issuer' doesn't have a default value
Warning: #1364 Field 'x509_subject' doesn't have a default value

Let’s Install WordPress Now

Create a folder ATT under C:\xampp\htdocs. Please note XAMPP is installed at c:\xampp location on my system. Extract the content of all downloaded WordPress files under C:\xampp\htdocs\att folder as shown below.

wordpress-files-listing

 

Now, open Google Chrome or any browser and type URL http://localhost/att/.  This starts the installation of WordPress on your system.

Select the language of your preference and click on continue.

wordpress-install-select-language

Installation welcomes you and informs you to have information ready before starting. We have already created a user, database.

Click on Let’s go!.

wordpress-install-welcome

Enter Database Name, Username, Password, Database Host, and Table Prefix as shown below. In the same database, you can install multiple WordPress, so you need to specify unique Table Prefix for each installation.

wordpress-install-enter-necessary-information

You get the below information if the entered information is correct. Click Run the install button.

wordpress-run-install

Next enter Site Title, Username, Password, and Your Email. Please note that the username and password here are not database username and password. This you will use to log in on the WordPress Dashboard. Verify all entered information is correct and click Install WordPress Button.

wordpress-install-blog-information

That’s it and you did it…!!!.  WordPress site is live on the local desktop and ready to use.

Login to WordPress Dashboard

Open any browser like Google Chrome, Mozilla Firefox or Windows Explorer and type localhost/att as URL to open Blog as shown below.

Below is the default look and feel, you can use themes to change it.

wordpress-welcome-page

You can access the admin console using URL localhost/att/wp-admin.

Enter it in the browser and WordPress will ask you to enter username and password (not database) set during installation.

wordpres-admin-panel

You can see Blog is installed using the default theme.

Summary

XAMPP offers great flexibility which allows you to install WordPress on the localhost without any additional cost. Both the methods shown above are easy.

Go ahead and install WordPress and become a pro-blogger. Please let me know if you found this article helpful.

Share This:

4 thoughts on “How to Install WordPress Locally (Local Host)”

    1. This is only for local development and not for the live site. XAMPP is not used for the Live site. Your hosting provider should have APACHE/MYSQL support.

Comments are closed.