Required parameter 'theme_dir' was not passed

Viewed 1

How to fix Required parameter 'theme_dir' was not passed in Magento 2?

1 Answers

In case you removed the theme directly.

Then follow these steps.

STEP 1 : File Operations

Delete the content from app/design/frontend/<Vendor> (make sure you back it up first).

Delete all the content of folder var/view_preprocessed & pub/static/frontend.

rm -rf var/view_preprocessed/* pub/static/frontend/*

STEP 2 : DB Operations

Go to your theme table and delete the entry for your created theme.

After that...

Go to your core_config_data table and search the column path for design/theme/theme_id

SELECT * FROM core_config_data WHERE path = "design/theme/theme_id"

and replace your default theme id in it.

STEP 3 : Run these commands :

php bin/magento indexer:reindex
php bin/magento setup:upgrade
bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush