[GUIDE] Setup WordPress on Localhost using XAMPP on Any Linux Distro
If you’re a blogger using wordpress. But you’re afraid of doing any experiment on your wordpress blog. Now, you can use your localhost to setup another wordpress where you can do all your experiments without harming your actual wordpress website. Setting up wordpress on localhost is very easy. Here we’ll be discuss how to install linux application XAMPP on Kali Linux, How to download wordpress for XAMPP on linux, How to setup WordPress on localhost, and how to create PHPmyadmin database and database user account on localhost wordpress. Let’s discuss if you want to know.
Prerequisites to setup WordPress on Linux Localhost server
- Download XAMPP for Linux
- and, WordPress latest zip (you need this ahead, Follow the guide)
What is XAMPP?
XAMPP is an easy to install Apache distribution containing MariaDB, PHP, and Perl. Just download and start the installer. It’s that easy. It help you to install site softwares like wordpress, joomla, etc.
How to install XAMPP on Linux
You have to install XAMPP after download from above link given. To install XAMPP on Linux follow the below steps discussed.
#step 1. Open folder where you have downloaded XAMPP on Linux.
#step 2. Right click and open terminal. And get root access inside the terminal using su command and then follow the given command below.
daud@ibrahim:~$ su Password: root@ibrahim:/home/daud# cd Downloads root@ibrahim:/home/daud/Downloads# ls xampp-linux-x64-7.4.4-0-installer.run root@ibrahim:/home/daud/Downloads# chmod 755 xampp-linux-x64-7.4.4-0-installer.run root@ibrahim:/home/daud/Downloads# ./ xampp-linux-x64-7.4.4-0-installer.run
#step 3. Click next and next to install XAMPP on Linux. Untill you don’t see finsined button.
#step 4. After successful installation of XAMPP on Linux, It’s time to start XAMPP for localhost server. And ready to install and setup WordPress.
#step 5. To start XAMPP for Localhost server on Linux, try the below command.
daud@ibrahim:~$ su Password: root@ibrahim:/home/daud# cd root@ibrahim:~# /opt/lampp/lampp start Starting XAMPP for Linux 7.4.4-0... XAMPP: Starting Apache...ok. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok. root@ibrahim:~#
Now, when you get ok, ok like output data on your terminal after running the above command. It means your XAMPP for Linux has started running. You can check it your own browser by just type localhost and hit enter.
Then, Let’s start setting up WordPress Installation. Follow the Below steps.
Steps to Download WordPress on Localhost using XAMPP on Linux
#step 6. Now it’s time to download WordPress latest zip file for wordpress installation. Follow the below command for download and install.
root@ibrahim:/opt/lampp/htdocs# wget https://wordpress.org/latest.zip --2020-04-09 23:40:00-- https://wordpress.org/latest.zip Resolving wordpress.org (wordpress.org)... 18.104.22.168 Connecting to wordpress.org (wordpress.org)|22.214.171.124|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 13211108 (13M) [application/zip] Saving to: ‘latest.zip’ latest.zip 100%[===============>] 12.60M 126KB/s in 60s 2020-04-09 23:41:03 (217 KB/s) - ‘latest.zip’ saved [13211108/13211108] root@ibrahim:/opt/lampp/htdocs#
Make sure your installing wordpress on /opt/lampp/htdocs folder on Linux file system.
#step 7. Let’s unzip wordpress zip file, Follow the below command to uzip it.
root@ibrahim:/opt/lampp/htdocs# unzip latest.zip
Steps to create Database and Database user on Localhost/phpmyadmin using XAMPP on Linux
#step 8. Now, let’s create a database and database user. Just enter the following address localhost/phpmyadmin on your browser to go to phpmyadmin.
#step 9. Just click over New, in the top right corner where the database name are listed.
#step 10. Enter the database name as you want. And Click on create.
#step 11. Now, you need to create a user account. Just click over privilaged on the top menu list. And then Click on Add User Account from the bottom.
#step 12. Fill you database user account informations like username, password, must click on check all and then click on GO.
Congrats you have successfully created your Database user account. Let’s setup WordPress.
Steps to setup WordPress on Localhost/wordpress using XAMPP on Linux
#step 13. After unzipping it. You can check on your browser. at address – localhost/wordpress
#step 14. Click on Let’s go.
#step 15. Fill the database details correctly As shown above.
#step 16. click on run the installation.
#step 17. Fill the site title. and wordpress login dashboard username and password. Then click on install wordpress.
#step 18. after the successful installation you will get login button like the above picture is showing you.
#step 19. Click on login. And enter the username and password.
Congrats, You can see your dashboard like the above picture is showing.