How to Install WordPress on Localhost
In this tutorial you will learn how to install WordPress on a localhost. This guide will explain the differences between WordPress.com and WordPress.org and walk you through the process of setting up WordPress on your computer.
WordPress.com vs. WordPress.org
WordPress.com
- Offers a free platform for creating blogs.
- Provides a subdomain, allowing you to create free blogs (e.g: yourname.wordpress.com).
- Limited in customization and features unless you upgrade to paid plans.
WordPress.org
- Provides a free script to download, enabling you to create a fully customizable website.
- Requires hosting to upload and run the script giving you complete control over your website.
Requirements for Installing WordPress Locally
To install WordPress on your PC your computer needs to function as a server. This is achieved by installing server software like XAMPP.
You can download XAMPP from the official website:
👉 www.apachefriends.org
Steps to Install XAMPP
- Download XAMPP
- Go to www.apachefriends.org.
- Choose the version of XAMPP suitable for your operating system (Windows macOS or Linux).
- Install XAMPP
- Run the downloaded installer file.
- Follow the onscreen instructions to complete the installation.
- During the setup, ensure that the following components are selected:
- Apache
- MySQL
- PHP
- Start the Local Server
- Open the XAMPP control panel.
- Start the Apache and MySQL services.
- Verify that the services are running by visiting
http://localhost
in your browser.
Steps to Install WordPress
- Download WordPress Script
- Visit wordpress.org and download the latest version of WordPress.
- Extract WordPress Files
- Extract the downloaded ZIP file.
- Copy the extracted folder and paste it into the
htdocs
directory in the XAMPP installation folder (e.g.,C:\xampp\htdocs
).
- Create a Database
- Open your browser and go to
http://localhost/phpmyadmin
. - Click on the Databases tab.
- Enter a name for your database (e.g
wordpress
) and click Create.
- Open your browser and go to
- Configure WordPress
- Visit
http://localhost/wordpress
in your browser. - Follow the setup wizard:
- Enter the database name you created.
- Use root as the username and leave the password field blank.
- Complete the setup by entering your site details (site title, admin username, password, and email).
- Visit
- Access Your Local WordPress Site
- Once the installation is complete, you can log in to your WordPress dashboard at
http://localhost/wordpress/wp-admin
.
- Once the installation is complete, you can log in to your WordPress dashboard at