MAMP for MacOS is a fantastic way to virtualize a LAMP (Linux Apache MySQL PHP) environment quickly and stably. Linux is the obvious native solution for the stack and it is on hundreds of thousands of servers around the world. I was never able to quite replicate the ease of use of LAMP virtualization on Linux. I’ve finally found a simple way to virtualize a LAMP environment using ‘XAMPP’.

  
    1. Download XAMPP at https://www.apachefriends.org/xampp-files/7.3.3/xampp-linux-x64-7.3.3-0-installer.run
    2. cd ~/Downloads
    3. chmod 755 xampp-linux-x64-7.3.3-0-installer.run
    4. chmod +x xampp-linux-x64-7.3.3-0-installer.run
    5. sudo ./xampp-linux-x64-7.3.3-0-installer.run
    6. sudo chmod -R 755 /opt/lampp/htdocs
    7. Type whoami this is your username. Type id -gn. This is the groupname to which your user belongs.
    8. sudo chown –R [Username]:[Groupname] /opt/lampp/htdocs e.g. sudo chown -R johnsmith:users /opt/lampp/htdocs
    9. sudo cp /opt/lampp/etc/httpd.conf /opt/lampp/etc/httpd.conf.bak
    10. sudo vim /opt/lampp/etc/httpd.conf You can replace 'vim' with whatever text editor you prefer: 'gedit', 'nano', 'pico', etc...
    11. Search 'daemon'. Change the 'User' and 'Group' accordingly.
    12. sudo /opt/lampp/lampp restart
  

This will put you on your way for WordPress and PHP development.

Enjoy!