How to Install XAMPP on MacBook

Hướng dẫn cài đặt XAMPP trên Macbook M1
Table of Contents

    XAMPP is a name that is no longer strange to web programmers. It is a necessary software for web developers. XAMPP will help you create a Local server to run and test websites on it. For MacBook M1 users, installing XAMPP is not only optimal but also supports the development of simpler websites. In this article, AppleGeek will guide you through the steps to install XAMPP on MacBook M1.

    Instructions for installing XAMPP on Macbook M1
    Instructions for installing XAMPP on Macbook M1

    Requirements Before Installation

    Before installing XAMPP, you need to make sure your MacBook has free space for XAMPP, and you need to have ADMIN user rights on the machine to perform the steps in the installation process.

    Instructions for installing XAMPP on Macbook M1 Details

    Step 1: Download the latest XAMPP for macOS

    Before starting the installation, of course we first need to have the installation file, to download you go to //www.apachefriends.org/download.html to download. Here AppleGeek recommends you choose php 8.2 which will be more stable.

    Step 2: Open the downloaded file and start the installation process

    After downloading the xampp-osx-8.2.4-0-installer.dmg file, open the file and drag the XAMPP icon into the Applications folder . This installation process may require admin password confirmation. -> Remember to select Open…. If the installation process goes normally, you just need to perform the installation steps as on Windows, just select Next, Next and the installation will be successful.

    However, on macOS, this is the first time you install it, so you will definitely encounter security-related errors. Please read step 3.

    Instructions for installing XAMPP on Macbook M1
    Instructions for installing XAMPP on Macbook M1

    Step 3: Error installing xampp on macbook m1

    Instructions for installing XAMPP on Macbook M1
    Instructions for installing XAMPP on Macbook M1 – Error ” xampp-osx-8.2.0-0-installer cannot be opened because the developer cannot be verified.

    When installing XAMPP on macbook M1, you will definitely encounter this error if this file is opened for the first time. The reason is that the macbook system is not analyzing whether this application is malicious or not. To fix this error, follow these steps.

    1. Press F4 and go to “Privacy and Security”
    2. Go to the ” Security” section and you will see that XAMPP is blocked and what you need to do is select “Open Anyway”.

      Instructions for installing XAMPP on MacOS
      Instructions for installing XAMPP on Macbook M1
    3. After selecting Open Anyway, a popup will appear as shown below. Select Open.
      Instructions for installing XAMPP on Macbook M1
      Instructions for installing XAMPP on Macbook M1

      Then after performing the above steps, the XAMPP installation process on mac M1 will proceed normally.

    XAMPP Configuration and important config files you need to know on mac M1

    After installing xampp for macbook m1, you need to note the htdocs folder. This folder will be the folder that stores all the source code that you will develop later. Its URL on the web is //localhost (127.0.0.1) . Each folder in htdocs will be a website.

    • //localhost/phpMyAdmin will be the place to store your local database.
    • The PHP.INI file is located in the ” /Applications/XAMPP/xamppfiles/etc/php.ini ” folder (You may need to edit this file to increase the file size when uploading.)
    • Apache and MySQL Config files are also located in ” /Applications/XAMPP/xamppfiles/etc/”

    Common Errors and How to Fix Them

    The most common error is that you cannot start Apache or MySQL. Usually this error is caused by an application that is using port 80. To fix it, find the application that is running that port and kill it. Or you can do the following steps.

    1. Open terminal and enter command ” sudo lsof -i :80 ” this command checks which services are running on port 80
    2. sudo kill -9 PID ” This command is to Kill services running on port 80

    You can refer to the article: Instructions for installing XDebug for XAMPP on mac

    Conclude

    Installing XAMPP on MacBook M1 is not really too complicated, but for beginners, unknown errors will confuse you. However, the article above AppleGeek has guided you to install and fix common errors, hoping it will be useful for you. Let’s start exploring and developing your projects right on MacBook M1 with XAMPP.

    In addition, you can learn more useful tips for macbook .

    Subscribe
    Notify of
    guest
    0 Góp ý
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments