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

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

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

    - Update only security updates
         drush pm-update --security-only