How to Install Porto Theme in Magento 2 Using Command Prompt

magento2theme

How to install theme in magento2 using command prompt ?

enter image description here

enter image description here

enter image description here

Best Answer

  1. First install Default Magento-2 in Localhost.
  2. Run the installation same as every installs of Magento.
  3. Copy the all files of 'porto' theme into your root directory.
  4. As of the local server, You have to install the Composer in your system.
  5. Open composer or download from Here
  6. Run the following commands :

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    
    php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    
    php composer-setup.php
    
    php -r "unlink('composer-setup.php');"
    
  7. Open command prompt by pressing win+R.

  8. Run the following commands

    php bin/magento setup:upgrade
    
    php bin/magento setup:static-content:deploy
    
    php bin/magento cache:clean
    
    php bin/magento cache:flush
    
  9. Login to admin panel then check.

Related Topic