In this tutorial, we will guide you step-by-step through the process of installing Magento Open Source on macOS. Magento Open Source is an e-commerce platform that allows merchants to sell products online. By default, it comes with a number of advanced features that help in managing an online store.
Before starting with the installation process, make sure you have the following prerequisites:
First, download the latest version of Magento Open Source from the official website: https://github.com/magento/magento2. We recommend downloading the Master branch as it contains the latest features and bug fixes.
Composer is a tool for managing PHP dependencies. It's required to install Magento 2. To install Composer on macOS, follow the steps below:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
sudo mv composer.phar /usr/local/bin/composer
composer
You should see the Composer output in your Terminal.
To install Magento 2 on macOS, follow these steps:
unzip master.zip -d /Magento
This will create a new directory called Magento in the / directory.
cd /Magento/magento2-master
composer install
php bin/magento setup:install --base-url=http://localhost/magento2 --db-host=localhost --db-name=magento2 --db-user=root --db-password=root --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/New_York --use-rewrites=1
This command will install Magento 2 with sample data.
Magento 2 requires certain file and folder permissions to function properly. To set them, follow these steps:
cd /Magento/magento2-master
chmod -R 777 var/ pub/ generated/
Magento is now installed on macOS. To access the Magento dashboard, open a web browser of your choice and type http://localhost/magento2/
in the address bar. This will take you to the Magento setup page. Follow the on-screen instructions to complete the setup process and start using Magento.
Congratulations! Now, you know how to install Magento Open Source on macOS. If you encounter any problems during the installation, please refer to the official Magento documentation for more information.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!