Skip to main content

Command Line

Magento 2 Allowed Memory exhausted error when compile code

you need to increase the memory_limit in php.ini

and as a quick solution you can use these commands directly in the command line

 

php -dmemory_limit=5G bin/magento setup:di:compile

and 

php -dmemory_limit=5G bin/magento setup:static-content:deploy

 

 

another code for the composer update

php -dmemory_limit=5G composer.phar update

php -d memory_limit=-1 /usr/local/bin/composer update
 

 

Disable Smile-SA / Elasticsuite

We can disable Disable Smile-SA / Elasticsuite in Magento by executing this command 

php bin/magento modeul:disable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteCatalogGraphQl Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker Smile_ElasticsuiteThesaurus Smile_ElasticsuiteSwatches Smile_ElasticsuiteIndices Smile_ElasticsuiteVirtualCategory

to install the needed plugins you need to execute this command 

 

Update Drupal core via Drush

Update Drupal core via Drush

- Activate maintenance mode

drush state-set system.maintenance_mode 1

- Clear the cache

drush cache-rebuild

- Update the Files : please choose one of the below options


    - Update Drupal 8 core
           drush pm-update drupal

    - Update a single module
          drush pm-update module_name

Magento2 Upgrade current installation using command line

Hello In this wiki i will show you how to upgrade magento to  (CC 2.3.6) version by Command line

Please follow these steps 

direct use of composer.phar

 

To see the full list of available 2.3 versions:

composer show magento/product-community-edition 2.3.* --available | grep -m 1 versions

 

To see the full list of available 2.4 versions:

composer show magento/product-community-edition 2.4.* --available | grep -m 1 versions