diff --git a/guides/v2.1/cloud/before/before-setup-env-install.md b/guides/v2.1/cloud/before/before-setup-env-install.md index 15ac8ff1cfd..ef529bbde6e 100644 --- a/guides/v2.1/cloud/before/before-setup-env-install.md +++ b/guides/v2.1/cloud/before/before-setup-env-install.md @@ -81,7 +81,7 @@ After you have installed Magento, you need to set the file system permissions an 1. Enter the following commands in the order shown: ```bash - cd + cd ``` ```terminal @@ -194,7 +194,9 @@ To verify the local, access the store using the URL you passed in the install co To change the URI for the Admin panel, use this command to locate it: + ```bash php bin/magento info:adminuri + ``` To verify the Integration master branch environment, log into the Project Web Interface and select your named project. In the list of branches, select the Master. Click Access site to pull up a list of URLs (HTTP and HTTPS) and click the preferred link to open the site. To view the admin, add /admin or other configured Admin URI. diff --git a/guides/v2.1/cloud/cdn/cloud-vcl-custom-snippets.md b/guides/v2.1/cloud/cdn/cloud-vcl-custom-snippets.md index 044711921e8..b25e633976e 100644 --- a/guides/v2.1/cloud/cdn/cloud-vcl-custom-snippets.md +++ b/guides/v2.1/cloud/cdn/cloud-vcl-custom-snippets.md @@ -117,6 +117,7 @@ The following walk-through shows you how to create regular VCL snippet files and ```bash export FASTLY_SERVICE_ID= ``` + ```bash export FASTLY_API_TOKEN= ``` @@ -172,6 +173,7 @@ Save the active version number in a bash environment variable for use in subsequ ```bash export FASTLY_VERSION_ACTIVE= ``` + #### Step 2: Clone the active VCL version and all snippets {#clone} Before you can add or modify custom VCL snippets, you must create a copy of the active VCL version for editing. Use the Fastly API [clone ](https://docs.fastly.com/api/config#version_7f4937d0663a27fbb765820d4c76c709) operation: @@ -179,6 +181,7 @@ Before you can add or modify custom VCL snippets, you must create a copy of the ```bash curl -H "Fastly-Key: $FASTLY_API_TOKEN" https://api.fastly.com/service/$FASTLY_SERVICE_ID/version/$FASTLY_VERSION_ACTIVE/clone -X PUT ``` + In the JSON response, the version number is incremented, and the *active* key value is `false`. You can modify the new, inactive VCL version locally. ```json diff --git a/guides/v2.1/cloud/cdn/configure-fastly.md b/guides/v2.1/cloud/cdn/configure-fastly.md index a076f4e918b..b337be98184 100644 --- a/guides/v2.1/cloud/cdn/configure-fastly.md +++ b/guides/v2.1/cloud/cdn/configure-fastly.md @@ -150,19 +150,26 @@ You cannot use the Fastly service in Integration environments. 2. Wait for dependencies to be updated. 3. Enter the following command to fully update and clear the cache: - php bin/magento setup:upgrade && php bin/magento cache:clean + ```bash + php bin/magento setup:upgrade && php bin/magento cache:clean + ``` + 4. Edit your composer.json and ensure the Fastly module is included with version. * In the "require" section, you should have `"fastly/magento2": ` * In the "repositories" section, you should have: + + ```json + "fastly-magento2": { + "url": "https://github.com/fastly/fastly-magento2.git" + } + ``` + +3. Add, commit, and push the changes to your code repository with the following command: - "fastly-magento2": { - "url": "https://github.com/fastly/fastly-magento2.git" - } -3. Add, commit, and push the changes to your code repository with the following - command: - - git add -A; git commit -m "Install Fastly"; git push origin + ```bash + git add -A; git commit -m "Install Fastly" && git push origin + ``` 4. Merge the branch code with the `master` Integration branch. diff --git a/guides/v2.1/cloud/cdn/trouble-fastly.md b/guides/v2.1/cloud/cdn/trouble-fastly.md index be8e01402ac..fd157af8c4e 100644 --- a/guides/v2.1/cloud/cdn/trouble-fastly.md +++ b/guides/v2.1/cloud/cdn/trouble-fastly.md @@ -129,13 +129,13 @@ Fastly API requests are passed through the Fastly extension to get a response fr 1. In a terminal, use the following `curl` command to test your live site URL: ```bash -curl https:// -vo /dev/null -H Fastly-Debug:1 + curl https:// -vo /dev/null -H Fastly-Debug:1 ``` If you have not set a static route or completed the DNS configuration for the domains on your live site, use the `--resolve` flag, which bypasses DNS name resolution. ```bash -curl https:// -vo /dev/null -H Fastly-Debug:1 [--resolve] :443: + curl https:// -vo /dev/null -H Fastly-Debug:1 [--resolve] :443: ``` 1. In the response, verify the [headers](#response-headers) to ensure that Fastly is working. You should see following unique headers in the response: @@ -182,13 +182,13 @@ If the Fastly service returns incorrect headers, submit a Fastly API request dir For example, if you have a public URL www.mymagento.biz, enter a command similar to the following to test the production site: ```bash - curl -k https://www.mymagento.biz.c.sv7gVom4qrpek.ent.magento.cloud -H 'Host: www.mymagento.biz' -vo /dev/null -H Fastly-Debug:1 + curl -k https://www.mymagento.biz.c.sv7gVom4qrpek.ent.magento.cloud -H 'Host: www.mymagento.biz' -vo /dev/null -H Fastly-Debug:1 ``` If you have not completed the DNS configuration for the public hostname, remove the `"Host:"` option as shown in the following example: ```bash - curl -k https://www.mymagento.biz.c.sv7gVom4qrpek.ent.magento.cloud -vo /dev/null -H Fastly-Debug:1 + curl -k https://www.mymagento.biz.c.sv7gVom4qrpek.ent.magento.cloud -vo /dev/null -H Fastly-Debug:1 ``` 2. In the response, check for errors in the [cache HIT and MISS headers](#response-headers). diff --git a/guides/v2.1/cloud/docker/docker-config.md b/guides/v2.1/cloud/docker/docker-config.md index 2555a108352..56b7f21d6b7 100644 --- a/guides/v2.1/cloud/docker/docker-config.md +++ b/guides/v2.1/cloud/docker/docker-config.md @@ -78,6 +78,7 @@ Before you begin, you must add the following hostname to your `/etc/hosts` file: ```bash ./vendor/bin/ece-tools docker:config:convert ``` + This command generates the following Docker ENV files: * `docker/config.env` diff --git a/guides/v2.1/cloud/env/setup-notifications.md b/guides/v2.1/cloud/env/setup-notifications.md index 59540211623..24b462eeeb8 100644 --- a/guides/v2.1/cloud/env/setup-notifications.md +++ b/guides/v2.1/cloud/env/setup-notifications.md @@ -54,6 +54,9 @@ To configure notifications: ```bash git -A && git commit -m "Configure build/deploy notifications" + ``` + + ```bash git push origin ``` diff --git a/guides/v2.1/cloud/howtos/install-components.md b/guides/v2.1/cloud/howtos/install-components.md index 5090ece7109..d2fb3bbdfe4 100644 --- a/guides/v2.1/cloud/howtos/install-components.md +++ b/guides/v2.1/cloud/howtos/install-components.md @@ -54,6 +54,9 @@ To update `composer.json`: ```bash composer require : --no-update + ``` + + ```bash composer update ``` @@ -61,6 +64,9 @@ To update `composer.json`: ```bash composer require pixlee/magento2:1.0.1 --no-update + ``` + + ```bash composer update ``` @@ -69,7 +75,13 @@ To update `composer.json`: ```bash git add -A + ``` + + ```bash git commit -m "" + ``` + + ```bash git push origin ``` @@ -153,7 +165,13 @@ You can use CLI commands or directly edit `app/etc/config.php` to enable or disa ```bash git add -A + ``` + + ```bash git commit -m "" + ``` + + ```bash git push origin ``` @@ -188,7 +206,13 @@ To update an extension: ```bash git add -A + ``` + + ```bash git commit -m "" + ``` + + ```bash git push origin ``` diff --git a/guides/v2.1/cloud/howtos/sample-data.md b/guides/v2.1/cloud/howtos/sample-data.md index c2cac3deef1..ec373d07988 100644 --- a/guides/v2.1/cloud/howtos/sample-data.md +++ b/guides/v2.1/cloud/howtos/sample-data.md @@ -27,16 +27,27 @@ To install sample data: 1. If you have not done so already, check out the environment in which to install sample data. 2. In a terminal, enter the following commands: - /bin/magento sampledata:deploy + ```bash + /bin/magento sampledata:deploy + ``` + 3. Wait for components to update. 4. Commit and push the changes: - git add -A && git commit -m "Install sample data" - git push origin + ```bash + git add -A && git commit -m "Install sample data" + ``` + + ```bash + git push origin + ``` + 5. Wait for the project to deploy. 6. Verify the installation was successful by going to your storefront main page in the Integration environment. You can locate the URL link to the storefront through the Project Web Interface. 7. Take a snapshot of your environment: - magento-cloud snapshot:create -e + ```bash + magento-cloud snapshot:create -e + ``` You can start testing your development with live data! diff --git a/guides/v2.1/cloud/live/live-sanity-check.md b/guides/v2.1/cloud/live/live-sanity-check.md index f22e89be9ac..f288dbd73b2 100644 --- a/guides/v2.1/cloud/live/live-sanity-check.md +++ b/guides/v2.1/cloud/live/live-sanity-check.md @@ -42,9 +42,12 @@ Sometimes you just want to test your build prior to pushing your code to Git. Yo 2. Move to another location to run your build. You should keep this build separate from your usual Git branch. 3. Run the following command to build locally. The command builds the current project locally strictly to test the build without the full patching and commit process. - magento-cloud local:build + ```bash + magento-cloud local:build + ``` + + For details, enter `magento-cloud local:build --help`. - For details, enter `magento-cloud local:build --help`. 4. Watch for the results. A series of files will generate for the build. If you do not encounter errors, you can [push code to the remote Git branch](#push) and continue. If errors occur during the build, you can investigate and resolve the code issues. You should not commit the files from this build to Git. @@ -132,6 +135,7 @@ Before you continue, you must know the file system path to any patch we provided ```bash php bin/magento setup:di:compile ``` + This command can take several minutes to complete and produces messages similar to the following: ```terminal @@ -167,15 +171,22 @@ We highly recommend having Magento already installed prior to deployment. During 2. Change to your project root directory. 3. Enter the following command: - php bin/magento setup:upgrade + ```bash + php bin/magento setup:upgrade + ``` We highly recommend having Magento already installed if you followed the [First time deployment]({{ page.baseurl }}/cloud/setup/first-time-deploy.html). If you have not installed the Magento application yet, use the [`magento setup:install`]({{ page.baseurl }}/install-gde/install/cli/install-cli.html) command instead. Be advised, you may encounter issues with enabled modules on a fresh installation. 4. Clean the Magento cache: - php bin/magento cache:clean + ```bash + php bin/magento cache:clean + ``` + 5. Set the Magento application for [production mode]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode): - php bin/magento deploy:mode:set production + ```bash + php bin/magento deploy:mode:set production + ``` If errors display, debug them if possible, [review logs]({{ page.baseurl }}/cloud/trouble/environments-logs.html), or open a [support ticket]({{ page.baseurl }}/cloud/trouble/trouble.html) to get additional assistance. diff --git a/guides/v2.1/cloud/live/sens-data-initial.md b/guides/v2.1/cloud/live/sens-data-initial.md index e080589b2b1..a282765a562 100644 --- a/guides/v2.1/cloud/live/sens-data-initial.md +++ b/guides/v2.1/cloud/live/sens-data-initial.md @@ -10,14 +10,14 @@ Configuration management exports your configurations to a file for pushing acros This example shows how to use the [recommended procedure]({{ page.baseurl }}/cloud/live/sens-data-over.html#cloud-config-specific-recomm) for managing the configuration: -1. Enter your configurations in your Integration environment Admin panel. -2. Create `config.local.php` and transfer it to your local workstation. -3. Push `config.local.php` to the branch and Integration environment. -4. Verify your settings are not editable in the Admin panel. Any configurations exported to `config.local.php` make those fields in the Admin panel read-only and disabled for edits. -5. Update and modify configurations again in Integration and recreate the file to update in Git: - 1. Delete `config.local.php` on the Integration environment. - 2. Change configuration settings on the Integration environment. - 3. Re-create and push the updated `config.local.php` to the Integration environment. +1. Enter your configurations in your Integration environment Admin panel. +2. Create `config.local.php` and transfer it to your local workstation. +3. Push `config.local.php` to the branch and Integration environment. +4. Verify your settings are not editable in the Admin panel. Any configurations exported to `config.local.php` make those fields in the Admin panel read-only and disabled for edits. +5. Update and modify configurations again in Integration and recreate the file to update in Git: + 1. Delete `config.local.php` on the Integration environment. + 2. Change configuration settings on the Integration environment. + 3. Re-create and push the updated `config.local.php` to the Integration environment. * Magento no longer creates an `i18n` directory under the system root directory (`/`) when you run the `php bin/magento i18n:pack` command to install a language pack. [GitHub-6260](https://github.com/magento/magento2/issues/6260) +* Magento no longer creates an `i18n` directory under the system root directory (`/`) when you run the `bin/magento i18n:pack` command to install a language pack. [GitHub-6260](https://github.com/magento/magento2/issues/6260) ### Cart and checkout diff --git a/guides/v2.1/release-notes/ReleaseNotes2.1.10EE.md b/guides/v2.1/release-notes/ReleaseNotes2.1.10EE.md index 3e74416c813..d4c7931e17d 100644 --- a/guides/v2.1/release-notes/ReleaseNotes2.1.10EE.md +++ b/guides/v2.1/release-notes/ReleaseNotes2.1.10EE.md @@ -40,7 +40,7 @@ See [Magento Security Center](https://magento.com/security/patches/magento-221-2 ### Installation, setup, and deployment -* Magento no longer creates an `i18n` directory under the system root directory (`/`) when you run the `php bin/magento i18n:pack` command to install a language pack. [GitHub-6260](https://github.com/magento/magento2/issues/6260) +* Magento no longer creates an `i18n` directory under the system root directory (`/`) when you run the `bin/magento i18n:pack` command to install a language pack. [GitHub-6260](https://github.com/magento/magento2/issues/6260) * Component Manager can now handle custom composer modules. Previously, when you opened **System > Tools > Web Setup > Component Manager** after using Composer to install a custom extension, a PHP error occurred, and Magento did not display the list of installed extensions. *Fix submitted by [JTimNolan](https://github.com/JTimNolan) in pull request 9692.* [GitHub-6718](https://github.com/magento/magento2/issues/6718) diff --git a/guides/v2.1/release-notes/ReleaseNotes2.1.3CE.md b/guides/v2.1/release-notes/ReleaseNotes2.1.3CE.md index 77366218094..17e56be7e5f 100644 --- a/guides/v2.1/release-notes/ReleaseNotes2.1.3CE.md +++ b/guides/v2.1/release-notes/ReleaseNotes2.1.3CE.md @@ -191,7 +191,7 @@ We've enhanced the performance of configurable products in several ways: * Magento now imports custom options correctly. Previously, when you tried to import a custom option, the import failed, and Magento displayed this error: `JavaScript Error: Uncaught RangeError: Maximum call stack size exceeded`. [(GITHUB-5573)](https://github.com/magento/magento2/issues/5573){:target="_blank"} -* We’ve added a new way to import images: You can now successfully import images when you set your document root to /pub. Previously, you needed to set document root to `/magento` to import images. Both ways of importing now work. [(GITHUB-5359)](https://github.com/magento/magento2/issues/5359){:target="_blank"} +* We’ve added a new way to import images: You can now successfully import images when you set your document root to /pub. Previously, you needed to set document root to `/magento` to import images. Both ways of importing now work. [(GITHUB-5359)](https://github.com/magento/magento2/issues/5359){:target="_blank"} * Magento now removes category URL keys from the `url_rewrite` table as expected during import. Previously, Magento did not remove these keys, which triggered a failure during import. This subsequently caused Magento to quickly reach the maximum error count, returning this error: "Maximum error count has been reached or system error is occurred!". [(GITHUB-1471)](https://github.com/magento/magento2/issues/1471){:target="_blank"} diff --git a/guides/v2.1/release-notes/ReleaseNotes2.1.3EE.md b/guides/v2.1/release-notes/ReleaseNotes2.1.3EE.md index 0d3205e4520..5d9cd555c87 100644 --- a/guides/v2.1/release-notes/ReleaseNotes2.1.3EE.md +++ b/guides/v2.1/release-notes/ReleaseNotes2.1.3EE.md @@ -211,7 +211,7 @@ We've enhanced the performance of configurable products in several ways: * Magento now imports custom options correctly. Previously, when you tried to import a custom option, the import failed, and Magento displayed this error: `JavaScript Error: Uncaught RangeError: Maximum call stack size exceeded`. [(GITHUB-5573)](https://github.com/magento/magento2/issues/5573){:target="_blank"} -* We’ve added a new way to import images: You can now successfully import images when you set your document root to /pub. Previously, you needed to set document root to `/magento` to import images. Both ways of importing now work. [(GITHUB-5359)](https://github.com/magento/magento2/issues/5359){:target="_blank"} +* We’ve added a new way to import images: You can now successfully import images when you set your document root to /pub. Previously, you needed to set document root to `/magento` to import images. Both ways of importing now work. [(GITHUB-5359)](https://github.com/magento/magento2/issues/5359){:target="_blank"} * Magento now removes category URL keys from the `url_rewrite` table as expected during import. Previously, Magento did not remove these keys, which triggered a failure during import. This subsequently caused Magento to quickly reach the maximum error count, returning this error: "Maximum error count has been reached or system error is occurred!". [(GITHUB-1471)](https://github.com/magento/magento2/issues/1471){:target="_blank"} diff --git a/guides/v2.1/release-notes/ReleaseNotes2.1.6CE.md b/guides/v2.1/release-notes/ReleaseNotes2.1.6CE.md index 2fa28ae65e4..8f3b1f93863 100644 --- a/guides/v2.1/release-notes/ReleaseNotes2.1.6CE.md +++ b/guides/v2.1/release-notes/ReleaseNotes2.1.6CE.md @@ -69,7 +69,7 @@ Users have encountered problems displaying images after upgrading their software **Workaround**: To correct problems with image loading, choose one of these two workarounds: -* Run `php bin/magento catalog:images:resize` +* Run `bin/magento catalog:images:resize` or diff --git a/guides/v2.1/release-notes/ReleaseNotes2.1.6EE.md b/guides/v2.1/release-notes/ReleaseNotes2.1.6EE.md index f8d8ed12b9f..1067f732645 100644 --- a/guides/v2.1/release-notes/ReleaseNotes2.1.6EE.md +++ b/guides/v2.1/release-notes/ReleaseNotes2.1.6EE.md @@ -69,7 +69,7 @@ Users have encountered problems displaying images after upgrading their software **Workaround**: To correct problems with image loading, choose one of these two workarounds: -* Run `php bin/magento catalog:images:resize` +* Run `bin/magento catalog:images:resize` or diff --git a/guides/v2.1/release-notes/tech_bull_21-upgrade.md b/guides/v2.1/release-notes/tech_bull_21-upgrade.md index c541dc3c31e..36d27afffd0 100644 --- a/guides/v2.1/release-notes/tech_bull_21-upgrade.md +++ b/guides/v2.1/release-notes/tech_bull_21-upgrade.md @@ -96,7 +96,7 @@ For example, to change to the `magento_user` and extract `MDVA-532.zip` into `/v {% collapsible To fix composer.lock: %} -1. As the Magento file system owner, open `/composer.lock` in a text editor. +1. As the Magento file system owner, open `/composer.lock` in a text editor. 2. Change the following entry. from: diff --git a/guides/v2.1/security/google-recaptcha.md b/guides/v2.1/security/google-recaptcha.md index e8732e7a40a..536288ec926 100644 --- a/guides/v2.1/security/google-recaptcha.md +++ b/guides/v2.1/security/google-recaptcha.md @@ -28,9 +28,11 @@ To complete installation in an existing Magento instance, run the following comm ```bash bin/magento module:enable MSP_ReCaptcha ``` + ```bash bin/magento setup:upgrade ``` + ```bash bin/magento cache:clean ``` @@ -44,5 +46,5 @@ See the [Magento Admin User Guide](https://docs.magento.com/m2/ce/user_guide/sto The extension supports a command line option for disabling reCAPTCHA. Use this command when you cannot access the Magento Admin UI. ```bash -php bin/magento msp:security:recaptcha:disable +bin/magento msp:security:recaptcha:disable ``` diff --git a/guides/v2.1/security/two-factor-authentication.md b/guides/v2.1/security/two-factor-authentication.md index 17d3e36efa9..8571d1a1db9 100644 --- a/guides/v2.1/security/two-factor-authentication.md +++ b/guides/v2.1/security/two-factor-authentication.md @@ -31,9 +31,11 @@ To complete installation in an existing Magento instance, run the following comm ```bash bin/magento module:enable --all ``` + ```bash bin/magento setup:upgrade ``` + ```bash bin/magento cache:clean ``` diff --git a/guides/v2.1/test/js/jasmine.md b/guides/v2.1/test/js/jasmine.md index d44ec442e92..c88d10f5bc7 100644 --- a/guides/v2.1/test/js/jasmine.md +++ b/guides/v2.1/test/js/jasmine.md @@ -31,7 +31,7 @@ npm install {:#prepare-step6} ```bash -php bin/magento setup:static-content:deploy -f +bin/magento setup:static-content:deploy -f ``` Note that normally you don't have permissions to `/app/code/`, in fact the generated static view file is being tested. diff --git a/guides/v2.2/cloud/configure/setup-b2b.md b/guides/v2.2/cloud/configure/setup-b2b.md index 8106ae28997..df8955758ab 100644 --- a/guides/v2.2/cloud/configure/setup-b2b.md +++ b/guides/v2.2/cloud/configure/setup-b2b.md @@ -34,7 +34,7 @@ You need to add the module to `composer.json`. All extensions and modules must b 1. Open a terminal application. 2. Change to your local development environment root directory. -1. Install the B2B module using composer. +3. Install the B2B module using composer. ```bash composer require magento/extension-b2b @@ -44,7 +44,7 @@ You need to add the module to `composer.json`. All extensions and modules must b InvalidArgumentException - Could not find package magento/extension-b2b at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability. -1. Add and commit the updated `composer.json` and `composer.lock` files. +4. Add and commit the updated `composer.json` and `composer.lock` files. ```bash git add composer.json composer.lock && git commit -a -m "install b2b module" @@ -55,8 +55,9 @@ You need to add the module to `composer.json`. All extensions and modules must b 6. Complete the upgrade with B2B using the following command: + ```bash php bin/magento setup:upgrade - + ``` If you have a config.php file as part of your deployment, you should also add the B2B module in the modules section of the file. @@ -65,9 +66,14 @@ If you have a config.php file as part of your deployment, you should also add th 3. In the modules list, add the B2B module. 4. Save the file and update Git. + ```bash git add -f app/etc/config.php + ``` + + ```bash git commit -a -m “Add config.php.” - + ``` + ## Configure and use B2B {#use} For additional information on using and configuring B2B, review the [Magento B2B User Guide](http://docs.magento.com/m2/b2b/user_guide/getting-started.html). To extend functionality, see the [Magento B2B Developer Guide]({{ site.baseurl }}/guides/v2.2/b2b/bk-b2b.html). diff --git a/guides/v2.2/cloud/howtos/install-components.md b/guides/v2.2/cloud/howtos/install-components.md index 82ec1dc2a6e..71ccd653648 100644 --- a/guides/v2.2/cloud/howtos/install-components.md +++ b/guides/v2.2/cloud/howtos/install-components.md @@ -54,6 +54,9 @@ To update `composer.json`: ```bash composer require : --no-update + ``` + + ```bash composer update ``` @@ -61,6 +64,9 @@ To update `composer.json`: ```bash composer require pixlee/magento2:1.0.1 --no-update + ``` + + ```bash composer update ``` @@ -69,7 +75,13 @@ To update `composer.json`: ```bash git add -A + ``` + + ```bash git commit -m "" + ``` + + ```bash git push magento ``` diff --git a/guides/v2.2/cloud/project/project-upgrade.md b/guides/v2.2/cloud/project/project-upgrade.md index cc43929dad4..4c81f87d366 100644 --- a/guides/v2.2/cloud/project/project-upgrade.md +++ b/guides/v2.2/cloud/project/project-upgrade.md @@ -117,7 +117,7 @@ If you are upgrading to 2.2.X, you need to also update your [.magento.app.yaml]( 1. Verify the upgrade in your Integration, Staging, or Production environment by using SSH to log in and check the version. ```bash - php bin/magento --version + php bin/magento --version ``` ## Create a new config.php file diff --git a/guides/v2.2/comp-mgr/cli/cli-upgrade.md b/guides/v2.2/comp-mgr/cli/cli-upgrade.md index fe1798e5c27..9d1a7e7b149 100644 --- a/guides/v2.2/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.2/comp-mgr/cli/cli-upgrade.md @@ -19,7 +19,7 @@ If you cloned the Magento 2 GitHub repository, you **cannot** use this method to ## Prerequisite: `pub` directory root {#upgrade-cli-pub} -This section applies to you *only* if you set the Magento root directory to `/pub`. +This section applies to you *only* if you set the Magento root directory to `/pub`. If you did not do this, skip this section and continue with the next section. If you use pub as your Magento root directory: @@ -41,7 +41,7 @@ To enable maintenance mode: 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Enter the following command: ```bash - php /bin/magento maintenance:enable + php /bin/magento maintenance:enable ``` For additional options, see [Enable or disable maintenance mode]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-maint.html). @@ -96,20 +96,27 @@ To enable maintenance mode: If you use a cache storage other than filesystem (e.g., Redis, Memcached, etc.) you need to manually clear the cache there too. 6. Update the database schema and data: + ```bash php bin/magento setup:upgrade ``` + 7. Put your storefront online (that is, cancel maintenance mode): + ```bash php bin/magento maintenance:disable ``` + 8. Restart Varnish if you use it for page caching. + ```bash service varnish restart ``` + 9. Access your storefront. The following error might display: + ```terminal We're sorry, an error has occurred while generating this email. ``` @@ -118,6 +125,6 @@ To enable maintenance mode: 1. Reset [file system ownership and permissions]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html) as a user with `root` privileges. 2. Clear the following directories and try again: - * `/var/cache` - * `/var/page_cache` - * `/generated/code` + * `/var/cache` + * `/var/page_cache` + * `/generated/code` diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands-cache.md b/guides/v2.2/config-guide/cli/config-cli-subcommands-cache.md index e73e8842d4d..5fe207197a9 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands-cache.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands-cache.md @@ -100,12 +100,15 @@ Magento 2 has the following {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30 To view the status of the cache, enter - bin/magento cache:status +```bash +bin/magento cache:status +``` A sample follows: +```terminal config: 1 layout: 1 block_html: 1 @@ -117,18 +120,21 @@ A sample follows: config_integration: 1 config_integration_api: 1 config_webservice: 1 +``` ## Enable or disable cache types {#config-cli-subcommands-cache-en} This command enables you to enable or disable all cache types or only the ones you specify. Disabling cache types is useful during development because you see the results of your changes without having to flush the cache; however, disabling cache types has an adverse effect on performance. {:.bs-callout .bs-callout-info} -Starting in version 2.2, you can enable or disable cache types _only_ using the command line. Before doing so, you must manually make `/app/etc/env.php` writeable by the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html). You can clean (also referred to as _flush_ or _refresh_) cache types using either the command line or the {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %}. +Starting in version 2.2, you can enable or disable cache types _only_ using the command line. Before doing so, you must manually make `/app/etc/env.php` writeable by the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html). You can clean (also referred to as _flush_ or _refresh_) cache types using either the command line or the {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %}. Command options: - bin/magento cache:enable [type] ... [type] - bin/magento cache:disable [type] ... [type] +```bash +bin/magento cache:enable [type] ... [type] +bin/magento cache:disable [type] ... [type] +``` Where omitting `[type]` enables or disables all cache types at the same time. The `type` option is a space-separated list of cache types. @@ -136,17 +142,23 @@ Where omitting `[type]` enables or disables all cache types at the same time. Th To list cache types and their status: - bin/magento cache:status +```bash +bin/magento cache:status +``` For example, to disable the full page cache and the DDL cache: - bin/magento cache:disable db_ddl full_page +```bash +bin/magento cache:disable db_ddl full_page +``` Sample result: +```terminal Changed cache status: db_ddl: 1 -> 0 full_page: 1 -> 0 +``` {:.bs-callout .bs-callout-info} Enabling a {% glossarytooltip 65f9a5a1-79ee-4f27-aac7-29abe24db40d %}cache type{% endglossarytooltip %} automatically clears that cache type. @@ -168,15 +180,20 @@ Flush cache types if you've already tried cleaning the cache and you're still ha Command usage: - bin/magento cache:clean [type] ... [type] - bin/magento cache:flush [type] ... [type] +```bash +bin/magento cache:clean [type] ... [type] +bin/magento cache:flush [type] ... [type] +``` Where `[type]` is a space-separated list of cache types. Omitting `[type]` cleans or flushes all cache types at the same time. For example, to flush all cache types, enter - bin/magento cache:flush +```bash +bin/magento cache:flush +``` Sample result: +```terminal Flushed cache types: config layout @@ -189,6 +206,7 @@ Sample result: config_integration config_integration_api config_webservice +``` {:.bs-callout .bs-callout-info} You can also clean and flush cache types in the {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %}. Go to **System** > **Tools** > **Cache Management**. **Flush Cache Storage** is equivalent to `bin/magento cache:flush`. **Flush Magento Cache** is equivalent to `bin/magento cache:clean`. diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands-compiler.md b/guides/v2.2/config-guide/cli/config-cli-subcommands-compiler.md index 04bad6fc14a..fb83cfe4166 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands-compiler.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands-compiler.md @@ -25,9 +25,11 @@ The Magento software does not support the multi-tenant compiler, which includes #### To run the single-tenant compiler: {#config-cli-subcommands-single} -``` +```bash bin/magento setup:di:compile +``` +```terminal Generated code and dependency injection configuration successfully. ``` @@ -37,8 +39,8 @@ In some cases, you might want to compile code before you install the Magento app 1. Enable the modules. - ``` - php bin/magento module:enable --all [-c|--clear-static-content] + ```bash + bin/magento module:enable --all [-c|--clear-static-content] ``` Use the `[-c|--clear-static-content]` option to clear {% glossarytooltip a3e37235-4e8b-464f-a19d-4a120560206a %}static content{% endglossarytooltip %}. This is necessary if you previously enabled or disabled modules and you must clear the static content previously generated for them. @@ -47,9 +49,11 @@ In some cases, you might want to compile code before you install the Magento app 1. Compile the code. - ``` + ```bash bin/magento setup:di:compile + ``` + ```terminal Generated code and dependency injection configuration successfully. ``` diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands-index.md b/guides/v2.2/config-guide/cli/config-cli-subcommands-index.md index dafd825cb06..6019cdb4ae6 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands-index.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands-index.md @@ -138,11 +138,11 @@ If you want to use parallelization you need to set one of available modes of dim For example, to set the mode by website run: ```bash -php bin/magento indexer:set-dimensions-mode catalog_product_price website +bin/magento indexer:set-dimensions-mode catalog_product_price website ``` To check the current mode you can use next command: ```bash -php bin/magento indexer:show-dimensions-mode +bin/magento indexer:show-dimensions-mode ``` To reindex in parallel mode, run the reindex command using the environment variable `MAGE_INDEXER_THREADS_COUNT`, or add an environment variable to `env.php`. This variable sets the number of threads for the reindex processing. diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands-mode.md b/guides/v2.2/config-guide/cli/config-cli-subcommands-mode.md index 6f256472a74..5a0127b7436 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands-mode.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands-mode.md @@ -50,7 +50,7 @@ bin/magento deploy:mode:show A message similar to the following displays: -``` +```terminal Current application mode: {mode}. (Note: Environment variables may override this value.) ``` @@ -125,15 +125,17 @@ When you change from production to developer mode, you should clear generated cl 1. If you're changing from production mode to developer mode, delete the contents of the `generated/code` and `generated/metadata` directories: - rm -rf /generated/metadata/* /generated/code/* + rm -rf /generated/metadata/* /generated/code/* 2. Set the mode: - bin/magento deploy:mode:set developer + ```bash + bin/magento deploy:mode:set developer + ``` - The following message displays: +The following message displays: - Enabled developer mode. + Enabled developer mode. ### Change to default mode diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands-perf-data.md b/guides/v2.2/config-guide/cli/config-cli-subcommands-perf-data.md index 9913ee2d7e6..359bf3766a9 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands-perf-data.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands-perf-data.md @@ -25,7 +25,7 @@ In addition to the command arguments discussed here, see [Common arguments]({{ p The following table provides details about the data generator profiles (small, medium, large, and extra large). -Profiles are located in `/setup/performance-toolkit/profiles/` +Profiles are located in `/setup/performance-toolkit/profiles/` For example, `/var/www/html/magento2/setup/performance-toolkit/profiles/ce` diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.md b/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.md index fce57ae07fc..fbb20595d12 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.md @@ -18,7 +18,7 @@ The term *static view file* refers to the following: - "Static" means it can be cached for a site (that is, the file is not dynamically generated). Examples include images and {% glossarytooltip 6c5cb4e9-9197-46f2-ba79-6147d9bfe66d %}CSS{% endglossarytooltip %} generated from LESS. - "View" refers to presentation layer (from MVC). -Static view files are located in the `/pub/static` directory, and some are cached in the `/var/view_preprocessed` directory as well. +Static view files are located in the `/pub/static` directory, and some are cached in the `/var/view_preprocessed` directory as well. Static view files deployment is affected by Magento modes as follows: @@ -35,8 +35,8 @@ You must write static view files to the Magento file system manually using the c To deploy static view files: 1. Log in to the Magento server as, or [switch to]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html), the {% glossarytooltip 5e7de323-626b-4d1b-a7e5-c8d13a92c5d3 %}Magento file system owner{% endglossarytooltip %}. -2. Delete the contents of `/pub/static`, except for the `.htaccess` file. Do not delete this file. -3. Run the static view files deployment tool `/bin/magento setup:static-content:deploy`. +2. Delete the contents of `/pub/static`, except for the `.htaccess` file. Do not delete this file. +3. Run the static view files deployment tool `/bin/magento setup:static-content:deploy`. {:.bs-callout .bs-callout-info} @@ -341,7 +341,7 @@ Use the following steps: - [Setup wizard]({{ page.baseurl }}/install-gde/install/web/install-web.html) 2. Log in to the Magento server as, or [switch to]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html), the Magento file system owner. -3. Delete the contents of `/pub/static` directory, except for the `.htaccess` file. Do not delete this file. +3. Delete the contents of `/pub/static` directory, except for the `.htaccess` file. Do not delete this file. 4. [Run the static view files deployment tool](#config-cli-subcommands-staticview). ## Tip for developers customizing the static content deployment tool diff --git a/guides/v2.2/config-guide/cli/config-cli-subcommands.md b/guides/v2.2/config-guide/cli/config-cli-subcommands.md index e58a376fa58..cd1e1468a86 100644 --- a/guides/v2.2/config-guide/cli/config-cli-subcommands.md +++ b/guides/v2.2/config-guide/cli/config-cli-subcommands.md @@ -15,7 +15,7 @@ functional_areas: 1. Log in to the Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. Change to the following directory: - cd /bin + cd /bin Examples: @@ -25,7 +25,7 @@ functional_areas: You can run the commands in any of the following ways: - `php magento ` - `./magento ` -- `magento ` (after [adding](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) `/bin` to your system `PATH`) +- `magento ` (after [adding](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables) `/bin` to your system `PATH`) ## Command summary {#config-cli-summary} diff --git a/guides/v2.2/config-guide/deployment/pipeline/example/cli.md b/guides/v2.2/config-guide/deployment/pipeline/example/cli.md index 40219d9f835..61503087e25 100644 --- a/guides/v2.2/config-guide/deployment/pipeline/example/cli.md +++ b/guides/v2.2/config-guide/deployment/pipeline/example/cli.md @@ -126,7 +126,7 @@ Use the following CLI commands to set system-specific and sensitive configuratio To set the system-specific setting **Default Email Domain**, which is in the default scope, use the following command: ```bash -php bin/magento config:set customer/create_account/email_domain +bin/magento config:set customer/create_account/email_domain ``` You don't need to use the scope in the command because it's the default scope. @@ -136,7 +136,7 @@ To set values for **Send Emails To**, however, you must know the scope type (`we Example: ``` unix -php bin/magento config:sensitive:set contact/email/recipient_email --scope=website --scope-code= +bin/magento config:sensitive:set contact/email/recipient_email --scope=website --scope-code= ``` ### Update the shared settings {#config-split-verify-shared} diff --git a/guides/v2.2/config-guide/deployment/pipeline/production-system.md b/guides/v2.2/config-guide/deployment/pipeline/production-system.md index 1179a2cbc5e..64de4ae3102 100644 --- a/guides/v2.2/config-guide/deployment/pipeline/production-system.md +++ b/guides/v2.2/config-guide/deployment/pipeline/production-system.md @@ -70,15 +70,15 @@ To set sensitive values: 4. Change to the Magento installation directory. 5. Enter the following command: - php bin/magento config:sensitive:set {configuration path} {value} + bin/magento config:sensitive:set {configuration path} {value} For example, to set the value of the YouTube API key to `1234`, enter - php bin/magento config:sensitive:set catalog/product_video/youtube_api_key 1234 + bin/magento config:sensitive:set catalog/product_video/youtube_api_key 1234 You can also set one or more values interactively as follows: - php bin/magento config:sensitive:set -i + bin/magento config:sensitive:set -i When prompted, enter a value for each sensitive setting or press Enter to skip a value and move to the next one. 6. To verify the value was set, log in to the Magento Admin. diff --git a/guides/v2.2/config-guide/deployment/pipeline/technical-details.md b/guides/v2.2/config-guide/deployment/pipeline/technical-details.md index 676c71c8769..a6016a7a903 100644 --- a/guides/v2.2/config-guide/deployment/pipeline/technical-details.md +++ b/guides/v2.2/config-guide/deployment/pipeline/technical-details.md @@ -157,7 +157,7 @@ This section shows examples of managing the configuration so you can see how cha This section shows the change made to `config.php` when you change the default weight unit using the Magento Admin (**Stores** > Settings > **Configuration** > General > **General** > **Locale Options**). -After you make the change in the Admin, run `php bin/magento app:config:dump` to write the value to `config.php`. The value is written to the `general` array under `locale` as the following snippet from `config.php` shows: +After you make the change in the Admin, run `bin/magento app:config:dump` to write the value to `config.php`. The value is written to the `general` array under `locale` as the following snippet from `config.php` shows: ```php 'general' => @@ -179,7 +179,7 @@ This section discusses making the following configuration changes: * Changing the default email domain (**Stores** > Settings > **Configuration** > Customers > **Customer Configuration**) * Setting the PayPal API Username and API password (**Stores** > Settings > **Configuration** > Sales > **Payment Methods** > **PayPal** > **Required PayPal Settings**) -After you make the change in the Admin, run `php bin/magento app:config:dump` on your development system. This time, not all of your changes are written to `config.php`; in fact, only the website, store, and store view are written to that file as the following snippets show. +After you make the change in the Admin, run `bin/magento app:config:dump` on your development system. This time, not all of your changes are written to `config.php`; in fact, only the website, store, and store view are written to that file as the following snippets show. #### config.php @@ -269,8 +269,8 @@ The default email domain system-specific configuration setting is written to `ap The PayPal settings are written to neither file because the `magento app:config:dump` command does not write sensitive settings. You must set the PayPal settings on the production system using the following commands: - php bin/magento config:sensitive:set paypal/wpp/api_username - php bin/magento config:sensitive:set paypal/wpp/api_password + bin/magento config:sensitive:set paypal/wpp/api_username + bin/magento config:sensitive:set paypal/wpp/api_password ## Prerequisite for your development, build, and production systems {#config-deploy-prereq} diff --git a/guides/v2.2/config-guide/deployment/single-machine.md b/guides/v2.2/config-guide/deployment/single-machine.md index 3679857f87b..9a9ffa2f672 100644 --- a/guides/v2.2/config-guide/deployment/single-machine.md +++ b/guides/v2.2/config-guide/deployment/single-machine.md @@ -35,7 +35,7 @@ Contributing developers should use [this guide][6] to update their Magento insta 3. Enable maintenance mode using the command: - php bin/magento maintenance:enable + bin/magento maintenance:enable 4. Apply updates to Magento or its components using the following command pattern: diff --git a/guides/v2.2/config-guide/prod/prod_file-sys-perms.md b/guides/v2.2/config-guide/prod/prod_file-sys-perms.md index c61394e00e0..12d00d01268 100644 --- a/guides/v2.2/config-guide/prod/prod_file-sys-perms.md +++ b/guides/v2.2/config-guide/prod/prod_file-sys-perms.md @@ -69,7 +69,7 @@ To remove write permissions to files and directories from the web server user's 1. Change to production mode. ```bash - php bin/magento deploy:mode:set production + bin/magento deploy:mode:set production ``` 1. Remove write permissions to the following directories. @@ -138,7 +138,7 @@ To set `setgid` and permissions for developer mode: 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Enter the following commands in the order shown: - cd + cd find var generated pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated pub/static pub/media app/etc -type d -exec chmod g+ws {} + ### Two Magento file system owners in production mode {#mage-owner-two-prod} @@ -163,7 +163,7 @@ To remove writable permissions to files and directories from the web server user 2. Change to your Magento installation directory. 3. As the Magento file system owner, enter the following command to change to production mode: - php bin/magento deploy:mode:set production + bin/magento deploy:mode:set production 3. Enter the following command as a user with `root` privileges: find app/code lib pub/static app/etc generated/code generated/metadata var/view_preprocessed \( -type d -or -type f \) -exec chmod g-w {} + && chmod o-rwx app/etc/env.php diff --git a/guides/v2.2/config-guide/redis/redis-session.md b/guides/v2.2/config-guide/redis/redis-session.md index 5b9145b6722..825215a43b2 100644 --- a/guides/v2.2/config-guide/redis/redis-session.md +++ b/guides/v2.2/config-guide/redis/redis-session.md @@ -59,7 +59,7 @@ bin/magento setup:config:set --session-save=redis --session-save-redis-host=127. ### Result -Magento adds lines similar to the following to `app/etc/env.php`: +Magento adds lines similar to the following to `app/etc/env.php`: ```php?start_inline=1 'session' => diff --git a/guides/v2.2/config-guide/varnish/config-varnish.md b/guides/v2.2/config-guide/varnish/config-varnish.md index 0ad6e74638f..ccca38cd9b6 100644 --- a/guides/v2.2/config-guide/varnish/config-varnish.md +++ b/guides/v2.2/config-guide/varnish/config-varnish.md @@ -62,7 +62,7 @@ The process can be summarized as follows: 3. Replace your existing Varnish configuration file with the one generated by the Admin. 3. Test everything again. - If there is nothing in your `/var/page_cache` directory, you've successfully configured Varnish with Magento! + If there is nothing in your `/var/page_cache` directory, you've successfully configured Varnish with Magento! {:.bs-callout .bs-callout-info #info} * Except where noted, you must enter all commands discussed in this topic as a user with `root` privileges. @@ -76,7 +76,7 @@ We know of the following issues with Varnish: As an alternative, use SSL termination or an [SSL termination proxy]. -* If you manually delete the contents of the `/var/cache` directory, you must restart Varnish. +* If you manually delete the contents of the `/var/cache` directory, you must restart Varnish. * Possible error installing Magento: diff --git a/guides/v2.2/extension-dev-guide/cache/partial-caching/database-caching.md b/guides/v2.2/extension-dev-guide/cache/partial-caching/database-caching.md index 0140a243e29..962f5d3a0bb 100644 --- a/guides/v2.2/extension-dev-guide/cache/partial-caching/database-caching.md +++ b/guides/v2.2/extension-dev-guide/cache/partial-caching/database-caching.md @@ -33,14 +33,14 @@ We provide [sample configurations] at the end of this topic. ## Database caching using the `default` cache frontend {#mage-cache-db-di} -To enable database caching using the `default` frontend, you must modify `/app/etc/di.xml`, which is the global deployment injection configuration for the Magento application. +To enable database caching using the `default` frontend, you must modify `/app/etc/di.xml`, which is the global deployment injection configuration for the Magento application. To modify `di.xml`: 1. Log in to the Magento server as, or switch to, the [Magento file system owner]. 2. Enter the following commands to make a copy of `di.xml`: - cd /app/etc + cd /app/etc cp di.xml di.xml.bak 3. Open `di.xml` in a text editor and locate the following block: @@ -105,12 +105,12 @@ This section discusses how to set up database caching with a custom {% glossaryt {:.bs-callout .bs-callout-info #info} Due to a known issue, a custom cache frontend still results in some objects being cached to the file system; however, fewer assets are cached compared to file system caching. -To enable database caching using a custom cache frontend, you must modify `/app/etc/env.php` as follows: +To enable database caching using a custom cache frontend, you must modify `/app/etc/env.php` as follows: 1. Log in to the Magento server as, or switch to, the [Magento file system owner]. 2. Enter the following commands to make a copy of `env.php`: - cd /app/etc + cd /app/etc cp env.php env.php.bak 3. Open `env.php` in a text editor and add the following anywhere, such as before `'cache_types' =>`: @@ -148,7 +148,7 @@ Use the following steps: 2. Clear the current cache directories: ```bash - rm -rf /var/cache/* /var/page_cache/* /generated/metadata/* /generated/code/* + rm -rf /var/cache/* /var/page_cache/* /generated/metadata/* /generated/code/* ``` 3. In a web browser, go to any cacheable page (such as the {% glossarytooltip 1a70d3ac-6bd9-475a-8937-5f80ca785c14 %}storefront{% endglossarytooltip %} front door page). @@ -156,8 +156,8 @@ Use the following steps: If exceptions display, verify `di.xml` syntax and try again. (To see exceptions in the browser, you must [enable developer mode].) 4. Enter the following commands: - ls /var/cache/* - ls /var/page_cache/* + ls /var/cache/* + ls /var/page_cache/* {:.bs-callout .bs-callout-info #info} Due to a known issue, a custom cache frontend still results in some objects being cached to the file system; however, fewer assets are cached compared to file system caching. diff --git a/guides/v2.2/extension-dev-guide/configuration/sensitive-and-environment-settings.md b/guides/v2.2/extension-dev-guide/configuration/sensitive-and-environment-settings.md index d65653599be..3da0f05ad7a 100644 --- a/guides/v2.2/extension-dev-guide/configuration/sensitive-and-environment-settings.md +++ b/guides/v2.2/extension-dev-guide/configuration/sensitive-and-environment-settings.md @@ -63,8 +63,13 @@ Add a reference to [`Magento\Config\Model\Config\TypePool`][typepool]{:target="_ After specifying the sensitive setting, use the following commands to verify it: - php bin/magento cache:clean - php bin/magento app:config:dump +```bash +bin/magento cache:clean +``` + +```bash +bin/magento app:config:dump +``` A message similar to the following is displayed: diff --git a/guides/v2.2/frontend-dev-guide/themes/js-bundling.md b/guides/v2.2/frontend-dev-guide/themes/js-bundling.md index 15d2c2f6298..df2d148ba56 100644 --- a/guides/v2.2/frontend-dev-guide/themes/js-bundling.md +++ b/guides/v2.2/frontend-dev-guide/themes/js-bundling.md @@ -16,7 +16,7 @@ JavaScript bundling does not work unless Magento is in [production mode][product 1. From the Magento root directory, switch to production mode: ```bash - php bin/magento deploy:mode:set production + bin/magento deploy:mode:set production ``` 2. Enable JavaScript bundling: diff --git a/guides/v2.2/frontend-dev-guide/themes/theme-create.md b/guides/v2.2/frontend-dev-guide/themes/theme-create.md index e2a4ce005a9..cd426056694 100644 --- a/guides/v2.2/frontend-dev-guide/themes/theme-create.md +++ b/guides/v2.2/frontend-dev-guide/themes/theme-create.md @@ -36,7 +36,7 @@ The high-level steps required to add a new theme in the Magento system are the f To create the directory for your theme: -1. Go to `/app/design/frontend`. +1. Go to `/app/design/frontend`. 3. Create a new directory named according to your vendor name: `/app/design/frontend/`. diff --git a/guides/v2.2/frontend-dev-guide/themes/theme-workflow.md b/guides/v2.2/frontend-dev-guide/themes/theme-workflow.md index 0cf5d1b413c..3ab21dc449c 100644 --- a/guides/v2.2/frontend-dev-guide/themes/theme-workflow.md +++ b/guides/v2.2/frontend-dev-guide/themes/theme-workflow.md @@ -14,7 +14,7 @@ Continue From: In the Magento root directory, run: ```php -php bin/magento deploy:mode:set developer +bin/magento deploy:mode:set developer ``` See: @@ -24,7 +24,7 @@ See: {:.bs-callout .bs-callout-tip} To check the current mode of your Magento instance, in the root directory, run: ```bash -php bin/magento deploy:mode:show +bin/magento deploy:mode:show ``` ### Create basic theme files @@ -97,7 +97,7 @@ When you finish developing and your styles are ready to go to production, you ca In the Magento root directory, run: ```php -php bin/magento deploy:mode:set production +bin/magento deploy:mode:set production ``` See [Magento modes]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode) for details. diff --git a/guides/v2.2/howdoi/php/php_clear-dirs.md b/guides/v2.2/howdoi/php/php_clear-dirs.md index 618803828b7..15a5bfaebe5 100644 --- a/guides/v2.2/howdoi/php/php_clear-dirs.md +++ b/guides/v2.2/howdoi/php/php_clear-dirs.md @@ -50,7 +50,7 @@ The following table provides guidelines on what you should clear and when. To only clear directories and not perform other actions, log in to the Magento server as the Magento file system owner and clear directories using a command like the following: - rm -rf /generated/metadata/* /generated/code/* + rm -rf /generated/metadata/* /generated/code/* You can also use the following command-line tools clear some directories for you. These commands perform other tasks as well; consult the linked documentation for more details. diff --git a/guides/v2.2/install-gde/install-quick-ref.md b/guides/v2.2/install-gde/install-quick-ref.md index bf873e76ff6..2be61e04fe5 100644 --- a/guides/v2.2/install-gde/install-quick-ref.md +++ b/guides/v2.2/install-gde/install-quick-ref.md @@ -99,7 +99,7 @@ The following example shows how to install using the command line with the follo Optionally switch to [developer mode]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-mode.html). - cd /bin + cd /bin php magento deploy:mode:set developer {% endcollapsible %} diff --git a/guides/v2.2/install-gde/install/cli/dev_downgrade.md b/guides/v2.2/install-gde/install/cli/dev_downgrade.md index 173096a733c..b25d3c0a012 100644 --- a/guides/v2.2/install-gde/install/cli/dev_downgrade.md +++ b/guides/v2.2/install-gde/install/cli/dev_downgrade.md @@ -56,7 +56,7 @@ To change versions after cloning: 2. Create a [new database instance]({{ page.baseurl }}/install-gde/prereq/mysql.html#instgde-prereq-mysql-config) for your installation. 2. [Back up]({{ page.baseurl }}/install-gde/install/cli/install-cli-backup.html#instgde-cli-uninst-back) the Magento file system, database, and media files: - php /bin/magento setup:backup --code --media --db + php /bin/magento setup:backup --code --media --db 3. Change to [release tag](https://github.com/magento/magento2/tags) as follows: git checkout tags/ [-b ] @@ -67,7 +67,7 @@ To change versions after cloning: 4. Manually clear Magento `var` directories: - rm -rf /var/cache/* /var/page_cache/* /generated/code/* + rm -rf /var/cache/* /var/page_cache/* /generated/code/* 5. Install the Magento software in your new database instance. You can install using either the [command line]({{ page.baseurl }}/install-gde/install/cli/install-cli-install.html) or [Setup Wizard]({{ page.baseurl }}/install-gde/install/web/install-web.html). diff --git a/guides/v2.2/install-gde/trouble/tshoot_exceptions.md b/guides/v2.2/install-gde/trouble/tshoot_exceptions.md index be021ab7314..5e36b8f5d78 100644 --- a/guides/v2.2/install-gde/trouble/tshoot_exceptions.md +++ b/guides/v2.2/install-gde/trouble/tshoot_exceptions.md @@ -30,8 +30,8 @@ functional_areas: #### Solution -Clear the `/generated/code` and other directories under `var` and `generated` as follows: +Clear the `/generated/code` and other directories under `var` and `generated` as follows: - rm -rf /generated/code/* /generated/metadata/* /var/cache/* + rm -rf /generated/code/* /generated/metadata/* /var/cache/* After clearing the directories, try the installation again. diff --git a/guides/v2.2/install-gde/trouble/tshoot_sample-data.md b/guides/v2.2/install-gde/trouble/tshoot_sample-data.md index 231a872eaba..d846261b970 100644 --- a/guides/v2.2/install-gde/trouble/tshoot_sample-data.md +++ b/guides/v2.2/install-gde/trouble/tshoot_sample-data.md @@ -43,10 +43,10 @@ Don't install sample data in production mode. Switch to developer mode and clear Enter the following commands in the order shown as the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html): - cd - php bin/magento deploy:mode:set developer + cd + bin/magento deploy:mode:set developer rm -rf generated/code/* generated/metadata/* - php bin/magento sampledata:deploy + bin/magento sampledata:deploy ### Symptom (security) {#trouble-samp-secy} @@ -71,7 +71,7 @@ Other errors display, such as: There are known issues with using sample data with the Magento 2 develop branch. Use the master branch instead. You can switch to the master branch as follows: - cd + cd git checkout master git pull origin master diff --git a/guides/v2.2/migration/migration-tool-install.md b/guides/v2.2/migration/migration-tool-install.md index e8e1fe90815..3a815eb658d 100644 --- a/guides/v2.2/migration/migration-tool-install.md +++ b/guides/v2.2/migration/migration-tool-install.md @@ -17,7 +17,7 @@ Make sure you are using *the same released version* of both Magento 2 and the Da If you downloaded the Magento software using a {% glossarytooltip d85e2d0a-221f-4d03-aa43-0cda9f50809e %}Composer{% endglossarytooltip %} metapackage, enter the following command: - php /bin/magento --version + php /bin/magento --version #### GitHub repository diff --git a/guides/v2.2/test/js/jasmine.md b/guides/v2.2/test/js/jasmine.md index ab0e0a9f0e1..dc086f75efc 100644 --- a/guides/v2.2/test/js/jasmine.md +++ b/guides/v2.2/test/js/jasmine.md @@ -28,7 +28,7 @@ npm install {:#prepare-step6} ```bash -php bin/magento setup:static-content:deploy -f +bin/magento setup:static-content:deploy -f ``` Note that normally you don't have permissions to `/app/code/`, in fact the generated static view file is being tested. diff --git a/guides/v2.3/cloud/project/project-upgrade.md b/guides/v2.3/cloud/project/project-upgrade.md index 171b1dabd50..f49da6e835e 100644 --- a/guides/v2.3/cloud/project/project-upgrade.md +++ b/guides/v2.3/cloud/project/project-upgrade.md @@ -52,7 +52,7 @@ If you use PHP version 7.2, you must remove the `mcrypt` extension from the [`ex 1. Verify the upgrade in your Integration, Staging, or Production environment by using SSH to log in and check the version. ```bash - php bin/magento --version + bin/magento --version ``` ## Verify and upgrade your extensions {#extensions} diff --git a/guides/v2.3/comp-mgr/cli/cli-upgrade.md b/guides/v2.3/comp-mgr/cli/cli-upgrade.md index fc2f08f2b0e..884a69475f1 100644 --- a/guides/v2.3/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.3/comp-mgr/cli/cli-upgrade.md @@ -31,12 +31,12 @@ If you cloned the Magento 2 GitHub repository, you **cannot** use this method to Complete the following prerequisites to prepare your environment before starting the upgrade process: * **Complete the Update and upgrade checklist**—To avoid possible errors during installation or upgrading, complete the [Update and upgrade checklist]. -* **Set the `pub` directory root**—If you set the Magento root directory to `/pub`, create another subdomain or docroot that uses the Magento installation directory as its root, and run the [System Upgrade utility] using that subdomain. +* **Set the `pub` directory root**—If you set the Magento root directory to `/pub`, create another subdomain or docroot that uses the Magento installation directory as its root, and run the [System Upgrade utility] using that subdomain. * **Check PHP and environment settings**—Verify that your PHP and other environment settings are compatible with the [system requirements]. * **Switch to maintenance mode**—To prevent access to your store while it's being upgraded, switch your store to maintenance mode: ```bash - php /bin/magento maintenance:enable + php /bin/magento maintenance:enable ``` See [Enable or disable maintenance mode] for additional options. @@ -195,13 +195,13 @@ If you use a cache storage other than the filesystem, such as Redis or Memcached ### Update the database schema and data ```bash -php bin/magento setup:upgrade +bin/magento setup:upgrade ``` ### Disable maintenance mode ```bash -php bin/magento maintenance:disable +bin/magento maintenance:disable ``` ### Restart Varnish @@ -220,9 +220,9 @@ If the application fails with a `We're sorry, an error has occurred while gener 1. Reset [file system ownership and permissions] as a user with `root` privileges. 1. Clear these directories: - * `/var/cache` - * `/var/page_cache` - * `/generated/code` + * `/var/cache` + * `/var/page_cache` + * `/generated/code` 1. Check your storefront in your web browser again. ## Upgrade using the script {#upgrade-cli-script} @@ -285,13 +285,13 @@ If you use a cache storage other than the filesystem, such as Redis or Memcached ### Update the database schema and data ```bash -php bin/magento setup:upgrade +bin/magento setup:upgrade ``` ### Disable maintenance mode ```bash -php bin/magento maintenance:disable +bin/magento maintenance:disable ``` ### Restart Varnish @@ -310,9 +310,9 @@ If the application fails with a `We're sorry, an error has occurred while gener 1. Reset [file system ownership and permissions] as a user with `root` privileges. 1. Clear these directories: - * `/var/cache` - * `/var/page_cache` - * `/generated/code` + * `/var/cache` + * `/var/page_cache` + * `/generated/code` 1. Check your storefront in your web browser again. diff --git a/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.md b/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.md index 6bed9804b62..32a9e80e437 100644 --- a/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.md +++ b/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.md @@ -65,7 +65,7 @@ config_integration_api: 1 This command enables you to enable or disable all cache types or only the ones you specify. Disabling cache types is useful during development because you see the results of your changes without having to flush the cache; however, disabling cache types has an adverse effect on performance. {:.bs-callout .bs-callout-info} -Starting in version 2.2, you can enable or disable cache types _only_ using the command line. Before doing so, you must manually make `/app/etc/env.php` writeable by the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html). +Starting in version 2.2, you can enable or disable cache types _only_ using the command line. Before doing so, you must manually make `/app/etc/env.php` writeable by the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html). You can clean (also referred to as _flush_ or _refresh_) cache types using either the command line or the {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %}. diff --git a/guides/v2.3/config-guide/cli/config-cli-subcommands-perf-data.md b/guides/v2.3/config-guide/cli/config-cli-subcommands-perf-data.md index da303484a44..4e4bd87f4f5 100644 --- a/guides/v2.3/config-guide/cli/config-cli-subcommands-perf-data.md +++ b/guides/v2.3/config-guide/cli/config-cli-subcommands-perf-data.md @@ -25,7 +25,7 @@ In addition to the command arguments discussed here, see [Common arguments]({{ p The following table provides details about the data generator profiles (small, medium, large, and extra large). -Profiles are located in `/setup/performance-toolkit/profiles/` +Profiles are located in `/setup/performance-toolkit/profiles/` For example, `/var/www/html/magento2/setup/performance-toolkit/profiles/ce` diff --git a/guides/v2.3/config-guide/elasticsearch/es-config-stopwords.md b/guides/v2.3/config-guide/elasticsearch/es-config-stopwords.md index 167958bca3b..673f0b65068 100644 --- a/guides/v2.3/config-guide/elasticsearch/es-config-stopwords.md +++ b/guides/v2.3/config-guide/elasticsearch/es-config-stopwords.md @@ -14,7 +14,7 @@ In general, *stopwords* are a language's most common words that search engines f Although we have more storage today, performance is still important. Elasticsearch, like other search engines, still use stopwords to improve performance. -You must manage your Elasticsearch stopwords using `.csv` files located in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory or the `/app/code/Magento/Elasticsearch/etc/stopwords/` directory, depending on how you installed the Magento software. +You must manage your Elasticsearch stopwords using `.csv` files located in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory or the `/app/code/Magento/Elasticsearch/etc/stopwords/` directory, depending on how you installed the Magento software. For more information about how Elasticsearch uses stopwords, see the following resources: @@ -25,7 +25,7 @@ For more information about how Elasticsearch uses stopwords, see the following r ## Configure stopwords {#config-stopwords} -Elasticsearch stopwords are located in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory. Magento ships with one `.csv` file containing stopwords for our default locales and an additional file, `stopwords.csv`, which has stopwords for any locale that is not represented by another `.csv` file. +Elasticsearch stopwords are located in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory. Magento ships with one `.csv` file containing stopwords for our default locales and an additional file, `stopwords.csv`, which has stopwords for any locale that is not represented by another `.csv` file. The default lifetime for stopwords file {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30645 %}cache{% endglossarytooltip %} is 15 minutes. @@ -40,7 +40,7 @@ To edit stopwords: 1. Log in to your Magento server, or switch to, the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/apache-user.html). -2. Use a text editor to open a stopword file in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory. +2. Use a text editor to open a stopword file in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory. `.csv` files use the naming convention `stopwords_.csv`. For example, the German stopword file is named `stopwords_de_DE.csv`. 3. Add words, remove words, or change words in the file. @@ -53,7 +53,7 @@ To edit stopwords: * Command line: As the Magento file system owner, enter the following command: - php /bin/magento magento cache:clean config + php /bin/magento magento cache:clean config 6. Check the results by searching for terms on your {% glossarytooltip 1a70d3ac-6bd9-475a-8937-5f80ca785c14 %}storefront{% endglossarytooltip %}. ### Create stopwords for a new locale {#config-create-stopwords} @@ -62,7 +62,7 @@ To add stopwords for a locale: 1. Log in to your Magento server, or switch to, the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/apache-user.html). -2. Use a text editor to create a stopword file named `stopwords_.csv` in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory. +2. Use a text editor to create a stopword file named `stopwords_.csv` in the `/vendor/magento/module-elasticsearch/etc/stopwords` directory. For example, to create stopwords for the Italian locale, name the file `stopwords_it_IT.csv`. @@ -83,15 +83,15 @@ To add stopwords for a locale: * Command line: As the Magento file system owner, enter the following command: - php /bin/magento magento cache:clean config + php /bin/magento magento cache:clean config 9. Check the results by searching for terms on your storefront. ## Change the stopword directory {#config-stopword-dir} This section discusses how to optionally change the default stopword directory from one of the following: -* `/vendor/magento/module-elasticsearch/etc/stopwords` -* `/app/code/Magento/Elasticsearch/etc/stopwords/` +* `/vendor/magento/module-elasticsearch/etc/stopwords` +* `/app/code/Magento/Elasticsearch/etc/stopwords/` The location depends on how you installed the Magento software. If you cloned the Magento 2 GitHub repository, the path is under `app/code`. If you installed a compressed archive or a metapackage, the path is under `vendor`. diff --git a/guides/v2.3/config-guide/redis/redis-session.md b/guides/v2.3/config-guide/redis/redis-session.md index 1223dcb295a..5d7452a896b 100644 --- a/guides/v2.3/config-guide/redis/redis-session.md +++ b/guides/v2.3/config-guide/redis/redis-session.md @@ -63,7 +63,7 @@ bin/magento setup:config:set --session-save=redis --session-save-redis-host=127. ### Result -Magento adds lines similar to the following to `app/etc/env.php`: +Magento adds lines similar to the following to `app/etc/env.php`: ```php 'session' => diff --git a/guides/v2.3/frontend-dev-guide/themes/theme-create.md b/guides/v2.3/frontend-dev-guide/themes/theme-create.md index 131989379b9..8871b19548e 100644 --- a/guides/v2.3/frontend-dev-guide/themes/theme-create.md +++ b/guides/v2.3/frontend-dev-guide/themes/theme-create.md @@ -36,7 +36,7 @@ The high-level steps required to add a new theme in the Magento system are the f To create the directory for your theme: -1. Go to `/app/design/frontend`. +1. Go to `/app/design/frontend`. 3. Create a new directory named according to your vendor name: `/app/design/frontend/`. diff --git a/guides/v2.3/install-gde/install-quick-ref.md b/guides/v2.3/install-gde/install-quick-ref.md index 8ad22253a3c..9d420741c35 100644 --- a/guides/v2.3/install-gde/install-quick-ref.md +++ b/guides/v2.3/install-gde/install-quick-ref.md @@ -99,7 +99,7 @@ The following example shows how to install using the command line with the follo Optionally switch to [developer mode]({{page.baseurl }}/config-guide/cli/config-cli-subcommands-mode.html). - cd /bin + cd /bin php magento deploy:mode:set developer {% endcollapsible %} diff --git a/guides/v2.3/install-gde/prereq/security.md b/guides/v2.3/install-gde/prereq/security.md index c1d14bec49d..89cac90774f 100644 --- a/guides/v2.3/install-gde/prereq/security.md +++ b/guides/v2.3/install-gde/prereq/security.md @@ -20,10 +20,10 @@ Magento has no recommendation about using SELinux; you can use it for enhanced s If you choose to enable SELinux, you might have issues running the installer unless you change the *security context* of some directories as follows: - chcon -R --type httpd_sys_rw_content_t /app/etc - chcon -R --type httpd_sys_rw_content_t /var - chcon -R --type httpd_sys_rw_content_t /pub/media - chcon -R --type httpd_sys_rw_content_t /pub/static + chcon -R --type httpd_sys_rw_content_t /app/etc + chcon -R --type httpd_sys_rw_content_t /var + chcon -R --type httpd_sys_rw_content_t /pub/media + chcon -R --type httpd_sys_rw_content_t /pub/static The preceding commands work only with the Apache web server. Because of the variety of configurations and security requirements, we don't guarantee these commands work in all situations. For more information, see: diff --git a/guides/v2.3/rest/tutorials/inventory/configure-environment.md b/guides/v2.3/rest/tutorials/inventory/configure-environment.md index 3c3cf796ccb..021262da13f 100644 --- a/guides/v2.3/rest/tutorials/inventory/configure-environment.md +++ b/guides/v2.3/rest/tutorials/inventory/configure-environment.md @@ -118,7 +118,7 @@ For this tutorial, we'll assume that payment and shipping methods are configured **Required:** Perform a full reindex and flush the cache. ```bash -bin/magento indexer:reindex && php bin/magento cache:flush +bin/magento indexer:reindex && bin/magento cache:flush ``` ## Verify this step diff --git a/guides/v2.3/security/google-recaptcha.md b/guides/v2.3/security/google-recaptcha.md index bd592891523..7504b950524 100644 --- a/guides/v2.3/security/google-recaptcha.md +++ b/guides/v2.3/security/google-recaptcha.md @@ -28,5 +28,5 @@ See the Magento Admin User Guide [Open Source](https://docs.magento.com/m2/ce/us The extension supports a command line option for disabling reCAPTCHA. Use this command when you cannot access the Magento Admin UI. ```bash -php bin/magento msp:security:recaptcha:disable +bin/magento msp:security:recaptcha:disable ```