PHP extension mcrypt, intl, … missing as composer uses default environment

I got a bit tired of this error, it's a bit of nightmare to setup Magento2 on OSX using the MAMP PRO PHP in CLI. The entire error looks like this:

I have checked the damn php.ini file and everything  is in place. Also bear in mind that I have added all the extensions in MAMP…

Clear Cache in Magento 2

The cache is the biggest issue when you develop so you need to know all the possible ways of cleaning it. There are 3 way to clean the cache (similar to Magento 1): From the backend (Admin): Through command-line (CLI) tool:

Manually removing the cache files:

You can also check the cache status First of…

Set Environment Variable [Developer or Production Mode] (M2)

First, will be a good idea to check the current MODE:

The main idea is to have this (environment) variable MAGE_MODE set to one of this values: Default Developer Production   To change the MODE in Magento for the moment there are 3 ways: From CLI  (you'll be 100% sure it changed)

Using the .htaccess file:

Through your WEB…