How to Install WordPress on LocalHost on Windows 11

Install WordPress on LocalHost on Windows 11

Undoubtedly, WordPress is one of the best web CMS. It allows to create all kinds of sites, blogs and forum. To make your WordPress site on live on Internet you need a domain and hosting. However, if you were using other CMS before like Ghost, Joomla, Drupal or Blogger. And, now want to try WordPress, then i would suggest to install WordPress on LocalHost.

What is LocalHost?.

If you’re beginner and learning web development then you might heard this term before. In computer networking, usually host term is used for server. By purchasing a hosting plan, we host our website on a server. Here, in localhost, we do turn our computer into a local server. And, local term is here used since the website will establishes a connection with the local machine (your computer) using the loopback address network.

Localhost (127.0.0.1) is usually used by developer to test their website, like for Django project we do create and run local server. Similarly, by using localhost you can test WordPress on your computer. With Localhost, you can test new plugins and themes on your website, without deteriorating user experience. To create and manage a local server we will use XAMPP.

What is XAMPP?.

XAMPP is a free and open-source cross-platform web server solution. It allows to install Apache distribution containing MariaDB, PHP and Perl. XAMPP will allow you to transform your computer into a local web server, enabling you to establish a local database for WordPress. So that, you can test and develop websites before deploying them to a live server.

Install WordPress on LocalHost on Windows 11

Install XAMPP Control Panel on Windows 11.

  1. First, do download latest version of XAMPP. It is available for Windows, OS X and Linux.
  1. Once, the “Xampp Installer.exe” setup gets downloaded, do right-click on it and run as administrator.
  1. XAMPP Setup window will get open. Click on Next.
  1. Setup will ask to select components. However, for WordPress, you only need MySQL and phpMyAdmin. But, surely you can install all additional components and test other features as well.
Select Components XAMPP
  1. Next, Setup will ask you to select installation folder. By default XAMPP will gets installed in C Drive. However, you can change the drive. Before changing drive make sure to create xampp folder in that drive.
Select a installation folder
  1. Select Language, click on next > next.
  1. XAMPP installation will now get started.
  1. During the XAMPP installation, Apache HTTP Server will ask for firewall permission, click on Allow.
Allow Apache HTTP Server
  1. XAMPP will now get installed. Click on Finish.
  1. Now, do search for XAMPP Control Panel, and open App.

Start Apache and MySQL.

  1. XAMPP Control Panel will get open, click on start button next to Apache and MySQL.
XAMPP Control Panel to Install WordPress on LocalHost on Windows
  1. Once, you see both service gets started, you will see green bar. Now, open the following URL in a browser.
http://localhost/dashboard/

XAMPP Welcome screen will appear. You have successfully set up a local server on your computer.

XAMPP LocalHost Local Web Server

Download and Extract WordPress and Move it into XAMPP.

  1. Do visit WordPress Download page and do download latest version of WordPress.
Download WordPress Zip File
  1. Once, zip file gets downloaded, do extract it.
  1. Now, open file explorer and the drive in which you have install XAMPP. Go to XAMPP > htdocs.
  1. Do create a new folder inside htdocs folder and give it a new name. You can enter your website name of which you’re making offline copy.
Create New Folder in htdocs folder
  1. Now, move extracted WordPress folder inside the folder you’ve created.

Create a Local Database for your WordPress Site/Blog.

  1. From XAMPP Control Panel, click on Admin, next to MySQL.
Click on Admin on MySQL
  1. phpMyAdmin page will get open in localhost.
  1. click on database. Now, enter database name and click on create. (You can enter WordPress or anything you like, but just remember it.)
Create Local Database

Configure WordPress.

  1. Now, in your browser do open, the following url. Make sure to replace example with the folder name that you’ve created in XAMPP.
http://localhost/example/
  1. You will now find wordpress folder, click on it to open.
Click on WordPress to Install WordPress on LocalHost on Windows
  1. WordPress setup page will get open, do select the language and click on continue.
  1. WordPress welcome screen will appear and will show you all things that you need during setup, read it and click on Let’s go.
Setup WordPress Let's Go
  1. Now, enter the database name you’ve created, in username type root. And, leave the password field empty, click on submit.
Setup WordPress Database in LocalHost

Complete WordPress Installation.

  1. Next, click on Run the installation.
Run the WordPress Installation on LocalHost on Windows
  1. Once, WordPress gets installed, you will see signup page. Enter site title, username, password and email. All these details you can use later to access WordPress dashboard. Click on install WordPress.
Install WordPress on LocalHost on Windows 11 Computer
  1. Once, WordPress gets installed, login page will get open. Enter the username and password to login.
Log In to WordPress Account
  1. That’s it, now you can import content or test WordPress features that you want. So, that’s how you can Install WordPress on LocalHost on Windows 11.

Export WordPress Content from Live Website/Blog.

Go to Tools > Export, select all content or the content you want to import in localhost. After that, click on “Download Export File”.

Download Export File

Import Content to LocalHost WordPress.

If you have exported content from your live website. Then, follow these steps.

  1. In WordPress, Go to Tools > Import. You will now see WordPress option, click on Install Now.
  1. After that, click on Run Importer.
Run WordPress Importer
  1. Click on Choose File and do select the WordPress Export File. Click on “Upload File and Export”.
Upload file and import in WordPress
  1. Assign Authors screen window will appear, select a user and click on Submit.
Select Author and Submit Export File

If you’ve not selected the “Download and import file attachments” then images will not get downloaded. In that case, you can simply download images zip file using FTP. And, move it to localhost’s wp-content folder. Yes, you have to change URL, do use better search replace plugin. If you face any trouble during Install WordPress on LocalHost on Windows 11 setup, let us know in comment section.