Magento
Jump to navigation
Jump to search
Static Content Re-Generate
Before deleting pub/static make a backup of pub/static/.htaccess and restore it again. otherwise your all css and js will show 404 error!
Remove pub/static (keep the .htaccess backed up and copy it again) Remove var/cache Remove var/composer_home Remove var/generation Remove var/page_cache Remove var/view_preprocessed Run php bin/magento setup:static-content:deploy
Product not showing on frontend
php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:flush
Admin login not working
1. Clear the admin session table from phpmyadmin. tabke name: admin_user_session
2. Unlock the admin account
php bin/magento admin:user:unlock $user
3. Update Password of the admin user:
SET @salt = MD5(UNIX_TIMESTAMP()); UPDATE $admin_table SET `password` = CONCAT(SHA2(CONCAT(@salt, 'NewP@ssword'), 256), ':', @salt, ':1') WHERE username = '$admin_user'; For Example: SET @salt = MD5(UNIX_TIMESTAMP()); UPDATE mgsv_admin_user SET `password` = CONCAT(SHA2(CONCAT(@salt, 'Magento@123'), 256), ':', @salt, ':1') WHERE username = 'mageplaza';
Empty Output Of Magento Commands
Open bin/magento in your preferred file editor and add the following line and save:
ini_set('display_errors', 1); // allow PHP errors reporting
Run the command again and now it will show the exact error. After debugging, remove the above error code.
Allowed memory size of x bytes exhausted
Add "add -d memory_limit=XX" in the command:
Example: php -d memory_limit=4G bin/magento setup:di:compile