Magento 2中的Magento 2安装程序升级命令行

在本教程中,我们将讨论安装升级命令行 setup:upgrade中的命令行系列。如您所知,在Magento 2中,它们在中添加了许多命令bin/magento。这可能很难解决,让我解释一下安装升级命令行的更多细节。

通过命令行安装升级命令行

转到Magento管理员根文件夹并显示用法:

php bin/magento setup:upgrade -h

输出:

Usage:                                                                                                                     
  setup:upgrade [options]                                                                                                  
                                                                                                                           
Options:                                                                                                                   
      --keep-generated                           Prevents generated files from being deleted.                              
                                                 We discourage using this option except when deploying to production.      
                                                 Consult your system integrator or administrator for more information.     
      --magento-init-params=MAGENTO-INIT-PARAMS  Add to any command to customize Magento initialization parameters         
                                                 For example: "MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.c
m&MAGE_DIRS[cache][path]=/var/tmp/cache"                                                                                   
  -h, --help                                     Display this help message                                                 
  -q, --quiet                                    Do not output any message                                                 
  -V, --version                                  Display this application version                                          
      --ansi                                     Force ANSI output                                                         
      --no-ansi                                  Disable ANSI output                                                       
  -n, --no-interaction                           Do not ask any interactive question                                       
  -v|vv|vvv, --verbose                           Increase the verbosity of messages: 1 for normal output, 2 for more verbos
 output and 3 for debug                                                                                                    
                                                                                                                           
Help:                                                                                                                      
  Upgrades the Magento application, DB data, and schema                                                                    

为了防止生成的文件被删除,您应该添加参数--keep-generated

php bin/magento setup:upgrade --keep-generated

句法

安装/更新扩展程序时,只需运行以下命令行即可升级商店

php bin/magento setup:upgrade

输出:

Cache cleared successfully
File system cleanup:
./generated/code/Composer
./generated/code/Magento
./generated/code/Symfony
The directory './generated/metadata/' doesn't exist - skipping cleanup
./pub/static/adminhtml
./pub/static/deployed_version.txt
./pub/static/frontend
./var/view_preprocessed/pub
Updating modules:
Schema creation/updates:
Module 'Magento_Store':
Module 'Magento_Directory':
Module 'Magento_Eav':
Module 'Magento_Backend':
Module 'Magento_Theme':
Module 'Magento_Customer':
Module 'Magento_AdminNotification':
Module 'Magento_Indexer':
Module 'Magento_AdvancedPricingImportExport':
Module 'Magento_Config':
Module 'Magento_Authorization':
Module 'Magento_Cms':
Module 'Magento_Rule':
Module 'Magento_Backup':
Module 'Magento_Catalog':
Module 'Magento_Bundle':
Module 'Magento_BundleImportExport':
Module 'Magento_Search':
Module 'Magento_CacheInvalidate':
Module 'Magento_Quote':
Module 'Magento_SalesSequence':
Module 'Magento_Security':
Module 'Magento_CatalogImportExport':
Module 'Magento_Payment':
Module 'Magento_Cron':
Module 'Magento_Msrp':
Module 'Magento_CatalogInventory':
Module 'Magento_UrlRewrite':
Module 'Magento_Sales':
Module 'Magento_CatalogUrlRewrite':
Module 'Magento_Widget':
Module 'Magento_Checkout':
Module 'Magento_CheckoutAgreements':
Module 'Magento_Vault':
Module 'Magento_Downloadable':
Module 'Magento_CmsUrlRewrite':
Module 'Magento_User':
Module 'Magento_ConfigurableImportExport':
Module 'Magento_CatalogSearch':
Module 'Magento_ConfigurableProduct':
Module 'Magento_Tax':
Module 'Magento_Contact':
Module 'Magento_Cookie':
Module 'Magento_Email':
Module 'Magento_CurrencySymbol':
Module 'Magento_Paypal':
Module 'Magento_Integration':
Module 'Magento_CustomerImportExport':
Module 'Magento_SampleData':
Module 'Magento_Deploy':
Module 'Magento_Developer':
Module 'Magento_Dhl':
Module 'Amazon_Core':
Module 'Magento_CatalogRule':
Module 'Magento_ImportExport':
Module 'Magento_Weee':
Module 'Magento_Authorizenet':
Module 'Magento_Newsletter':
Module 'Magento_EncryptionKey':
Module 'Magento_Fedex':
Module 'Magento_GiftMessage':
Module 'Magento_GoogleAdwords':
Module 'Magento_GoogleAnalytics':
Module 'Magento_Ui':
Module 'Magento_GroupedImportExport':
Module 'Magento_GroupedProduct':
Module 'Magento_CatalogSampleData':
Module 'Magento_DownloadableImportExport':
Module 'Magento_Braintree':
Module 'Magento_InstantPurchase':
Module 'Magento_Analytics':
Module 'Magento_LayeredNavigation':
Module 'Magento_Marketplace':
Module 'Magento_MediaStorage':
Module 'Magento_CatalogRuleConfigurable':
Module 'Magento_MsrpSampleData':
Module 'Magento_Multishipping':
Module 'Magento_NewRelicReporting':
Module 'Magento_ProductAlert':
Module 'Magento_OfflinePayments':
Module 'Magento_SalesRule':
Module 'Magento_OfflineShipping':
Module 'Magento_PageCache':
Module 'Magento_Captcha':
.....
Nothing to import.
Please re-run Magento compile command. Use the command "setup:di:compile"

相关文章

0 0 投票数
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论