How To Install WordPress on XAMPP on Your Mac
Hey, Once again I’m back with another amazing article. Today I’m going to talk about how to install WordPress on XAMPP on your Mac. So, without further due, let’s dive into it.
Why do you need to install WordPress on XAMPP?
1st of all, you need to understand why you need to install WordPress local server or localhost or your system (PC/Mac). XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends. It allows you to locally host your website on your system.
There are many reasons for locally host a website on your system but the main reason is developing and testing websites. When you are developing a website then you have to update or change the code many times. And if you get an error then you can simply solve it if your website is hosted on your system. So, people using this for developing or testing a website.
If you are making any major changing on the live server then if it works fine without any error then it’s good otherwise you may lose your server. So, it’s always better to get on a safer side.
You should know before hosting a website on your device;
If you want to create a website for your own then you should locally host it on your system. In this case, your system is work as a server and your website will host on it. All the data on your website will save on it. So, If you shut down the server then you cannot access your website. You don’t even access it on other devices.
So, once your website is ready, you can transfer database and files to the live server. So, if you are creating your website or want to create your own website then you should install XAMPP on your Mac and then you can develop it.
How To Install WordPress on XAMPP on Your Mac
To host your website on your system you should have 4 important things;
- Suitable System [PC/Mac]
- Xampp [Open Source Web Server]
- Latest version of WordPress
- Text Editor
Xampp is available for different platforms like Windows, MacOS & Linux. You can select a proper system, which you can play with it like if you are comfortable with PC [I mean Windows!] then choose it but in this tutorial, I’m using Mac.
Xampp is the open source cross-platform web server solution stack developed by Apache Friends. We will host a website using Xampp.
The latest version of WordPress:
WordPress is the best CMS to create responsive websites and we will use WordPress to create our website. It’s open-source software.
We will use a text editor to change the coding of PHP files. You can use whatever you like but I’m using Sublime Text or you can use default text editor. It’s open source software. Here is the list of 10 best text editing software for Mac.
1st of all you have to download Xampp for the respective operating system. I’m using Mac. Click on download other versions & select latest PHP version. It takes time.
Now, it’s time to download the latest version of WordPress.
Open Xampp. It will ask your permission.
Now, go to Manage Servers. 3 servers are available there & all are stopped.
Now, click on MySQL Database & Apache Web Server make it start. No need to start ProFTPD server.
It takes the time to start both servers. Now, minimize this window and open a web browser.
Now, enter localhost and hit enter. It will redirect you to localhost/dashboard.
Once you get this page it means Xampp is properly installed on your system.
Now, it’s time to setup database. For that, you have to click on phpMyAdmin.
Click on the database. Enter the name of the database and create. Your database is created & now you are ready to install WordPress.
Extract WordPress.zip file which you download from WordPress website. Open the extracted folder.
Search for wp-config-sample.php and now we edit this file in text editor.
Once you open it, you will see coding there and now search for
define (‘DB_NAME’ , ‘database_name_here’);
define (‘DB_USER’ , ‘username_here’);
define (‘DB_PASSWORD’ , ‘password_here’);
And change it with;
define (‘DB_NAME’ , ‘wordpress’); [in my case, wordpress is the databsse]
define (‘DB_USER’ , ‘root’);
define (‘DB_PASSWORD’ , ‘’); [leave it blank]
Once you were done, save as this file & rename it with wp-config.php Please do not save it, save as it.
It means there are 2 files;
Now, close this window and move this wordpress folder to
To check, go to your web browser and enter
localhost/wordpress [instead of wordpress use your database name]
Read More: FTP Connection Error on localhost [Fixed]
If you get WordPress installation window it means you have successfully installed WordPress on Xampp.
Now, enter site title, username, and password, email id and Install WordPress.
Login to your WordPress dashboard to get access to the backend of your website. Click on Visit Site to open your website.
I hope you like this tutorial. Thumbs if you like and share if you love. Leave your comments below and tell me you liked it or not and if you have any questions regarding this tutorial you can ask me via tweet and comments. I love to hear from you!
Subscribe newsletter/RSS for latest updates.
See you in the next one.
Originally published at Lokesh Aryan.