Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

Magento 2 Deploy Command Line

Vinh Jacker | 12-18-2024

Magento 2 Deploy Command

In this tutorial, we will talk about how to Deploy Command Line in Command Line Series to perform Magento 2 functions. As you know, from Magento 2, they add many commands in bin/magento. Command lines are too faminliar with Magento developers, but in case you are new to this fields. This article will take you closer to the Magento 2 command lines and how to deploy them in Magento 2 in a easy-to-understand way.

Let’s get started!

Deploy command line

Commands syntax:

php bin/magento setup:static-content:deploy <lang> ... <lang> [--dry-run] 

How to run deploy static content

php bin/magento setup:static-content:deploy

It will display as the following:

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

Requested languages: en_US
=== frontend -> Magento/blank -> en_US ===
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

By default it will run deploy static content of default language: en_EN

If you want to deploy static content of other language such as: pt_BR

Run

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

Then get result:

Requested languages: pt_BR
=== frontend -> Magento/luma -> pt_BR ===
... progress indicator ...
Successful: 1613 files; errors: 0

=== frontend -> Magento/blank -> pt_BR ===
... progress indicator ...
Successful: 1620 files; errors: 0

=== adminhtml -> Magento/backend -> pt_BR ===
... progress indicator ...
Successful: 1626 files; errors: 0

=== Minify templates ===
... progress indicator ...
Successful: 858 files modified
---


Magento 2 extensions

Magento 2 extensions

Allow you to achieve more with your online store

Check it out!


Related Topics

Wrap up

That’s how you can run command lines in Magento 2 easily without errors. You can also create custom command line in Magento 2, which is demonstrated in this article. Check it out if you are interested in.

Thanks for reading!

x
    Jacker

    With over a decade of experience crafting innovative tech solutions for ecommerce businesses built on Magento, Jacker is the mastermind behind our secure and well-functioned extensions. With his expertise in building user-friendly interfaces and robust back-end systems, Mageplaza was able to deliver exceptional Magento solutions and services for over 122K+ customers around the world.



    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services