Lokesh Aryan Digital
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.
1 st 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.
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]
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.
A WordPress Guide Blog
How to Install WordPress on Your Local Machine Using WAMP or XAMPP?
Installing WordPress on your local computer will help you to test your blog before making it live. Mostly plugin and theme developers first test their theme/plugin’s features on local computer before testing on a live site. When they are sure about everything, then they use on the live site. If you want to make some changes in your site without affecting your server file then installing WordPress on a local machine is highly recommended.
Below are some important benefits for installing WordPress on local server
Since all your blog files, WordPress setup files are located on your computer, you can access those files without logging on a server.
Quick and safe result
Any changes made on file can be check quickly. Those changes are completely reversible without affecting your server files.
You don’t require internet connectivity while working on your blog which you have setup on your local machine.
Plugin test/ Theme Update
If you want to install any plugin on your live blog then it is recommended to test it before installing on your live blog. This can be tested on blog installed on your local machine. Any changes in themes file/folder can be done easily without affecting your main site.
Let’s start with the installation of WordPress on the local server. To install WordPress you will need to create a local server. Local server can be created using WAMP or XAMPP application.
Note: Install either WAMP server or XAMPP server on your local machine. You can download WAMP and XAMPP from its official sites
Steps to install WordPress using XAMPP Server
Here I am using XAMPP server to install WordPress on a local machine. You can also use WAMP server to install WordPress on your local machine. You may also like to check, how to install WordPress manually on hosting server.
Step 1 => Download XAMPP application and install it by running downloaded .exe file.
Step 2 => It may give a warning like Type of file may harm your computer. Don’t worry just allow permission to install it. There is nothing to worry about this file. It’s safe!
Step 3 => Once a file is downloaded. Launch installer to proceed with XAMP server installation.
Step 4 => Click on Next button to proceed with the installation.
Step 5 => Check/ Uncheck the checkbox to install required component. Apache, MySQL, PHP, phpMyAdmin is compulsory to create a local server . Make sure those are checked. Click Next button for next step.
Step 6 => You can define the path for XAMPP server installation. If you want default path then just click ‘Next’ to proceed.
Step 7 => Here I am going to show you, how to install WordPress manually. Hence uncheck checkbox as shown below. If you continue with the checked option then it will take you to auto installer page. Let’s do it manually. It’s not too hard to skip!
Step 8 => Now you are done with precheck and you are ready to start with installation steps. Click Next to start an installation.
Step 9 => The installation will take few seconds to 1 minute. Wait till installation is completed.
Step 10 => Once the installation is complete, at next step it will give the option to start control panel of XAMPP Sever. Just check the checkbox and click on Finish button. If it doesn’t give this option then you can start control panel from the start menu>>XAMPP>>XAMPP Control Panel.
Step 11 => While starting it may ask you to choose a language for the control panel. Just select one and save it.
Step 12 => Once XAMPP server is launched click on ‘Start’ button in front of ‘Apache’ and ‘MySQL’ option as shown in below screenshot. This server is important to start, to create a local server with the database to host your blog content and database locally.
Step 13 => Done! Now the local server is created on your machine and you are now ready to install WordPress in your system. To confirm whether local server is created successfully. Visit http://localhost in your browser. You must get below page.
Step 14 => Before starting with a WordPress installation, we will require a database for our blog which we will be creating in some time. Let’s start with database creation. It just couple of click away.
Step 15 => There is 2 way to go to database homepage called as phpMyAdmin. Either click on phpMyAdmin menu shown in step no.13 or click on Admin button in front of MySQL in XAMPP control panel.
Step 16 => Above step will take you to phpMyAdmin dashboard. Here you can create a database for your blog. For example, I am creating a database with the name as ‘wpwars’. Click on Database menu and give database name followed by clicking on created button.
Hurray! You have created a database for your local machine blog.
Step 17 => You know what? Now you are ready for manual WordPress installation.
Step 18 => Create one folder for your blog file at location C:\xampp\htdocs. Here I have given wpwars as the folder name for my blog.
Step 19 => Download WordPress latest zip file and unzip in the folder created in above step.
Step 20 => In above screenshot, I have pointed one file ‘wp-config-sample.php’. It is one of the important files which contain your database and server credential. You may not change this detail manually. It will ask while starting WordPress installation. But you should know that your credential is stored in this file.
Step 21 => Now go to your browser and type ‘http://localhost/wpwars‘ (http://localhost followed by ‘/folder_name’). It will show the first step of WordPress installation. Select language and click on Continue button.
Step 22 => Here you go, now enter your credential which will be updated in wp-config-sample.php file and it will be saved as wp-config.php file at the same location. Enter database name as created above, username as root and leave password textbox blank. Finally, submit detail to update it on a local server.
Step 23 => Just click on Run the Install button.
Step 24 => This is the last step. This step will decide your login credential for accessing your blog dashboard. Enter credential of your choice and click on Install WordPress.
Step 25 => Great! You have successfully installed WordPress on your local machine. Now tell me, isn’t it so easy?
Step 26 => It’s time to access your blog dashboard and home page. You can access your blog using ‘http://localhost/wpwars‘ and blog dashboard using ‘http://localhost/wpwars/wp-admin‘ ( use credential created in step no. 24 )
This is how your blog dashboard will look like.
This is how your blog will look like (With Default theme of WordPress).
An application like WAMP or XAMPP will help to create a local server which can be used to run the server based application as shown above for WordPress installation on your local machine. I will be happy to help you in your difficulties while installing WordPress using above steps. Feel free to contact via comment and also share your experience with us.
Xampp : Session Error
Below are the error in php due to session. This happens usually when server is unable to save the sessions data temporarily due to the improper path settings in session.save_path = “\xampp\tmp”.
Solution is to set the session.savepath correctly to point to directory where server can find it easily.
Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_nsvvoh9f5l55g063d7qka1lq72, O_RDWR) failed: No such file or directory (2) in D:\htdocs\bull_ext\access_control\main.inc on line 39
Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull_ext\access_control\main.inc on line 39
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull_ext\access_control\main.inc on line 39
Warning: Cannot modify header information – headers already sent by (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull3\framework\application.inc on line 589
This settings is stored inside the php.ini file, which can be found under c:\xampp\php\ directory.
First stop the Xampp Server.
session.save_path = "\xampp\tmp"
and change it to look like this
session.save_path = "C:\xampp\tmp"
Restart the Xampp Server. That’s it now your session should work as expected.
XAMPP – Error: Apache shutdown unexpectedly – A fix
We ran in a problem recently at HQ where after a Windows 10 update some of our team weren’t able to connect Apache on their local development environment.
At Work, we use Xampp as our local development environment and its worked really well until now. But after a scheduled Windows 10 update some of the team starting getting the error below:
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Check the “/xampp/apache/logs/error.log” file
and the Windows Event Viewer for more clues
After a bit of hunting around and a bit of existing knowledge base in the team, we narrowed it down to another program using port 80 – Xampp’s default port for Apache.
Here are the steps we took to narrow down the problem and then find the solution.
1: Establish that it is a block on Port 80:
To start with you need to establish that this is the problem. The simplest way to do this is to change the Apache port from 80 to 7777
- With Xampp open, click on Config
- Select Service and Port Settings
- You’ll then see the service settings popup which will open on the Apache tab. Change the main port from 80 to 7777 and restart Apache. If you need go to localhost:7777/you-site-name in your browser you should see your site again.
Now this got the site working for us (kinda) but we have loads of sites on our local development environment that share config files remotely that would all need to be changed to include the addition of :7777 in the local url.
So we needed to dig further.
2. Find out what else is using port 80
Now the easy fix for this is Skype which listens in on port 80 and can stop Xampp working. To disable this in Skype, use the following steps.
- Open the Skype window
- Click on the Tools menu and select Options.
- Click on the Advanced tab, and go to Connection sub-tab.
- Untick or uncheck the check box for Use port 80 and 443 as an alternatives for incoming connections option.
- Click on Save button and then restart Skype to make the change effective.
But we don’t use Skype. So something else was stopping things from working right.
By clicking on the Netstat button in Xampp you can see a list of all the programs and applications that are listening to different ports. You can see whats listening in to port 80 and trouble shoot it. For us, port 80 was being listened into by a System app and that’s all we had to go on.
After a bit of digging we found that there’s a few different problematic system programs that can listen in on port 80 and stop Xampp from working. As it turned out here are a list of the top 3 common system applications that can cause a problem.
- Web Deployment Agent Service
- SQL Server Reporting Services (MSSQLSERVER)
- World Wide Web Publishing Service
To stop a process like this to check if its blocking port 80
- Go to Start
- Search for services
- The scroll through the list to find if one of the above is running. When you find it, click the black stop button at the top, restart Apache on Xampp and see if things work again.
For us it was the World Wide Web Publishing Service. Once it was stopped we were back up and running again.
How to make WordPress Permalinks work in Xampp
Xampp and similar localhost webservers that can be run from a local computer do not have mod_rewrite enabled by default. Furthermore, the AllowOverride directive is usually set to none, causing Apache to ignore an .htaccess file. If this is the case, your WordPress installation might return a 404 error, stating post not found and you would only be able to access your posts via a default permalink structure. I.E. http://localhost/?p=2. In the following simple solution, I show you how to make WordPress Permalinks work in Xampp and other localhost server installations. Upon completion, you will also have the ability to use .htaccess files on your local server.
How to make WordPress Permalinks work in Xampp:
- Using a text editor, open your httpd.conf file. In Xampp, this file is found in the \apache\conf directory
- Search the file for the following line of code:
#LoadModule rewrite_module modules/mod_rewrite.so
Next, remove the # from the line as seen below to enable the module:
LoadModule rewrite_module modules/mod_rewrite.so
Next, search the file for AllowOverride until you come to a section that looks like the following:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
# Controls who can get stuff from this server.
Allow from all