In this Article we going to discuss about the Magento 2 Command line
Part 9: Modernize deployment configuration
Everyone knows Magento 2 has a powerful command-line interface tools (CLI). It permits you to complete task including installation, configuration, database backups, compiling LESS etc. Here I will show you how to modernize deployment config using command-line in Magento 2. Before starting this guide please,refer our previous guidelines:
- Magento 2 CLI Overview
- Examine Caches in Magento 2 using CLI
- Examine indexers in Magento 2 using CLI
- Examine modules in Magento 2 using CLI
- Form Magento Store using CLI
- Generate sample data for performance testing
- Backup and rollback Magento
- Built Admin user using CLI
- Install Magento using CLI
Modernize Magento deployment configuration
php bin/magento setup:config:set[ –<Parameter>=<value> ,… ]
The parameters and value are listed on the below tabulation:
Option | Values | Required |
–backend-frontname | Magento backend URL, for example: admin, backend, admin-magento, etc | no |
–db-host | – The database server’s fully eligible host name or IP address – Localhost (default) or 127.0.0.1 | no |
–db-name | The database name which Magento installed on | no |
–db-user | The user name of Magento database owner | no |
–db-password | The password of database use | no |
–db-prefix | The introduction of tables in database can be a maximum of five characters in length. It should begin with a letter and it contains only letters, numbers, and underscores characters. | no |
–session-save | Use one of the following: – “db” to store session data in the database. Select database storage if you have a clustered database; or else, there might not be much benefit over file-based storage. – “files” to store session data in the file system. File-based session storage is appropriate unless the Magento file system access is slow or you have a clustered database. | no |
–key | 1: indicate a key to encrypt sensitive data in the Magento database. 0:Magento creates one for you. | no |
–db-init-statements | Advanced MySQL configuration parameter. Uses database initialization statements to run when connecting to the MySQL database. Default is SET NAMES utf8;. Consult a reference similar to this one before you set any values. | no |
–http-cache-hosts | – Comma-separated list of HTTP cache gateway hosts to which to send purge requests. Make use of this parameter to indicate the host or hosts to purge in the same request. – Format must be <hostname or ip>:<listen port>, where you can omit <listen port> if it’s port 80. For example, –http-cache-hosts=192.0.2.100,192.0.2.155:6081 | no |
I hope the following tabulation helps you to Modernize deployment configuration in Magento 2 CLI(Part 9)
Leave a Reply