How to get base directory programmatically in Magento 2 April 21, 2016 - Fire development, Magento 2 It is possible to get base directory programmatically in Magento 2 the same way as you do it in 1.x, since it is available in the constant BP: ' define('BP', dirname(__DIR__)); 1 define('BP', dirname(__DIR__)); Source More tips from the cookbook ' Related postsHow to Pass the Magento 2 CertificationMagento 2 Release NotesMagento 2 Commerce and Cloud (Enterprise Edition) Specific FeaturesMagento 2 B2B Order Approval: a customizable workflow for company purchase ordersExploring Magento 2 Backend: Extensions -> IntegrationsFireBear Free Magento 1 to Magento 2 Migration add-on – Change LogExploring Magento 2 Backend: Advertising ChannelsMagento 2 Custom PDF Invoices Post Tags:base directorymagento 2Magento 2 Developer’s Cookbook Homepage » Fire development » How to get base directory programmatically in Magento 2 Please enable JavaScript to view the comments powered by Disqus. ← Previous Post Next Post →