How to Install WordPress on Your PC (Windows or Mac)

WordPress is the most popular content management system (CMS) based on PHP and MySQL. The friendly user interface and the powerful customization ability of WordPress makes it super easy to set up your own website in just a few minutes.

Install WordPress on your Windows or Mac PC


WordPress is just a software which works on web servers. You will be interested to know that it is possible to install WordPress on your computer locally. There are basically 2 things which WordPress needs to operate. It includes a web server and MySQL database.

If you can set up these things, you will be able to install WordPress easily. Now you may ask how it is useful if your website will only work locally on your system. Well, if you are a beginner, you can use it to learn WordPress. You can customize it as you want without worrying about anything.

In this tutorial, we have shared a complete guide to install WordPress website locally on your Windows, Linux, and Mac OS based PC/Laptop. Here are the steps you need to follow –

Step 1: Setup server and MySQL database using XAMPP

XAMPP is a free and open-source application which allows you to use web services on your computer. It consists of Apache, PHP, MySQL, and Perl. By using XAMPP on your computer, you can setup a server and database for your WordPress website.

XAMPP is available for all operating systems including Windows, Mac, and Linux in both 32-bit and 64-bit variants. You can download XAMPP from its official website. After downloading it, open the exe file. You will be asked by your operating system to start the installer. Just click the Yes button to continue.

In the installer screen, tap the Next button. After that, you will be asked to choose which components in the XAMPP you want to install. As for WordPress, you only need Apache server, MySQL and phpMyAdmin. Make sure to select these components and unselect others that you don’t need.

Select XAMPP components

Click the Next button to continue. Then you will be asked to choose the folder where you want to install XAMPP. There is no need to change the folder location. Simply, click Next until it starts the installation process. Once it’s finished, tap the Finish button to close the installer.

Now start the XAMPP program that you have just installed on your computer. To set up the Apache server and MySQL database, click the START button next to the Apache and MySQL module. Once it turns into a green color, it means that the module is started.

Enable Apache and MySQL in XAMPP

Now if you will open Google Chrome or any other web browser on your computer and visit http://localhost/ address, you will see the web interface of the XAMPP’s Apache server. Congratulations, you have successfully set up your own local server.

Step2: Create a database using phpMyAdmin

The next step is to create a database for the WordPress website. We will use phpMyAdmin for this. Simply, press the Admin button next to the MySQL module on the XAMPP Control Panel. Once you are in phpMyAdmin, click the Databases option.

Create database for WordPress website in phpMyAdmin

In the Create database section, enter the name of the database and then click the Create button. You can give it any name you want but for this guide, we have named it ‘wordpress‘.

Step 3: Download and add WordPress files

Next, you have to download the latest version of WordPress on your computer. You can download it from its official website. After that, extract the ZIP file. You will see a folder named wordpress in it.

Now go to the folder where you have installed XAMPP. It is located at C://xampp address. There is a sub-folder in it named htdocs. Simply, open that folder. Here you have to create a new folder for your website. You can name it anything you want but don’t add space or special characters in it.

It is just like creating a domain for your website. Let’s name it ‘mywebsite‘ as an example for this guide. After this, just copy and paste all data from the wordpress folder that you have extracted earlier into this folder.

Add WordPress files in htdocs folder

Step 4: Setup your WordPress website

Now you are all set to install WordPress on your computer. Open any web browser (for example, Google Chrome) and visit http://localhost/mywebsite address. Make sure to change ‘mywebsite’ if you have used different folder name in the previous step.

This will open up the WordPress installer page. Choose your language and continue to the next page. Like in the normal WordPress installation, you will be asked to enter your database connection details.

Enter database details to install WordPress
  • Database name – Enter the name of the database you have created in phpMyAdmin. We have named it ‘wordpress‘.
  • Username – enter ‘root‘ here.
  • Password – keep the password field blank

After filling these details, you can complete the rest of the steps to set up your WordPress website like normal. That’s it.

We hope you find this guide helpful to install WordPress on your Windows or Mac OS computer/laptop. If you are stuck anywhere, let us know in the comments below so we can help you to fix your problem. At last, we will recommend you to read another useful tutorial on how to install WordPress on your Android phone.

About the author

Verified Author
This author is verified as a trusted expert and senior writer. A formal process has been completed to confirm their identity and qualifications.

Vivek Chaudhary Author
Tech Writer & Founder
Vivek Chaudhary is an experienced tech blogger who has been writing about technology for more than ten years. He's written over 1500 articles covering various tech topics. Vivek is passionate about sharing his expertise to help others. Beyond the digital realm, he enjoys traveling and creating videos on YouTube. Feel free to contact here: vivek@geekinstructor.com

Leave a Comment

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