Category Archives: Development

Run Magento 2 Command On Root Directory With PHP Script

Magento 2 command With php script

Follow below instructions to run the magento 2 commands: Create a new file on Magento 2 root directory(command.php). Add the following codes in the newly created file. <?php use Magento\Framework\App\Bootstrap; require ‘app/bootstrap.php’; $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); $state = $objectManager->get(‘Magento\Framework\App\State’); $state->setAreaCode(‘frontend’); //command code here /*shell_exec(‘your_magento_2_commands’);              –OR– system(‘your_magento_2_commands’); […]

Configure google reCaptcha in Magento 2

It provides greater security on Magento CAPTCHA, verifies without possible user errors by entering a series of letters and numbers, and encourages the conversion of the cart without further obstacles to complete a purchase. To Configure google reCaptcha follow below steps: Step 1: Login to admin panel and go to Store -> Settings -> Configuration. Step 2: Select Security and […]

Create a custom theme in Magento 2

Please follow the steps to create a custom theme in Magento 2 Step 1: Create a directory for ThemeCreate a directory in app/desing/frontend/ with vendor name and theme like:app/design/frontend/vendorName/themeName Step 2: Declare theme.xml under the theme directoryCreate a theme.xml file under “app/design/frontend/vendorName/themeName” this file will have theme name, parent theme name and preview of the […]