I am trying to move magento 2 to another server but when I am trying to flush cache I am getting this error:

php bin/magento cache:flush

Area code not set: Area code must be set before starting a session.

Area code is not set

cache:flush [--bootstrap="..."] [types1] ... [typesN]

I already updated database with the new directory.

What should I do ?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.