I have upgraded the Magento version after that I have run cache clean, flush and permission command.

above cache-related commands are working good but php bin/magento setup:upgrade command isn't working.

It gives this error:

  Notice: unserialize(): Error at offset 1977 of 2818 bytes in /var/www/html/magento2/vendor/magento/framework/Unserialize/Unserialize.php on line 21

Any help will be appreciated.


First of all, check all the necessary libraries for your Magento 2 version. There are must be :


The second step - check your app/etc/env.php file (Is where are your password/DB name/ DB user is right?).

Try to run composer install or composer update

Check your current PHP version:

php -v in console

if it is not correct , switch it.

remove directories : var/cache var/tmp var/view_preprocessed genereted/*

  • Thank You for your reply,Due to Amsty feed module commands are not working, i have disable it so now it's working – Jimit Bhavsar Nov 14 '19 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.