How to install WordPress on Xampp (Ubuntu)?

How to install WordPress on Xampp (Ubuntu)?


If you are running XAMPP on Ubuntu Linux and want to install WordPress on it, then here are the steps to follow, given in this guide. 

XAMPP is not a new software that needs a detailed introduction. It has been around for quite some time, now. The main purpose of XAMPP is to provide a single package that offers an AMPP stack (Apache, MySQL, PHP, and Perl).  In the XAMPP, ‘X’ stands for Cross-Platform (X).

This free software is available for Windows, macOS as well as Linux. Here in this tutorial, we learn the steps for installing WordPress on Xampp which is already running on Ubuntu.

Ubuntu is a popular Linux distro widely used on Desktop and server hardware and known for its huge community. Let’s start with the article:

Note: XAMPP is meant to use for development and testing only hence one must not use it as a production environment.

WordPress installation on XAMPP in Ubuntu

It doesn’t matter if you are using Ubuntu 20.04, 22.04, or any other latest version, this step-by-step guide to install WordPress on XAMPP for Linux will be the same.

1. Install XAMPP on Ubuntu

The first thing we need to ensure is that our Ubuntu system already has XAMPP installed. Well, if you don’t have it then check out this tutorial: Install XAMPP on Ubuntu and follow the instructions given there. By following the link, you will learn how to download the latest version of XAMPP for Linux from the Apache Friends website.

2. Start Apache and MySQL servers

Once the installation of XAMPP is completed, open it and go to Manager Servers Tab, and click on the Start ALL button given at bottom of the XAMPP control panel. After that, we can use PHP and Perl to develop web applications on our local machine.

Start XAMPP Apache and MySQL server

3. Download WordPress on Ubuntu

To install and set up WordPress on XAMPP we first need its latest version archive file. For that, visit and download it.

Alternatively, the best way is to use the command terminal using the wget tool, here is the way to use it.


After that extract the file in the /opt/lampp/htdocs directory created by the XAMPP:

sudo unzip -d /opt/lampp/htdocs/

Also, change the permission and make the WordPress files writable:

cd /opt/lampp/htdocs/wordpress
sudo find . -type d -exec chmod -R 775 {} \;
sudo find . -type f -exec chmod -R 664 {} \;

4. Create MySQL Database

The WordPress files are in their place, the next thing we need is a MySQL database for storing the website data. For that open Mozilla or any other browser, you are using on your Ubuntu. And point it to – 


Step 1: The main page of phpMyAdmin will open.

Step 2: There click on New and then under the ‘Create Database‘ option add a name for your new database. After that hit the Create button. A new Database will be added to the MySQL server.

We don’t need to create a user because we are going to use the existing root one.

Create MySQL Database on XAMPP

5. Start WordPress XAMPP installation

We have the WordPress Archive on our Ubuntu inside the htdocs folder and also a database. Now, in your browser URL type –


Step 1: Click on the Let’s go button to start Ubuntu’s XAMPP WordPress setup.

start with WordPress XAMPP installation

Step 2: In the Database name- Enter the name of the Database, you created earlier in this tutorial using phpMyAdmin.

In the username type- root and in the password column use the password you have for the root user on your Ubuntu system where you are using the XAMPP.

Leave the rest of things as they are and click on the Submit button.

Enter Database Details

Step 3: Click on the “Run the Installation” button.

Run the installation

Step 4: Create a WordPress Admin user and password. Finally, once you are ready, click on the Install Worpdress button.

Create WordPress User and password

Step 5: Log in with the details you have created in the previous step.

Login to WordPress in XAMPP

Step 6: WordPress Dashboard

install XAMPP WordPress Ubuntu Dashboard


How to open my WordPress dashboard in localhost XAMPP?

After setting up WordPress on XAMPP, open your browser and type – http://localhost/wordpress/wp-admin This will open the Login Interface where enter the username and password. Soon you will have the WordPress Dashboard. However, localhost/wordpress/wp-admin – in this URL, replace WordPress with your folder name in htdocs where the core files of this CMS are placed by you.

Which localhost is best for WordPress?

Here are some popular software tools to install and run WordPress locally on Windows, Linux, or macOS.

  1. Local – WordPress development Tool
  2. Free Ampps from Softaculous
  3. Windows 10 or 11 WordPress by Bitnami
  4. InstantWP- For WordPress on Windows locally
  5. XAMPP

Can I use XAMPP to host a website?

No, XAMPP is an application that creates to test websites locally for development purposes. If you want to host a website for production then it is better to go for hosting or cloud services.

What are the disadvantages of XAMPP?

Here are a few disadvantages that make XAMPP not suitable for production use.

  1. XAMPP is not scalable and can be crashed on heavy loads.
  2. Not meant to serve as a web server for public use.
  3. Difficult to use with certain web applications or programming languages
  4. Not secure as a full-fledges configured LAMP or LEMP server.
  5. It can be resource-intensive.
  6. May not include all the components or features, we have in the LAMP stack.
  7. By default, Database Administrator is not secure including phpMyAdmin


Source link