https://devdocs.magento.com/guides/v2.3/config-guide/redis/redis-pg-cache.html
php bin/magento deploy:mode:set developer
mkdir -p app/code/Litespeed/Litemage
mv /path/to/magento2-LiteSpeed_LiteMage-master/* app/code/Litespeed/Litemage/
php bin/magento module:enable Litespeed_Litemage --clear-static-content
php bin/magento setup:upgrade --keep-generated (to update the database schema and data, preserving generated static files.)
php bin/magento cache:clean
php bin/magento setup:di:compile
php bin/magento deploy:mode:set production --skip-compilation
php bin/magento setup:static-content:deploy -f
-
Disable the cache under System->Cache Management.
-
Enter the following in the command line:
php bin/magento module:enable --clear-static-content Component_Name
php bin/magento setup:upgrade
php bin/magento cache:clean
- Check under System > Tools > Web Setup Wizard > Module Manager that the component is present.
composer update vendor/module-name or
composer require vendor/module-name ^x.x.x
===============================================================
==============================================================
Go to the root folder of your Magento project and run the following commands :
rm -rf var/cache var/generation var/di
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
chmod 777 -R var/
====================================================
php bin/magento maintenance:disable
===============================================
The below command is for creating a new user but you can also use it to reset the admin password in Magento 2 if the user is already available
php bin/magento admin:user:create --admin-user=admin --admin-password=admin123
==================================================
php bin/magento deploy:mode:show
php bin/magento deploy:mode:set developer
php bin/magento deploy:mode:set production
php bin/magento deploy:mode:set production --skip-compilation
php bin/magento setup:static-content:deploy en_GB
Magento default locale is en_US so you have to define your language.
==============================================
php bin/magento dev:template-hints:enable
php bin/magento dev:template-hints:disable
php bin/magento cache:clean
php bin/magento cache:flush
=======================================================
php bin/magento app:config:dump write configuration data into config.php file
php bin/magento app:config:import
php bin/magento setup:config:set --enable-debug-logging=true
php bin/magento setup:config:set --enable-debug-logging=false
php bin/magento dev:query-log:enable
php bin/magento dev:query-log:disable
php bin/magento setup:config:set --enable-syslog-logging=true
php bin/magento setup:config:set --enable-syslog-logging=false
php bin/magento indexer:info
php bin/magento indexer:status
php bin/magento indexer:reindex
php bin/magento indexer:show-mode
bin/magento indexer:set-mode {realtime|schedule} [indexer]
php bin/magento setup:db-declaration:generate-whitelist --module-name=Vendor_Modulename
php bin/magento info:language:list
php bin/magento dev:source-theme:deploy
php bin/magento --version
http:///magento_version
pho bin/magento dev:tests:run integration
pho bin/magento dev:xml:convert
php bin/magento setup:perf:generate-fixtures setup/performance-toolkit/profiles/ce/small.xml
###taking backup of code,media and database of magento2
php bin/magento setup:backup --code --media --db
php bin/magento cron:run
php bin/magento cron:run --group="custom_crongroup"
Enter the magento cron:run command two or three times. (cron_schedule database table)
The first time you enter the command, it queues jobs; subsequently, the cron jobs are run. You must enter the command at least twice.
php bin/magento queue:consumers:list (To view a list of all consumers:)
php bin/magento queue:consumers:start (To start message queue consumers:)
php bin/magento dev:di:info "Magento\Quote\Model\Quote\Item\ToOrderItem"
===============================================================
truncate below tables from M1 before migration:
log_url
log_url_info
log_visitor
log_visitor_info
================================================================
Install composer package by ignoring the platform requirements
When it comes to installing and updating packages you may at times want to ignore the platform requirements. For example, when adding or updating a dev dependency that will never be installed on the production environment. For this we can use the --ignore-platform-reqs flag.
composer update phpunit/phpunit --ignore-platform-reqs
or run composer from different path:
php7.1 /usr/local/bin/composer
php7.2 /usr/local/bin/composer
php7.3 composer
run magento commands from lower version of PHP:
/usr/bin/php7.2 bin/magento cache:clean
============================================================
admin stuck on " It's time to change your password.
php bin/magento config:set admin/security/password_is_forced 0
=================================================================
Add more than one block:
https://magento.stackexchange.com/questions/177812/adding-more-than-one-product-tabs-magento2?rq=1 https://webkul.com/blog/call-phtml-file-cms-page-magento2/