Wednesday, January 22, 2020

magento2 commands

2 Check default mode

php bin/magento deploy:mode:show

#####
Clear Cache
php bin/magento cache:clean
php bin/magento cache:flush
#####

2 Change Base url database using phpmyadmin
move to your database then
select this table core_config_data
and change the
web/secure/base_url
and
web/unsecure/base_url
#####

2 Check Current Config
# php bin/magento config:show
#####

2 Check unsecure Base url command line
php bin/magento config:show web/unsecure/base_url

2 Chnage unsecure Base url command line
unsecure
# php bin/magento config:set web/unsecure/base_url http://example.com/

#######

2 Check secure Base url command line
php bin/magento config:show web/secure/base_url

2 Chnage secure Base url command line
php bin/magento config:set web/secure/base_url http://staging.abesthost.com/
#####

2 upgrade setup
# php -f bin/magento setup:upgrade

2 Deploy static content
# php -f bin/magento setup:static-content:deploy

#####
Cron
# php bin/magento setup:cron:run
and
# php bin/magento cron:run
#####

2 Developer mode
bin/magento deploy:mode:set developer
######
2 Production mode
bin/magento deploy:mode:set production

######
2 show errors

open your bootstrap.php file from your magento 2 root directory/app/bootstrap.php
and
remove # from ini_set('display_errors', 1);

#####
2 Compile magento:-

php bin/magento setup:di:compile

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

#####
Change the connection config in app/etc/env.php,

Also change the URL in database in table "YourPrifex_core_config_data"
The url config in YourPrifex_core_config_data and set the permission your source files



0 comments: