Command Line
Copy file from a server using SSH command
Copy file from a server using SSH command
if we ant to use SSH command to copy a file to local folder we can use scp command
here is the main command
scp {SSH connection}:{full file path} /tmp/local
here is an example
scp ssh [email protected]:/user/zippedfile.zip /local
update composer to specifc version
You can use this command to update the composer into a specifc version
composer self-update 1.4.1
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
Check if the Elasticsearch is installed
To display the status of the Elasticseach please use this command
curl -X GET 'localhost:9200/_cat/health?v&pretty'
Display Elasticsearch plugins SSH Command Line
to display the current installed Elasticsearch plugin use this command
curl -X GET "localhost:9200/_cat/plugins?v&s=component&h=name,component,version,description&pretty"
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
Verify the proxy works , Elasticsearch
Verify the proxy works by entering the following command:
curl -i http://localhost:<proxy port>/_cluster/health
example:
curl -i http://localhost:8080/_cluster/health
Find all XML files that have been changed in last 24 hours
You can use this command to find it
find . -name "*.xml" -mtime -1 -ls
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