Skip to content

How to install WordPress on XAMPP?

  • by
  • 2 min read

One of the XAMPP stack’s most significant advantages is the outright compatibility with WordPress. WordPress, indeed, has become the most popular Content Management System as well as blog publishing/site creation platform, as the company also claims that 34% of websites on the internet use Wordpress as a CMS — that’s a lot.

In this article, we go over a step by step process of how you can install Wordpress on top of your XAMPP stack.

Also read: XAMPP vs LAMP vs WAMP vs MAMP

Installing Wordpress on XAMPP

Step 1: Download the WordPress installation package from the official website.

Step 2: Extract the downloaded file into a directory of your choice.

Step 3: Move your WordPress directory to the /opt/lampp/htdocs folder. You can do this using the terminal using the following commands:

sudo mv wordpress /opt/lampp/htdocs

Step 4: Change the directory ownership of the whole WordPress directory. Type in the following commands to do so:

groups [username] //this will give you your group name
sudo chown [username]:[groupname] /opt/lampp/htdocs/wordpress

How to install WordPress on XAMPP? 7 easy steps to do so

Step 5: Now start your XAMPP server, goto localhost and fire up phpMyAdmin. Here you’re going to have to create a new database called ‘wordpress’.

Step 6: It’s time to configure your wp-config file now. Head over to /opt/lampp/htdocs/wordpress, and you’ll find a file called wp-config-sample.php. Open the file and edit it to add the database name, username and password that we created in the last step.

How to install WordPress on XAMPP? 7 easy steps to do so

Step 7: It’s time to verify your WordPress installation. Open a browser and head over to https://localhost/wordpress. If the installation were successful, you’d see a page where you can enter your WordPress login credentials and website details.

Now you can go ahead and log in to your WordPress website.

Hoping this tutorial was helpful. Let us know in the comments below if you’d like us to cover anything else about XAMPP or any of the other subject that we cover.

Also read: How to install XAMPP on Ubuntu

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: