Skip to main content

upgrade magento 2

bin/magento maintenance:enable
composer require magento/product-community-edition 2.2.0 --no-update
composer update
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
chmod +x bin/magento
bin/magento setup:upgrade
 php bin/magento setup:di:compile
bin/magento maintenance:disable

For further upgrades, change the version number:

composer require magento/product-community-edition 2.2.2 --no-update


rm -rf pub/static var/cache var/page_cache
rm -rf var/cache
rm -rf var/page_cache
rm -rf var/view_preprocessed

 php bin/magento cache:clean
  php bin/magento cache:flush

php bin/magento setup:static-content:deploy -f

php bin/magento module:status      -- to check activated modules




Step 1: Access Your Server via SSH

You need to connect your server via SSH.

Step 2: Navigate to the Magento 2 Root Directory

Once your SSH connection is up, you will need to move to your target application folder. In that application folder, you will find the public_html folder which is the root directory of Magento 2.

Step 3: Upgrade Commands

composer require magento/product-community-edition 2.1.9 --no-update

Then execute this all commands

 composer update
 rm -rf var/di var/generation
 php bin/magento setup:upgrade
 php bin/magento setup:di:compile
 php bin/magento cache:clean
 php bin/magento cache:flush
 php bin/magento indexer:reindex

 php bin/magento module:status

 php bin/magento module:disable <ExtensionProvider_ExtensionName>
 php bin/magento module:disable Prince_Buynow
 - php bin/magento module:disable SR_CategoryImage
 - php bin/magento module:disable Clapcreative_CategoryImage
 - php bin/magento module:disable Atwix_CategoryAttribute
 - php bin/magento module:disable Livenation_HelloWorld

 php bin/magento deploy:mode:show

 php bin/magento deploy:mode:set production --skip-compilation

 php bin/magento deploy:mode:set developer --skip-compilation


chmod -R 0777 pub/static/
chmod -R 0777 var/cache/
chmod -R 0777 var/page_cache


add these 3 lines to show errors
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);



Comments

Popular posts from this blog

Magento 2: Category list for custom magento system configuration section ( Backend )

In system.xml file field for multi select of category is like: NOTE: Use Select for Single item and multiselect for multiple in - <field id = "bannerlist" translate = "label" type = " multiselect " <group id = "bannerblock_setting" translate = "label" type = "text" delault = "1" sortOrder = "3" showInDefault = "1" showInWebsite = "1" showInStore = "1" > <label> Setting </label> <field id = "bannerlist" translate = "label" type = "multiselect" sortOrder = "10" showInDefault = "1" showInWebsite = "1" showInStore = "1" > <label> Select Category </label> <!-- <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>--> <source_model> Ipragmatech\Bannerblock\Model\Config\Source\C...

Magento 2: Add new tab in Product detail page

New tab in product detail page is very easy task with product attribute. Use below steps and check it out. Step 1. Create Product Attribute “video”. Step 2. Create file “ catalog_product_view.xml ” in the app/design/frontend/{vender name}/{theme name}/Magento_Catalog/layout In the file write the below code: <!-- this is code to add new tab start --> <referenceBlock name="product.info.details"> <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.video" template="product/view/attribute.phtml" group="detailed_info"> <arguments> <argument name="at_call" xsi:type="string">getVideo</argument> <argument name="at_code" xsi:type="string">video</argument> <argument name="css_class" xsi:type="string">video</argument> <argument name="at_label" xsi:type="string">non...