PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Data\Collection\AbstractDb::setConnection() must implement interface Magento\Framework\DB\Adapter\AdapterInterface, boolean given, called in /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php on line 124 and defined in /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php:183\nStack trace:\n#0 /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php(124): Magento\Framework\Data\Collection\AbstractDb->setConnection(false)\n#1 /var/www/stg.bulk.ls1/public_html/app/code/FishPig/WordPress/Model/ResourceModel/Collection/AbstractCollection.php(24): Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection->__construct(Object(Magento\Framework\Data\Collection\EntityFactory), Object(Magento\Framework\Logger\Monolog), Object(Magento\Framework\Data\Collection\Db\FetchStrategy\Query), Object(Mag in /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php on line 183

  • Is it default magento installation?
    – Sohel Rana
    Commented Jan 10, 2019 at 15:10
  • when this error occurred?
    – Himanshu
    Commented Jan 11, 2019 at 5:41
  • when update from magento 2.2.1 to 2.2.7 error show Commented Jan 11, 2019 at 6:41

1 Answer 1


This problem is caused by the FishPig_WordPress integration module being enabled, but the associated WordPress database is not available. If you've downloaded a copy of a website with this enabled without the attached WordPress site database - your site front-end can likely crash if it's using widgets associated with FishPig_WordPress.

You have two options:

  1. If you're just using the site locally for development, you can disable the module using php bin/magento module:disable FishPig_WordPress. Re-compile and clear the cache afterward.
  2. Find the missing WordPress database and set it up - if you're not sure where the Wordpress site is installed, you can find it's relative path by using the following SQL query SELECT * FROM db.core_config_data WHEREpath= 'wordpress/setup/path';. From there - you can find the necessary details in the wp-config.php to help locate your missing database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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