Question

I had installed Algolia_AlgoliaSearch extension via composer in Magento 2.

Now I want to remove this extension from the website. So that I have deleted the complete files and folders of the extension.

After that running upgrade command then I am getting an error:

PHP Warning:  require(/var/www/html/new/vendor/composer/../algolia/algoliasearch-magento-2/registration.php): failed to open stream: No such file or directory in /var/www/html/new/vendor/composer/autoload_real.php on line 71
PHP Fatal error:  require(): Failed opening required'/var/www/html/new/vendor/composer/../algolia/algoliasearch-magento-2/registration.php' (include_path='/var/www/html/new/vendor/magento/zendframework1/library:/var/www/html/new/vendor/php                                  unit/php-file-iterator:/var/www/html/new/vendor/phpunit/phpunit:/var/www/html/new/vendor/symfony/yaml:.:/usr/share/pear:/usr/share/php') in /var/www/html/new/vendor/composer/autoload_real.php on line 71

How to fix this?

Was it helpful?

Solution

You can remove it by below command

composer remove algolia/algoliasearch-magento-2

Then, upgrade setup by below command

php bin/magento setup:upgrade

OTHER TIPS

I think you need to remove the entry from composer also to uninstall the extension completely.

For that, you need to run:

composer remove algolia/algoliasearch-magento-2

then check and remove the entry in setup_module table in the database.

Then run the upgrade command:

php bin/magento setup:upgrade

Please let me know if you find any problem.

Run command in terminal

composer remove algolia/algoliasearch-magento-2
php bin/magento setup:upgrade
php bin/magento module:uninstall -r Algolia_AlgoliaSearch

-r flag removes module data.

Run command:

php bin/magento setup:upgrade

Try Below Commands.

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear- 
static-content
php bin/magento setup:upgrade
composer remove VendorName/VendorExtensionRepository

Reference : Reference took from here

Just Run Following Commands:-

php bin/magento module:disable Algolia_AlgoliaSearch --clear-static-content

php bin/magento setup:upgrade

composer remove algolia/algoliasearch-magento

Looks like you have installed the extension via composer.

Try running this command :

php bin/magento module:uninstall -r Algolia_AlgoliaSearch
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top