I’m on Yosemite, using XAMPP 5.5.38-3. This is quick guide / notes on setting up XAMPP for WordPress development on bloody OSX.
XAMPP on OSX
- Download XAMPP (https://www.apachefriends.org/download.html
- Install XAMPP – this will create folder /Applications/XAMPP
Double click the .dmg file and do the usual install process.
- To run – open the application /Application/XAMPP.app – this will launch the manager app (called manager-osx)
Check and make sure that both MYSQL and APACHE is running
- Download WordPress (.zip)
- unzip it into XAMPP directory
- Create database via phpmyadmin
WORDPRESS on OSX
- Download WordPress (https://wordpress.org/download/)
- Unzip the content using Finder to /Applications/XAMPP/xamppfiles/htdocs
- However, if you use finder to do this – the permission will be set for your username, not XAMPP apache.
Wordpress doesn’t have write permission to the folders, you (the user) do.
So folder permission setting need to be modified to the right owner and r/w permission
Shell12sudo chown -R daemon /Applications/XAMPP/xamppfiles/htdocs;sudo chmod -R g+w /Applications/XAMPP/xamppfiles/htdocs
Above will make all folder under htdocs to be owned by daemon – which is apparently the user ID of the xampp. It also give group write permission to htdocs (which is actually in XAMPP/xamppfiles/htdocs)
- Permission is set, avoid changing permission using Finder – so use WordPress’ management feature (admin panel) as much as possible, so that file and permission modification is done via the wordpress app. If you encounter permission issue again, repeat step #3.
MYSQL / DB mgmt
- It’s now MariaDB, not MySQL – though they are sort of the same, they are slightly different now.
- mysql command line can be found at /Applications/XAMPP/xamppfiles/bin/mysql
- You can access PHPMYADMIN from http://localhost – on top right menu of XAMPP Dashboard.
Issue with WordPress / XAMPP file permissions
- WordPress install prompts wp-config.php content to be copy pasted and file to be created manually
- Even when wordpress installed, it can’t do automatic install of themes and plugins – instead asking for FTP credential.
- See WORDPRESS INSTALL, step 3 below