install wordpress on localhost

WordPress is the most popular and free website builder based on PHP and MySQL. WordPress was initially created for blogs, but now it’s suitable for all kinds of websites. In fact, now it powers over 33% of all websites on the internet.

It is an open-source platform so anyone is free to download the software and build the website easily. We can install WordPress for both local environment and online. To install WordPress on cpanel you may find article here: How To Install WordPress On Cpanel

To install WordPress locally all you need is:

  1. XAMMP/WAMP
  2. WordPress

What is XAMMP?

Technically XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P).

According to Wikipedia, “XAMPP is free, open-source software and cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages.”

XAMPP is cross-platform, which means it works equally well on Linux, Mac, and Windows.

Why XAMPP is used?

Xampp is a localhost or a local server. It was designed for development tool use only, to allow website designers and programmers to test their work on their computers without any access to the Internet.

So this local server works on your desktop or laptop computer where we can test the clients or your website before uploading it to the remote web server. Hence, this software gives you the suitable environment for testing MYSQL, PHP, Apache and Perl projects on the local computer.

How To Install WordPress Locally?

You need to follow the following steps to install WordPress on LocalHost.

If you don’t want to watch the video tutorial, then you can continue reading the guide below:

Step 1. Download and Install XAMPP

The first initial step to install WordPress locally is to download and install the XAMPP software. You may also use WAMP software. The choice is all yours.

To download XAMMP you may visit this site: https://www.apachefriends.org/download.html

Step 2: Start The Modules and Test Your Server

After successful installation of xampp server, now you need to start xampp. (I assume you have installed it correctly :P)

You can start and stop each module by using the XAMPP Control Panel.

Start modules

To install XAMPP and WordPress properly, you’ll need to run two modules:

  1. Apache
  2. MySQL

You can start both modules from the XAMPP control panel:

Just click on Start. Once you launch them, you should see their status turn to green:

Start modules

Note: If you see any error after starting module then there must be some mistakes while installing xampp or may have occurred due to some other reason. You need to fix this issue first to move on next step.

Now you should be able to test that your local server is working by going to http://localhost/ in your web browser of choice:

Welcome to XAMPPCheck if you can see the “Welcome to XAMPP” screen. If yes, XAMPP runs properly on your machine and you can start creating your local WordPress environment.

Step 3. Download Latest WordPress

You need to download the latest version of WordPress from their official site: wordpress.orgInstall wordpress

Step 4. Add The WordPress files.

Next step is to add downloaded WordPress file to the XAMPP folder.  So, navigate to the folder where you installed XAMPP. For me, that’s C://xampp. It should be something similar for you.

Then, in that folder, find the htdocs subfolder:

Add The WordPress files

Under htdocs subfolder paste the WordPress file. Then, extract the WordPress .zip file you downloaded from wordpress.org into it:

extract wordpress file

After extracting the file, you may change the name of file something like testwebsite or may leave as it is.

extract file

Step 5. Create a Database In PHPMYADMIN.

Now you will need to create a new database and database user using the phpMyAdmin database management software.

First, let’s create a new database. Go to phpMyAdmin, you can find it by typing localhost/phpMyAdmin into the address bar of your browser.

Inside phpMyAdmin, click on “New” in the top menu bar to create a new database

Give a new name to the database and you also need to choose the character encoding from a dropdown list. Choose utf8_general_ci and click on Create.

Create a Database

Create a Database

Now you have to create new user. On the same window find Privileges on top-right corner.

Then click on Add User Account to create a new user for the database.

Add User Account

Give a new name to the username and password. Choose Local as Host Name from the drop-down list.

Add User Account

 Scroll down and find GO and click on it.

Add User Account

Note: Always use a strong password for all the account whether its database or other. You can also click on the Password Generator. It will automatically generate a unique and strong password for you.

Also, save the database name, username, and database user password. You will need this in the later step. Make a copy of all of it paste it somewhere else like Notepad or sticky note.

Step 6. Install WordPress locally via The On-Screen Installer

After successful creation of the database now, it’s time connect WordPress and database. Start the WordPress installer at localhost/wordpress or the name that you have given. In my case its localhost/testwebsite.

Now, when you navigate to the localhost/ testwebsite page in your browser, you should see the following WordPress installation screen:

how to manaully install wordpress

Select the language you preferred then click on Continue to proceed.

Step 7. Fill In Each Field With Your Database Information.

Now you need to fill the fields with correct username and password. This information is necessary for WordPress to connect to the database that you have created.

Click on Submit when you have finished entering the information.

install wordpress

Step 8. Final Stage

You’ll see a page saying, “All right, sparky!” This is a page to confirm that you’re ready to begin the installation process to the server. Click on Run the installation.

install wordpress

Next, you need to fill in the fields for the Site Title, Username for the administrator, password for the administrator, and the email for the administrator.

You also have a checkbox for Search Engine visibility that you can use to discourage search engines from indexing the site if you are still in the middle of developing the site.

Click on Install WordPress when you finished filling in the fields.Install WordPress On LocalHost
After this, you will be redirected to the login page. Fill the fields with correct Username and Password to enter the dashboard.
Install WordPress On LocalHost
That’s all folks.

I hope this tutorial might have helped you learn about How To Install WordPress on LocalHost.

Having a local WordPress environment can be quite helpful, as you can test different themes and plugins before using them on your production site. It can also come in handy if you want to get started with WordPress development, even if you just want to add a couple of lines of code to your theme’s functions.php file.

How To Install WordPress On LocalHost Using Xampp

You May Also Like

Leave a Reply

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