Magento 2 – Broken css and js on frontend after installation of Magento 2

Magento 2 – Broken css and js on frontend after installation of Magento 2

After successful installation of magento 2, if you see broken css and js on frontend there might be possibilty that theme is missing, in order to fix this issue you need to run below command

Above command will deploy themes:


That’s it. Clear your cache and check your magento site now.

Issues you might encounter while running above command:-

1) PHP Fatal error: Uncaught exception ‘Zend_Db_Adapter_Exception’ with message ‘pdo_mysql extension is not installed’

Try running

You may want to remove any other version first, like php7.0-mysql or php5.5-mysql. Be careful as this will remove configuration files.

2) PHP Fatal error: Call to undefined function Magento\Framework\Event\mb_strtolower() in /var/www/html/m2/vendor/magento/framework/Event/Manager.php on line 56

3) Notice: Use of undefined constant MCRYPT_BLOWFISH – assumed ‘MCRYPT_BLOWFISH’ in /var/www/html/m2/vendor/magento/framework/Encryption/Encr
yptor.php on line 397

4) Fatal error: Class ‘Locale’ not found in vendor/magento/framework/Locale/Bundle/DataBundle.php on line 64

Don’t forget to restart web server after running above commands.

(Visited 158 times, 1 visits today)