How to exploit all commands in Magento 2 CLI (Part 9)

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:

Modernize Magento deployment configuration

php bin/magento setup:config:set[ –<Parameter>=<value> ,… ]

The parameters and value are listed on the below tabulation:

OptionValuesRequired
–backend-frontnameMagento 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-nameThe database name which Magento installed onno
–db-userThe user name of Magento database ownerno
–db-passwordThe password of database useno
–db-prefixThe 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-saveUse 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
–key1: indicate a key to encrypt sensitive data in the Magento database.

0:Magento creates one for you.

no
–db-init-statementsAdvanced 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)


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *