From 131b426cd238a01cfefb62811274f3846a057ed7 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Wed, 17 Apr 2019 22:00:07 +0300 Subject: [PATCH 01/23] magento/devdocs#: Editing. Add bash syntax to command line - https://devdocs.magento.com/guides/v2.1/cloud/cdn/configure-fastly.html - https://devdocs.magento.com/guides/v2.2/cloud/cdn/configure-fastly.html - https://devdocs.magento.com/guides/v2.3/cloud/cdn/configure-fastly.html - https://devdocs.magento.com/guides/v2.1/cloud/howtos/sample-data.html - https://devdocs.magento.com/guides/v2.2/cloud/howtos/sample-data.html - https://devdocs.magento.com/guides/v2.3/cloud/howtos/sample-data.html - https://devdocs.magento.com/guides/v2.1/cloud/live/live-sanity-check.html - https://devdocs.magento.com/guides/v2.2/cloud/live/live-sanity-check.html - https://devdocs.magento.com/guides/v2.3/cloud/live/live-sanity-check.html - https://devdocs.magento.com/guides/v2.1/cloud/live/sens-data-initial.html - https://devdocs.magento.com/guides/v2.2/cloud/live/sens-data-initial.html - https://devdocs.magento.com/guides/v2.3/cloud/live/sens-data-initial.html - https://devdocs.magento.com/guides/v2.1/cloud/trouble/redis-troubleshooting.html - https://devdocs.magento.com/guides/v2.2/cloud/trouble/redis-troubleshooting.html - https://devdocs.magento.com/guides/v2.3/cloud/trouble/redis-troubleshooting.html - https://devdocs.magento.com/guides/v2.1/cloud/trouble/trouble-error-html-minification.html - https://devdocs.magento.com/guides/v2.2/cloud/trouble/trouble-error-html-minification.html - https://devdocs.magento.com/guides/v2.3/cloud/trouble/trouble-error-html-minification.html - https://devdocs.magento.com/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.html - https://devdocs.magento.com/guides/v2.2/comp-mgr/trouble/cman/ce-ee-upgrade.html - https://devdocs.magento.com/guides/v2.3/comp-mgr/trouble/cman/ce-ee-upgrade.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cache.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-compiler.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-compiler.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-i18n.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-i18n.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-spt-util.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-spt-util.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-static-view.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-urn.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-urn.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-urn.html - https://devdocs.magento.com/guides/v2.1/config-guide/prod/prod_file-sys-perms.html - https://devdocs.magento.com/guides/v2.2/config-guide/prod/prod_file-sys-perms.html - https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html - https://devdocs.magento.com/guides/v2.1/config-guide/solr/solr-magento.html - https://devdocs.magento.com/guides/v2.1/ext-best-practices/extension-coding/example-module-adminpage.html - https://devdocs.magento.com/guides/v2.1/extension-dev-guide/cli-cmds/cli-naming-guidelines.html - https://devdocs.magento.com/guides/v2.1/extension-dev-guide/prepare/lifecycle.html - https://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-images.html - https://devdocs.magento.com/guides/v2.1/install-gde/install/cli/dev_downgrade.html - https://devdocs.magento.com/guides/v2.1/install-gde/install/cli/dev_update-magento.html --- guides/v2.1/cloud/cdn/configure-fastly.md | 15 ++++-- guides/v2.1/cloud/howtos/sample-data.md | 17 +++++-- guides/v2.1/cloud/live/live-sanity-check.md | 20 ++++++-- guides/v2.1/cloud/live/sens-data-initial.md | 50 ++++++++++++++----- .../cloud/trouble/redis-troubleshooting.md | 10 +++- .../trouble-error-html-minification.md | 10 ++-- .../comp-mgr/trouble/cman/ce-ee-upgrade.md | 13 +++-- .../cli/config-cli-subcommands-cache.md | 34 ++++++++++--- .../cli/config-cli-subcommands-compiler.md | 18 +++++-- .../cli/config-cli-subcommands-i18n.md | 26 ++++++---- .../cli/config-cli-subcommands-spt-util.md | 18 +++++-- .../cli/config-cli-subcommands-static-view.md | 4 +- .../cli/config-cli-subcommands-urn.md | 4 +- .../config-guide/prod/prod_file-sys-perms.md | 28 +++++++---- guides/v2.1/config-guide/solr/solr-magento.md | 34 ++++++++----- .../example-module-adminpage.md | 12 ++--- .../cli-cmds/cli-naming-guidelines.md | 8 ++- .../extension-dev-guide/prepare/lifecycle.md | 4 +- .../frontend-dev-guide/themes/theme-images.md | 4 +- .../install-gde/install/cli/dev_downgrade.md | 30 ++++++++--- .../install/cli/dev_update-magento.md | 22 +++++--- .../cli/config-cli-subcommands-cache.md | 34 ++++++++++--- .../cli/config-cli-subcommands-compiler.md | 10 ++-- 23 files changed, 306 insertions(+), 119 deletions(-) diff --git a/guides/v2.1/cloud/cdn/configure-fastly.md b/guides/v2.1/cloud/cdn/configure-fastly.md index a076f4e918b..3b4d4589e6c 100644 --- a/guides/v2.1/cloud/cdn/configure-fastly.md +++ b/guides/v2.1/cloud/cdn/configure-fastly.md @@ -150,19 +150,24 @@ 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: +``` +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/howtos/sample-data.md b/guides/v2.1/cloud/howtos/sample-data.md index c2cac3deef1..bca5cc32d2c 100644 --- a/guides/v2.1/cloud/howtos/sample-data.md +++ b/guides/v2.1/cloud/howtos/sample-data.md @@ -27,16 +27,23 @@ 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" +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..8c491c04709 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. @@ -167,15 +170,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..7f51d228c84 100644 --- a/guides/v2.1/cloud/live/sens-data-initial.md +++ b/guides/v2.1/cloud/live/sens-data-initial.md @@ -78,6 +78,7 @@ This procedure corresponds to step 2 in the [recommended procedure]({{ page.base The following snippet from `config.local.php` shows an example of changing the default locale to `en_GB` and changing static file optimization settings: +```php
  'general' => [
      'locale' => [
@@ -104,6 +105,7 @@ The following snippet from `config.local.php` shows an example of changing the d
 
      ... more ...
 
+``` ## Push and deploy config.local.php to environments {#deploy} @@ -111,7 +113,9 @@ Now that you've created `config.local.php` and transferred it to your local work The following command adds, commits, and pushes to master: - git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master +```bash +git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master +``` Complete code deployment to Staging and Production. For Starter, you push to `staging` and `master` branches. For Production, you will need to SSH into your environments and push. For details on deployment commands, see [Deploy your store]({{ page.baseurl }}/cloud/live/stage-prod-live.html). @@ -154,13 +158,21 @@ To delete `config.local.php`: 1. On your local workstation, check out the `master` branch. 2. SSH to the integration server: - magento-cloud ssh +```bash +magento-cloud ssh +``` + 3. Delete `config.local.php`. - rm app/etc/config.local.php +```bash +rm app/etc/config.local.php +``` + 4. Close the SSH tunnel. - exit +```bash +exit +``` ### Change configuration values in Integration {#change-settings} @@ -189,24 +201,36 @@ To generate a new file: 1. On your local workstation, find the integration server's SSH URL. - magento-cloud environment:ssh --pipe +```bash +magento-cloud environment:ssh --pipe +``` + 2. Create `config.local.php` on the integration server. - ssh "php bin/magento magento-cloud:scd-dump" - - For example, +```bash +ssh "php bin/magento magento-cloud:scd-dump" +``` + +For example, + +```bash +ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "php bin/magento magento-cloud:scd-dump" +``` - ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "php bin/magento magento-cloud:scd-dump" 5. If you haven't done so already, change to the project root directory. 6. Transfer `config.local.php` to your local workstation. - - rsync :app/etc/config.local.php ./app/etc/config.local.php - + +```bash +rsync :app/etc/config.local.php ./app/etc/config.local.php +``` + ### Push the changes to Git {#push-again} To push your changes, enter the following command: - git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master +```bash +git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master +``` Wait for deployment to complete. diff --git a/guides/v2.1/cloud/trouble/redis-troubleshooting.md b/guides/v2.1/cloud/trouble/redis-troubleshooting.md index f55387ff1bf..75dc7b14839 100644 --- a/guides/v2.1/cloud/trouble/redis-troubleshooting.md +++ b/guides/v2.1/cloud/trouble/redis-troubleshooting.md @@ -50,7 +50,9 @@ For details on MCC and the update command, see [Composer]({{ page.baseurl }}/clo This information helps if you receive a number of Redis connection errors in your production logs during static content deployment. - Error: RedisException: read error on connection +```terminal +Error: RedisException: read error on connection +``` To resolve, we recommend enabling and using Configuration Management options to move your static content deployment from the Deploy to Build phase. @@ -61,6 +63,10 @@ If you continue to encounter these issues after using this method of deployment, 1. Remove all static content first from `pub/static/frontend/*` and also from `var/view_preprocessed`. 2. SSH to the server after deployment completes. -3. Run the following command to reduce deployment threads: `php bin/magento setup:static-content:deploy -j 1` +3. Run the following command to reduce deployment threads: + +```bash +php bin/magento setup:static-content:deploy -j 1 +``` You can also set an environment variable for single thread deployment by default: `STATIC_CONTENT_THREADS = 1`. diff --git a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md index 0553bcc079f..b3b285e4292 100644 --- a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md +++ b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md @@ -26,20 +26,24 @@ As a work-around, complete the following: 1. Copy the file `app/etc/config.local.php` to your local. 2. Edit and remove the minify section from `config.local.php`: - +```php 'template' => array ( 'allow_symlink' => '0', 'minify_html' => '1', ), +``` + 2. Modify the setting for minify in the database with this command: update core_config_data set value=0 where path ='dev/template/minify_html' 3. Flush all caches. +```bash +php bin/magento cache:flush +redis-cli -h <> -p <> flushall +``` - php bin/magento cache:flush - redis-cli -h <> -p <> flushall 4. Remove all `base_url` related items in `config.local.php`. 5. Save changes and complete full deployment of `config.local.php`: push to Git branch, build and deploy, and deploy across environments as needed. diff --git a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md index 18df1a0e64c..816e855caed 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md +++ b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md @@ -12,19 +12,22 @@ functional_areas: ### Problem: Error upgrading from CE to EE {#ce-ee} Your upgrade from **{{site.data.var.ce}}** to **{{site.data.var.ee}}** might fail with the following error: - +```terminal [2016-01-19 23:33:24 UTC] An error occurred while executing job "setup:upgrade {"command":"setup:upgrade"}": Could not complete setup:upgrade {"command":"setup:upgrade"} successfully: Source class "\Cybersource" for "CybersourceLogger" generation does not exist. - +``` If this error displays, resolve it as follows: 1. Log in to your Magento server as the {% glossarytooltip 5e7de323-626b-4d1b-a7e5-c8d13a92c5d3 %}Magento file system owner{% endglossarytooltip %}. 2. Enter the following commands in the order shown: - php /bin/magento setup:upgrade +```bash +php /bin/magento setup:upgrade +``` 3. After the command completes, verify your upgrade was successful: - - php bin/magento --version +```bash +php bin/magento --version +``` diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md index 3c2e61f0661..d89238c7f7c 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md @@ -33,10 +33,13 @@ 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 @@ -48,6 +51,7 @@ A sample follows: config_integration: 1 config_integration_api: 1 config_webservice: 1 +``` ## Enable or disable cache types {#config-cli-subcommands-cache-en} @@ -55,24 +59,32 @@ This command enables you to enable or disable all cache types or only the ones y 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. 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. @@ -94,15 +106,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: - bin/magento cache:flush +```bash +bin/magento cache:flush +``` Sample result: +```terminal Flushed cache types: config layout @@ -115,6 +132,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.1/config-guide/cli/config-cli-subcommands-compiler.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md index cc1dac10212..93da16d8b6d 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md @@ -29,11 +29,15 @@ In this release, the Magento software doesn't support the multi-tenant compiler Run the command as follows (there are no options): - bin/magento setup:di:compile +```bash +bin/magento setup:di:compile +``` The following message displays to confirm success: - Generated code and dependency injection configuration successfully. +```terminal +Generated code and dependency injection configuration successfully. +``` ## Optional. Compile code before installing the Magento application {#config-cli-subcommands-single-before} @@ -41,7 +45,9 @@ In some cases, you might want to compile code before you install the Magento app The following command enables all modules: - php bin/magento module:enable --all [-c|--clear-static-content] +```bash +php bin/magento module:enable --all [-c|--clear-static-content] +``` Use the optional `[-c|--clear-static-content]` option to clear {% glossarytooltip a3e37235-4e8b-464f-a19d-4a120560206a %}static content{% endglossarytooltip %}. This is necessary if you've previously enabled or disabled modules and you must clear static content previously generated for them. @@ -53,8 +59,12 @@ Use this command to compile code. Run the command as follows (there are no options): - bin/magento setup:di:compile +```bash +bin/magento setup:di:compile +``` The following message displays to confirm success: +```terminal Generated code and dependency injection configuration successfully. +``` \ No newline at end of file diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md index 903e4407a5e..30778b26bf8 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md @@ -43,7 +43,9 @@ You have options for using the translated dictionary: Command options: - bin/magento i18n:collect-phrases [-o|--output=""] [-m|--magento] +```bash +bin/magento i18n:collect-phrases [-o|--output=""] [-m|--magento] +``` The following table explains this command's parameters and values: @@ -99,7 +101,9 @@ This section discusses how to create a language package, which writes `.csv` fil Command usage: - bin/magento i18n:pack [-m|--mode={merge|replace}] [-d|--allow-duplicates] +```bash +bin/magento i18n:pack [-m|--mode={merge|replace}] [-d|--allow-duplicates] +``` The following table explains this command's parameters and values: @@ -214,8 +218,9 @@ The following sections provide end-to-end examples of using the commands discuss To add a German translation to a module or theme that you want to distribute to other merchants: 1. Collect phrases from your module: - - bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/code/ExampleCorp/SampleModule/i18n/xx_YY.csv" /var/www/html/magento2/app/code/ExampleCorp/SampleModule +```bash +bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/code/ExampleCorp/SampleModule/i18n/xx_YY.csv" /var/www/html/magento2/app/code/ExampleCorp/SampleModule +``` {:.bs-callout .bs-callout-info} The .csv file name must _exactly match_ the locale, including the characters' case. @@ -228,16 +233,19 @@ To add a German translation to a module or theme that you want to distribute to Similar to the preceding example, generate a `.csv` file, but instead of specifying a module or theme directory, specify the entire Magento application root directory. The resulting `.csv` contains any phrases that the command could find in the code. 1. Collect phrases from your module: +```bash +bin/magento i18n:collect-phrases -o "/var/www/html/magento2/xx_YY.csv" -m +``` - bin/magento i18n:collect-phrases -o "/var/www/html/magento2/xx_YY.csv" -m - - {:.bs-callout .bs-callout-info} - The `.csv` file name must _exactly match_ the locale, including the characters' case. +{:.bs-callout .bs-callout-info} +The `.csv` file name must _exactly match_ the locale, including the characters' case. 1. Translate the words and phrases using [these guidelines](#config-cli-subcommands-xlate-dict-trans). 1. Create the language package. - bin/magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY +```bash +bin/magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY +``` 1. Create a directory for the language package. diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md index a3c125c8fa3..5b14b53ceed 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md @@ -37,7 +37,9 @@ This command backs up code and compresses it in `tar.gz` format. Command options: - bin/magento support:backup:code [--name=] [-o|--output=] [-l|--logs] +```bash +bin/magento support:backup:code [--name=] [-o|--output=] [-l|--logs] +``` Where: @@ -47,7 +49,9 @@ Where: For example, to create a code backup named `/var/www/html/magento2/var/log/mycodebackup.tar.gz`: - bin/magento support:backup:code --name mycodebackup -o /var/www/html/magento2/var/log +```bash +bin/magento support:backup:code --name mycodebackup -o /var/www/html/magento2/var/log +``` After the command completes, provide the code backup to Magento Support. @@ -59,7 +63,9 @@ This command backs up the Magento database and compresses it in `tar.gz` format. Command options: - bin/magento support:backup:db [--name=] [-o|--output=] [-l|--logs] [-i|--ignore-sanitize] +```bash +bin/magento support:backup:db [--name=] [-o|--output=] [-l|--logs] [-i|--ignore-sanitize] +``` Where: @@ -76,7 +82,9 @@ After the command completes, provide the database backup to Magento Support. We provide commands that display paths to utilities required by the Data Collector and the command line. You can use these commands, for example, if errors like the following display in the {% glossarytooltip 29ddb393-ca22-4df9-a8d4-0024d75739b1 %}Admin{% endglossarytooltip %} or on the command line: - Utility lsof not found +```terminal +Utility lsof not found +``` Run the following commands in the order shown to display the paths to the applications used by the support utilities and Data Collector: @@ -92,6 +100,7 @@ Run the following commands in the order shown to display the paths to the applic A sample follows: +```terminal gzip => /bin/gzip lsof => /usr/sbin/lsof mysqldump => /usr/bin/mysqldump @@ -101,5 +110,6 @@ A sample follows: sed => /bin/sed bash => /bin/bash mysql => /usr/bin/mysql +``` To resolve issues with running the tools, make sure these applications are installed and are in the web server user's `$PATH` environment variable. diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md index 36100d3c472..e0c99682553 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md @@ -46,7 +46,9 @@ To deploy static view files: Command options: - magento setup:static-content:deploy [] [-t|--theme[=""]] [--exclude-theme[=""]] [-l|--language[=""]] [--exclude-language[=""]] [-a|--area[=""]] [--exclude-area[=""]] [-j|--jobs[=""]] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [-d|--dry-run] +```bash +magento setup:static-content:deploy [] [-t|--theme[=""]] [--exclude-theme[=""]] [-l|--language[=""]] [--exclude-language[=""]] [-a|--area[=""]] [--exclude-area[=""]] [-j|--jobs[=""]] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [-d|--dry-run] +``` The following table explains this command's parameters and values. diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-urn.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-urn.md index 2db8dbb3ea6..3f527d13c3a 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-urn.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-urn.md @@ -31,6 +31,8 @@ Currently, only PhpStorm is supported. Command syntax: - bin/magento dev:urn-catalog:generate +```bash +bin/magento dev:urn-catalog:generate +``` Where `` is the path to your PhpStorm `misc.xml` file, which is located relative to your project root. Typically, `` is `.idea/misc.xml`. diff --git a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md index 5ea21517f0b..804e0a0d942 100644 --- a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md +++ b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md @@ -70,14 +70,15 @@ 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 - ``` +```bash +php bin/magento deploy:mode:set production +``` 1. Remove write permissions to the following directories. - ```bash - find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type f -or -type d \) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php && chmod u+x bin/magento +```bash +find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type f -or -type d \) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php && chmod u+x bin/magento +``` #### Make code files and directories writable: @@ -87,7 +88,9 @@ To make files and directories writable so you can update components and upgrade 2. Change to your Magento installation directory. 3. Enter the following commands: - chmod -R u+w . +```bash +chmod -R u+w . +``` ### Optionally set `magento_umask` @@ -164,10 +167,15 @@ 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 +```bash +php 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 var/generation var/di var/view_preprocessed vendor \( -type d -or -type f \) -exec chmod g-w {} + && chmod o-rwx app/etc/env.php +```bash +find app/code lib pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type d -or -type f \) -exec chmod g-w {} + && chmod o-rwx app/etc/env.php +``` #### Make code files and directories writable: @@ -177,6 +185,8 @@ To make files and directories writable so you can update components and upgrade 2. Change to your Magento installation directory. 3. Enter the following command: - find app/code lib var pub/static pub/media vendor app/etc \( -type d -or -type f \) -exec chmod g+w {} + && chmod o+rwx app/etc/env.php +```bash +find app/code lib var pub/static pub/media vendor app/etc \( -type d -or -type f \) -exec chmod g+w {} + && chmod o+rwx app/etc/env.php +``` {% endcollapsibleh2 %} diff --git a/guides/v2.1/config-guide/solr/solr-magento.md b/guides/v2.1/config-guide/solr/solr-magento.md index 72cedd324d9..dcb1cfd159d 100644 --- a/guides/v2.1/config-guide/solr/solr-magento.md +++ b/guides/v2.1/config-guide/solr/solr-magento.md @@ -26,17 +26,21 @@ The example Solr configuration is _not_ intended to be used in a production site 1. As a user with root privileges, enter the following commands in the order shown to copy over the Solr configuration with the one packaged with {{site.data.var.ee}}: - cd /example/solr - cp -R collection1 magento2 - cd magento2 - cp -R /vendor/magento/module-solr/conf/* ./conf/ +```bash +cd /example/solr +cp -R collection1 magento2 +cd magento2 +cp -R /vendor/magento/module-solr/conf/* ./conf/ +``` For example, if Solr is installed in /opt/solr/solr-4.10.4 and {{site.data.var.ee}} is installed in /var/www/magento/html/magento2ee, enter: - cd /opt/solr/solr/solr-4.10.4/example/solr - cp -R collection1 magento2 - cd magento2 - cp -R /var/www/html/magento2ee/vendor/magento/module-solr/conf/* ./conf/ +```bash +cd /opt/solr/solr/solr-4.10.4/example/solr +cp -R collection1 magento2 +cd magento2 +cp -R /var/www/html/magento2ee/vendor/magento/module-solr/conf/* ./conf/ +``` {:.bs-callout .bs-callout-info} If you're prompted to overwrite files, try the command `\cp -R /vendor/magento/module-solr/conf/* .`. @@ -69,8 +73,10 @@ The example Solr configuration is _not_ intended to be used in a production site As a user with root privileges, enter the following command to start Solr: - cd /example - java -jar start.jar +```bash +cd /example +java -jar start.jar +``` {:.bs-callout .bs-callout-warning} This method for starting Solr is for convenience and testing purposes only. In a production environment, you should start and stop Solr using a script as discussed in [Script Solr startup and shutdown]({{ page.baseurl }}/config-guide/solr/solr-script.html#solr-script). @@ -185,11 +191,15 @@ To reindex using the command line: 1. Log in to your Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. Enter the following command to reindex all indexers: - php /bin/magento indexer:reindex +```bash +php /bin/magento indexer:reindex +``` Enter the following command to reindex the catalog search index only: - php /bin/magento indexer:reindex catalogsearch_fulltext +```bash +php /bin/magento indexer:reindex catalogsearch_fulltext +``` 3. Wait while the indexers are reindexed. diff --git a/guides/v2.1/ext-best-practices/extension-coding/example-module-adminpage.md b/guides/v2.1/ext-best-practices/extension-coding/example-module-adminpage.md index 0d7ac450d68..87f7f3f692d 100644 --- a/guides/v2.1/ext-best-practices/extension-coding/example-module-adminpage.md +++ b/guides/v2.1/ext-best-practices/extension-coding/example-module-adminpage.md @@ -20,9 +20,9 @@ Start by creating the working directory for all the module files. In your Magento development environment under the `app/code` directory, run the following command: -~~~ +```bash mkdir -p MyCompany/ExampleAdminNewPage -~~~ +``` This command creates the `MyCompany` company directory and the `ExampleAdminNewPage` module directory. The latter will be the root directory for the module we will create. @@ -153,9 +153,9 @@ Now that we have a link to the **Hello World** page, we need to create the file {:.no_toc} In the module's root directory, run the following command: -~~~ +```bash mkdir -p Controller/Adminhtml/HelloWorld -~~~ +``` Inside `Controller/Adminhtml/HelloWorld` directory, create the file `Index.php`. This file is the class assigned to the default Index action for the `HelloWorld` controller. Since the admin area serves this page, the file belongs in the `Adminhtml` directory, and the class itself extends [`\Magento\Backend\App\Action`]({{ site.mage2100url }}app/code/Magento/Backend/App/Action.php){:target="_blank"}. {% collapsible File content for Index.php %} @@ -204,10 +204,10 @@ Now that Magento knows how to handle requests for the **Hello World** page, we n Create the necessary directories for the files by running the following commands from the module's root directory: -~~~ +```bash mkdir -pm view/adminhtml/layout mkdir -pm view/adminhtml/templates -~~~ +``` These files belong in the `view/adminhtml` directory because the Magento admin area use these files during page generation. diff --git a/guides/v2.1/extension-dev-guide/cli-cmds/cli-naming-guidelines.md b/guides/v2.1/extension-dev-guide/cli-cmds/cli-naming-guidelines.md index 0f115dee33d..d2bdaf9ec44 100644 --- a/guides/v2.1/extension-dev-guide/cli-cmds/cli-naming-guidelines.md +++ b/guides/v2.1/extension-dev-guide/cli-cmds/cli-naming-guidelines.md @@ -26,7 +26,9 @@ For example, in `bin/magento setup:upgrade`, `bin/magento` is the command's name If you have a Magento installation handy, enter the following to display the current list of commands: - bin/magento list +```bash +bin/magento list +``` #### Format: `group:[subject:]action` @@ -72,7 +74,9 @@ Arguments are values passed by the user in a specified order. The argument name Example: +```bash magento dev:theme:create frontend vendor themename +``` where: @@ -105,10 +109,12 @@ An option can also have a one-letter shortcut as an alternative to its full name For example, +```bash magento dev:theme:create --parent=Magento/luma frontend arg1 arg2 magento dev:theme:create -p=Magento/luma frontend vendor themename magento dev:theme:create --extend-from=Magento/luma frontend vendor themename magento module:disable -f Magento_Cms +``` Where: diff --git a/guides/v2.1/extension-dev-guide/prepare/lifecycle.md b/guides/v2.1/extension-dev-guide/prepare/lifecycle.md index b543cf56088..426f6172306 100644 --- a/guides/v2.1/extension-dev-guide/prepare/lifecycle.md +++ b/guides/v2.1/extension-dev-guide/prepare/lifecycle.md @@ -250,7 +250,9 @@ class UpgradeData implements UpgradeDataInterface Magento executes the uninstall event class when your module is uninstalled using the [Component Manager] or with the following command line command: -`bin/magento module:uninstall --remove-data ` +```bash +bin/magento module:uninstall --remove-data +``` In this phase, your module should remove all traces of its existence in the database by dropping tables, deleting data, or restoring data. diff --git a/guides/v2.1/frontend-dev-guide/themes/theme-images.md b/guides/v2.1/frontend-dev-guide/themes/theme-images.md index 1edaeab75b0..257bd4218a0 100644 --- a/guides/v2.1/frontend-dev-guide/themes/theme-images.md +++ b/guides/v2.1/frontend-dev-guide/themes/theme-images.md @@ -246,7 +246,9 @@ Each image assigned to a product must be resized in accordance with image {% glo Command usage: -`php /bin/magento catalog:images:resize` +```bash +php /bin/magento catalog:images:resize +``` This command has no arguments or options. A progress indicator displays while the command runs. diff --git a/guides/v2.1/install-gde/install/cli/dev_downgrade.md b/guides/v2.1/install-gde/install/cli/dev_downgrade.md index 898704f4b51..42d258bbe8c 100644 --- a/guides/v2.1/install-gde/install/cli/dev_downgrade.md +++ b/guides/v2.1/install-gde/install/cli/dev_downgrade.md @@ -33,18 +33,28 @@ To change versions after cloning: 1. Log in to your Magento server as, or switch to, [the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. Use the following command to uninstall the Magento software: - php /bin/magento setup:uninstall +```bash +php /bin/magento setup:uninstall +``` + 3. Either remove your old Magento clone directory or [update the Magento software]({{ page.baseurl }}/install-gde/install/cli/dev_update-magento.html). 4. If you haven't already done so, clone the Magento 2 GitHub repository as follows: - git clone git@github.com:magento/magento2.git +```bash +git clone git@github.com:magento/magento2.git +``` + 5. Change to [release tag](https://github.com/magento/magento2/tags){:target="_blank"} as follows: - git checkout tags/ [-b ] +```bash +git checkout tags/ [-b ] +``` For example, to check out the 2.0.6 release tag in a new branch named `2.0.6`, enter - git checkout tags/2.0.6 -b 2.0.6 +```bash +git checkout tags/2.0.6 -b 2.0.6 +``` 5. Install the Magento software using 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). @@ -59,15 +69,21 @@ To change versions after cloning: php /bin/magento setup:backup --code --media --db 3. Change to [release tag](https://github.com/magento/magento2/tags){:target="_blank"} as follows: - git checkout tags/ [-b ] +```bash +git checkout tags/ [-b ] +``` For example, to check out the 2.0.2 release tag in a new branch named `2.0.2`, enter - git checkout tags/2.0.2 -b 2.0.2 +```bash +git checkout tags/2.0.2 -b 2.0.2 +``` 4. Manually clear Magento `var` directories: - rm -rf /var/cache/* /var/page_cache/* /var/generation/* +```bash +rm -rf /var/cache/* /var/page_cache/* /var/generation/* +``` 5. Install the Magento software in your new database instance. diff --git a/guides/v2.1/install-gde/install/cli/dev_update-magento.md b/guides/v2.1/install-gde/install/cli/dev_update-magento.md index e83105499fe..9d886ada547 100644 --- a/guides/v2.1/install-gde/install/cli/dev_update-magento.md +++ b/guides/v2.1/install-gde/install/cli/dev_update-magento.md @@ -19,12 +19,16 @@ To update the Magento software if you're a contributing developer: 1. Log in to your Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 3. Save any changes you made to `composer.json` because the following steps will overwrite it: - cd - cp composer.json composer.json.old +```bash +cd +cp composer.json composer.json.old +``` 3. Update your local repository to get the latest code: - git pull origin develop +```bash +git pull origin develop +``` {:.bs-callout .bs-callout-info} If `git pull origin develop` fails, see [troubleshooting]({{ page.baseurl }}/install-gde/trouble/git/tshoot_git-pull-origin.html). @@ -32,12 +36,18 @@ To update the Magento software if you're a contributing developer: 3. Diff and merge your `composer.json.old` with `composer.json` installed with the Magento software. 4. Enter the following command: - composer update +```bash +composer update +``` 5. Update the Magento database: - /bin/magento setup:upgrade +```bash +/bin/magento setup:upgrade +``` 6. Clean the cache: - bin/magento cache:clean +```bash +bin/magento cache:clean +``` \ No newline at end of file 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..12fa719967a 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,6 +120,7 @@ A sample follows: config_integration: 1 config_integration_api: 1 config_webservice: 1 +``` ## Enable or disable cache types {#config-cli-subcommands-cache-en} @@ -127,8 +131,10 @@ Starting in version 2.2, you can enable or disable cache types _only_ using the 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..0c5fc50538e 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,7 +39,7 @@ In some cases, you might want to compile code before you install the Magento app 1. Enable the modules. - ``` + ```bash php bin/magento module:enable --all [-c|--clear-static-content] ``` @@ -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. ``` From a2e058e457eb480ea74162801dd66a2283583be0 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Sat, 20 Apr 2019 00:23:27 +0300 Subject: [PATCH 02/23] magento/devdocs#: Format Bash 1. Replace with regarding Donald Booth comment --- .../cloud/before/before-setup-env-install.md | 2 +- guides/v2.1/comp-mgr/cli/cli-upgrade.md | 10 +++++----- .../comp-mgr/trouble/cman/ce-ee-upgrade.md | 2 +- .../v2.1/comp-mgr/trouble/cman/maint-mode.md | 4 ++-- .../comp-mgr/trouble/cman/tshoot_backup.md | 2 +- guides/v2.1/comp-mgr/trouble/cman/updater.md | 2 +- .../comp-mgr/trouble/cman/upgrade_51431.md | 18 +++++++++--------- guides/v2.1/comp-mgr/updater/update-updater.md | 2 +- .../bootstrap/magento-how-to-set.md | 4 ++-- guides/v2.1/config-guide/cache.md | 4 ++-- .../cli/config-cli-subcommands-less-sass.md | 2 +- .../cli/config-cli-subcommands-mode.md | 2 +- .../cli/config-cli-subcommands-perf-data.md | 2 +- .../cli/config-cli-subcommands-spt-util.md | 2 +- .../cli/config-cli-subcommands-static-view.md | 8 ++++---- .../config-guide/cli/config-cli-subcommands.md | 4 ++-- .../config-guide/db-profiler/db-profiler.md | 4 ++-- .../elasticsearch/es-config-stopwords.md | 16 ++++++++-------- .../config-guide/memcache/memcache_magento.md | 2 +- .../multi-master/multi-master_manual.md | 4 ++-- .../config-guide/prod/prod_file-sys-perms.md | 2 +- .../v2.1/config-guide/redis/redis-pg-cache.md | 2 +- .../v2.1/config-guide/redis/redis-session.md | 2 +- guides/v2.1/config-guide/secy/secy-cron.md | 6 +++--- guides/v2.1/config-guide/secy/secy-xframe.md | 2 +- guides/v2.1/config-guide/solr/solr-magento.md | 4 ++-- .../varnish/config-varnish-final.md | 4 ++-- .../config-guide/varnish/config-varnish.md | 4 ++-- .../build/module-load-order.md | 2 +- .../cache/partial-caching.md | 4 ++-- .../cache/partial-caching/database-caching.md | 14 +++++++------- .../extension-dev-guide/cli-cmds/cli-howto.md | 2 +- .../intro/intro-composer.md | 2 +- .../frontend-dev-guide/themes/theme-create.md | 2 +- guides/v2.1/get-started/gs-web-api-request.md | 2 +- guides/v2.1/howdoi/php/php_clear-dirs.md | 2 +- guides/v2.1/install-gde/install-quick-ref.md | 2 +- .../install-gde/install/cli/dev_downgrade.md | 4 ++-- .../install-gde/install/cli/dev_reinstall.md | 2 +- .../install/cli/dev_update-magento.md | 4 ++-- .../install/cli/install-cli-adminurl.md | 2 +- .../install/cli/install-cli-theme-uninstall.md | 2 +- .../install/cli/install-cli-uninstall-mods.md | 2 +- .../v2.1/install-gde/prereq/prereq_updater.md | 2 +- guides/v2.1/install-gde/prereq/security.md | 8 ++++---- .../install-gde/trouble/tshoot_exceptions.md | 4 ++-- .../trouble/tshoot_install_depend.md | 4 ++-- .../install-gde/trouble/tshoot_no-styles.md | 2 +- .../install-gde/trouble/tshoot_sample-data.md | 4 ++-- guides/v2.1/migration/migration-migrate.md | 2 +- .../v2.1/migration/migration-tool-install.md | 2 +- .../v2.1/migration/migration-tool-upgrade.md | 2 +- .../v2.1/release-notes/ReleaseNotes2.1.3CE.md | 2 +- .../v2.1/release-notes/ReleaseNotes2.1.3EE.md | 2 +- .../v2.1/release-notes/tech_bull_21-upgrade.md | 2 +- guides/v2.2/comp-mgr/cli/cli-upgrade.md | 10 +++++----- .../cli/config-cli-subcommands-cache.md | 2 +- .../cli/config-cli-subcommands-mode.md | 2 +- .../cli/config-cli-subcommands-perf-data.md | 2 +- .../cli/config-cli-subcommands-static-view.md | 8 ++++---- .../config-guide/cli/config-cli-subcommands.md | 4 ++-- .../config-guide/prod/prod_file-sys-perms.md | 2 +- .../v2.2/config-guide/redis/redis-session.md | 2 +- .../config-guide/varnish/config-varnish.md | 4 ++-- .../cache/partial-caching/database-caching.md | 14 +++++++------- .../frontend-dev-guide/themes/theme-create.md | 2 +- guides/v2.2/howdoi/php/php_clear-dirs.md | 2 +- guides/v2.2/install-gde/install-quick-ref.md | 2 +- .../install-gde/install/cli/dev_downgrade.md | 4 ++-- .../install-gde/trouble/tshoot_exceptions.md | 4 ++-- .../install-gde/trouble/tshoot_sample-data.md | 4 ++-- .../v2.2/migration/migration-tool-install.md | 2 +- guides/v2.3/comp-mgr/cli/cli-upgrade.md | 16 ++++++++-------- .../cli/config-cli-subcommands-cache.md | 2 +- .../cli/config-cli-subcommands-perf-data.md | 2 +- .../elasticsearch/es-config-stopwords.md | 16 ++++++++-------- .../v2.3/config-guide/redis/redis-session.md | 2 +- .../frontend-dev-guide/themes/theme-create.md | 2 +- guides/v2.3/install-gde/install-quick-ref.md | 2 +- guides/v2.3/install-gde/prereq/security.md | 8 ++++---- 80 files changed, 163 insertions(+), 163 deletions(-) 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..a210a8da8a5 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 diff --git a/guides/v2.1/comp-mgr/cli/cli-upgrade.md b/guides/v2.1/comp-mgr/cli/cli-upgrade.md index f676e697710..bb089ad4eb7 100644 --- a/guides/v2.1/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.1/comp-mgr/cli/cli-upgrade.md @@ -23,7 +23,7 @@ You can upgrade Magento from the command line if you installed the software usin ## 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: @@ -45,7 +45,7 @@ To enable maintenance mode: 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Enable maintenance mode: ```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). @@ -127,6 +127,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` - * `/var/generation` + * `/var/cache` + * `/var/page_cache` + * `/var/generation` diff --git a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md index 816e855caed..380dcf6085c 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md +++ b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md @@ -24,7 +24,7 @@ If this error displays, resolve it as follows: 2. Enter the following commands in the order shown: ```bash -php /bin/magento setup:upgrade +php /bin/magento setup:upgrade ``` 3. After the command completes, verify your upgrade was successful: diff --git a/guides/v2.1/comp-mgr/trouble/cman/maint-mode.md b/guides/v2.1/comp-mgr/trouble/cman/maint-mode.md index a9999c48e94..df4d5a2e76d 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/maint-mode.md +++ b/guides/v2.1/comp-mgr/trouble/cman/maint-mode.md @@ -27,7 +27,7 @@ See one of the following sections for more information: To create a maintenance page and redirect to it, first create a maintenance page named: * Apache: `/maintenance.html` -* nginx: `/maintenance.html` +* nginx: `/maintenance.html` Add to it the following contents: @@ -138,7 +138,7 @@ To redirect traffic to a custom maintenance page: } 4. Enter the following command: - touch /maintenance.enable + touch /maintenance.enable 3. Reload the nginx configuration: service nginx reload diff --git a/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md b/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md index 25abc3547f1..9b2a27326a4 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md +++ b/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md @@ -52,4 +52,4 @@ Unfortunately, we can't recommend anything specific because of the variety of er If the backup fails or if all backup tests fail, it's possible the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/apache-user.html) doesn't have sufficient privileges and ownership of the Magento file system. For example, another user might own the files or the files might be read-only. -Pay particular attention to file system permissions and ownership of the `/var` directory and subdirectories. For more information, see [Set file system permissions and ownership]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html) +Pay particular attention to file system permissions and ownership of the `/var` directory and subdirectories. For more information, see [Set file system permissions and ownership]({{ page.baseurl }}/install-gde/prereq/file-system-perms.html) diff --git a/guides/v2.1/comp-mgr/trouble/cman/updater.md b/guides/v2.1/comp-mgr/trouble/cman/updater.md index 3ec1a0fd41c..17244076925 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/updater.md +++ b/guides/v2.1/comp-mgr/trouble/cman/updater.md @@ -14,4 +14,4 @@ If the updater application is not available, the following message displays in t Updater application is not available. Please, download and install Updater application. -To resolve this issue, see if there is a `/update` directory that contains files and subdirectories. If not, see [Set up the updater]({{ page.baseurl }}/install-gde/prereq/prereq_updater.html). +To resolve this issue, see if there is a `/update` directory that contains files and subdirectories. If not, see [Set up the updater]({{ page.baseurl }}/install-gde/prereq/prereq_updater.html). diff --git a/guides/v2.1/comp-mgr/trouble/cman/upgrade_51431.md b/guides/v2.1/comp-mgr/trouble/cman/upgrade_51431.md index 391d627c60f..7d2156208a8 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/upgrade_51431.md +++ b/guides/v2.1/comp-mgr/trouble/cman/upgrade_51431.md @@ -39,21 +39,21 @@ To resolve these errors, perform the following tasks: If you don't have access to the Magento server file system, connect to it using an FTP application. 2. Remove the following files so you can upgrade again: - /var/.maintenance.flag - /var/.update_in_progress.flag - /var/cache/* - /var/page_cache/* - /var/generation/* + /var/.maintenance.flag + /var/.update_in_progress.flag + /var/cache/* + /var/page_cache/* + /var/generation/* 3. Run your upgrade again, making sure to complete _all tasks_ discussed in [Run System Upgrade]({{ page.baseurl }}/comp-mgr/upgrader/upgrade-start.html). ### `var/session` permissions failure {#compman-upgr-perms} -If your Magento application is set to write session data to the `/var/session` directory, you must set permissions on that directory before you upgrade. +If your Magento application is set to write session data to the `/var/session` directory, you must set permissions on that directory before you upgrade. [How to find where Magento stores session files]({{ page.baseurl }}/config-guide/sessions.html). -To verify whether or not sessions are stored in `/var/session`, log in to your Magento server, or switch to, [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/apache-user.html) and enter the following command: +To verify whether or not sessions are stored in `/var/session`, log in to your Magento server, or switch to, [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/apache-user.html) and enter the following command: ls /var/session @@ -70,7 +70,7 @@ To set file system permissions before upgrade: * One Magento user (typical of shared hosting): - cd + cd find var -type f -exec chmod u+w {} + find var -type d -exec chmod u+w {} + @@ -78,7 +78,7 @@ To set file system permissions before upgrade: * Two Magento users: - cd + cd find var -type f -exec chmod g+w {} + find var -type d -exec chmod g+ws {} + chown -R : . diff --git a/guides/v2.1/comp-mgr/updater/update-updater.md b/guides/v2.1/comp-mgr/updater/update-updater.md index b79ad993815..c2198e73e83 100644 --- a/guides/v2.1/comp-mgr/updater/update-updater.md +++ b/guides/v2.1/comp-mgr/updater/update-updater.md @@ -18,7 +18,7 @@ To update the updater application: For example, - mv /update /old_update + mv /update /old_update 3. Change to your Magento 2 installation directory and enter the following command: composer create-project magento/updater update --repository https://repo.magento.com diff --git a/guides/v2.1/config-guide/bootstrap/magento-how-to-set.md b/guides/v2.1/config-guide/bootstrap/magento-how-to-set.md index 2562ce5f9ad..3e8a2fea8b1 100644 --- a/guides/v2.1/config-guide/bootstrap/magento-how-to-set.md +++ b/guides/v2.1/config-guide/bootstrap/magento-how-to-set.md @@ -64,8 +64,8 @@ One way to set the Magento mode is by editing `.htaccess`. This way, you don't h You can modify `.htaccess` in any of the following locations, depending on your entry point to the Magento application: -* `/.htaccess` -* `/pub/.htaccess` +* `/.htaccess` +* `/pub/.htaccess` To set a variable: diff --git a/guides/v2.1/config-guide/cache.md b/guides/v2.1/config-guide/cache.md index 5837d169880..228cd52820c 100644 --- a/guides/v2.1/config-guide/cache.md +++ b/guides/v2.1/config-guide/cache.md @@ -31,8 +31,8 @@ Magento uses the following caching terminology: This topic discusses the following options for configuring caching: -* Modifying the provided `default` cache frontend, which means you modify only `/app/etc/di.xml` (the Magento application's global {% glossarytooltip 2be50595-c5c7-4b9d-911c-3bf2cd3f7beb %}dependency injection{% endglossarytooltip %} configuration) -* Configuring your own custom cache frontend, which means you modify only `/app/etc/env.php` because it overrides the equivalent configuration in `di.xml` +* Modifying the provided `default` cache frontend, which means you modify only `/app/etc/di.xml` (the Magento application's global {% glossarytooltip 2be50595-c5c7-4b9d-911c-3bf2cd3f7beb %}dependency injection{% endglossarytooltip %} configuration) +* Configuring your own custom cache frontend, which means you modify only `/app/etc/env.php` because it overrides the equivalent configuration in `di.xml` {:.bs-callout .bs-callout-info} Varnish requires no changes to the Magento configuration. For more information, see [Configure and use Varnish]({{ page.baseurl }}/config-guide/varnish/config-varnish.html). diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-less-sass.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-less-sass.md index 74ba4a8e29a..b4a5413baad 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-less-sass.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-less-sass.md @@ -59,7 +59,7 @@ The following table explains this command's parameters and values. -For example, to create LESS files for the frontend theme named `VendorName/themeName` in the `en_US` locale using a CSS file named `/pub/static/frontend/VendorName/themeName/en_US/css/styles-l.css`, enter the following command: +For example, to create LESS files for the frontend theme named `VendorName/themeName` in the `en_US` locale using a CSS file named `/pub/static/frontend/VendorName/themeName/en_US/css/styles-l.css`, enter the following command: bin/magento dev:source-theme:deploy --type="less" --locale="en_US" --area="frontend" --theme="VendorName/themeName" css/styles-l diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-mode.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-mode.md index f323f93a51d..974d501dcc7 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-mode.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-mode.md @@ -114,7 +114,7 @@ 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 `var/generation` and `var/di` directories: - rm -rf /var/di/* /var/generation/* + rm -rf /var/di/* /var/generation/* 2. Set the mode: diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-perf-data.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-perf-data.md index 621007ad903..57339876a94 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-perf-data.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-perf-data.md @@ -25,7 +25,7 @@ This gives you an idea about what the data looks like. 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.1/config-guide/cli/config-cli-subcommands-spt-util.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md index 5b14b53ceed..5edb4aaf9b0 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md @@ -95,7 +95,7 @@ Run the following commands in the order shown to display the paths to the applic {:.bs-callout .bs-callout-info} The commands run properly _only_ from your Magento installation directory. -2. `php bin/magento support:utility:paths` creates `/var/support/Paths.php`, which lists the paths to all application used by the utility. +2. `php bin/magento support:utility:paths` creates `/var/support/Paths.php`, which lists the paths to all application used by the utility. 3. `php bin/magento support:utility:check` displays the file system paths. A sample follows: diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md index e0c99682553..3f3e1f3952a 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.md @@ -19,7 +19,7 @@ _ "Static" means it can be cached for a site (that is, the file is not dynamical Examples include images and {% glossarytooltip 6c5cb4e9-9197-46f2-ba79-6147d9bfe66d %}CSS{% endglossarytooltip %} generated from LESS. - "View" refers to the 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: @@ -38,8 +38,8 @@ You can clean generated static view files in several ways. Refer to [Clean stati To deploy static view files: 1. Log in to the Magento server as, or [switch to], the {% glossarytooltip 5e7de323-626b-4d1b-a7e5-c8d13a92c5d3 %}Magento file system owner{% endglossarytooltip %}. -2. Delete the contents of `/pub/static`. -3. Run the static view files deployment tool `/bin/magento setup:static-content:deploy`. +2. Delete the contents of `/pub/static`. +3. Run the static view files deployment tool `/bin/magento setup:static-content:deploy`. {: .bs-callout .bs-callout-info } If you enable static view file merging in the Magento Admin, the `pub/static` directory system must be writable. @@ -106,7 +106,7 @@ Use the following steps: - [Setup wizard] 2. Log in to the Magento server as, or [switch to], the Magento file system owner. -3. Delete the contents of `/pub/static` directory. +3. Delete the contents of `/pub/static` directory. 4. [Run the static view files deployment tool]. {: .bs-callout .bs-callout-info} diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands.md b/guides/v2.1/config-guide/cli/config-cli-subcommands.md index e5d3d13a14b..fcd060a5afe 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands.md +++ b/guides/v2.1/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.1/config-guide/db-profiler/db-profiler.md b/guides/v2.1/config-guide/db-profiler/db-profiler.md index 5b00eff7813..12b1f4f9100 100644 --- a/guides/v2.1/config-guide/db-profiler/db-profiler.md +++ b/guides/v2.1/config-guide/db-profiler/db-profiler.md @@ -15,7 +15,7 @@ The Magento database profiler displays all queries executed on a page, including ## Step 1: Modify the deployment configuration -Modify `/app/etc/env.php` to add the following reference to the [database profiler class]({{ site.mage2000url }}lib/internal/Magento/Framework/DB/Profiler.php): +Modify `/app/etc/env.php` to add the following reference to the [database profiler class]({{ site.mage2000url }}lib/internal/Magento/Framework/DB/Profiler.php): ```php?start_inline=1 'profiler' => [ @@ -53,7 +53,7 @@ An example follows: ## Step 2: Configure the output -Configure the output in your Magento application boostrap file; this might be `/index.php` or it could be located in a web server virtual host configuration. +Configure the output in your Magento application boostrap file; this might be `/index.php` or it could be located in a web server virtual host configuration. The following example displays results in a three-column table: diff --git a/guides/v2.1/config-guide/elasticsearch/es-config-stopwords.md b/guides/v2.1/config-guide/elasticsearch/es-config-stopwords.md index 2eb0a98c8b3..565f956fa3a 100644 --- a/guides/v2.1/config-guide/elasticsearch/es-config-stopwords.md +++ b/guides/v2.1/config-guide/elasticsearch/es-config-stopwords.md @@ -15,7 +15,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: @@ -26,7 +26,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 @@ See one of the following topics for more information: To edit stopwords: 1. Log in to your Magento server, or switch to the [Magento file system owner]({{page.baseurl}}/install-gde/prereq/file-sys-perms-over.html#magento-file-system-owner). -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 %}.x ### Create stopwords for a new locale {#config-create-stopwords} @@ -61,7 +61,7 @@ To edit stopwords: 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/file-sys-perms-over.html#magento-file-system-owner). -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`. @@ -82,15 +82,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.1/config-guide/memcache/memcache_magento.md b/guides/v2.1/config-guide/memcache/memcache_magento.md index 60a91d04b56..4f9fad35784 100644 --- a/guides/v2.1/config-guide/memcache/memcache_magento.md +++ b/guides/v2.1/config-guide/memcache/memcache_magento.md @@ -9,7 +9,7 @@ functional_areas: To configure Magento to use memcache: -1. Open `/app/etc/env.php` in a text editor. +1. Open `/app/etc/env.php` in a text editor. 2. Locate the following: 'session' => diff --git a/guides/v2.1/config-guide/multi-master/multi-master_manual.md b/guides/v2.1/config-guide/multi-master/multi-master_manual.md index 08a264c67d9..bace65094d9 100644 --- a/guides/v2.1/config-guide/multi-master/multi-master_manual.md +++ b/guides/v2.1/config-guide/multi-master/multi-master_manual.md @@ -424,8 +424,8 @@ The final step in manually splitting databases is to add connection and resource 1. Log in to your Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. Back up your deployment configuration: - cp /app/etc/env.php /app/etc/env.php.orig -2. Open `/app/etc/env.php` in a text editor and update it using the guidelines discussed in the following sections. + cp /app/etc/env.php /app/etc/env.php.orig +2. Open `/app/etc/env.php` in a text editor and update it using the guidelines discussed in the following sections. ### Update database connections diff --git a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md index 804e0a0d942..341806b695c 100644 --- a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md +++ b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md @@ -141,7 +141,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 pub/static pub/media app/etc -type f -exec chmod g+w {} + find var pub/static pub/media app/etc -type d -exec chmod g+ws {} + diff --git a/guides/v2.1/config-guide/redis/redis-pg-cache.md b/guides/v2.1/config-guide/redis/redis-pg-cache.md index b1c8e9fdc32..f4e9461d7b1 100644 --- a/guides/v2.1/config-guide/redis/redis-pg-cache.md +++ b/guides/v2.1/config-guide/redis/redis-pg-cache.md @@ -15,7 +15,7 @@ Before you continue, [install Redis]({{ page.baseurl }}/config-guide/redis/confi Following is a sample configuration that causes Magento to use Redis for both the default cache (`default` array) and the full page cache (`page_cache` array). Magento's caching is implemented by [`Magento\Framework\App\CacheInterface`]({{ site.mage2000url }}lib/internal/Magento/Framework/App/CacheInterface.php). -Add a configuration similar to the following to `app/etc/env.php`: +Add a configuration similar to the following to `app/etc/env.php`: ```php?start_inline=1 'cache' => diff --git a/guides/v2.1/config-guide/redis/redis-session.md b/guides/v2.1/config-guide/redis/redis-session.md index 3580648f9c8..54444d6a3c9 100644 --- a/guides/v2.1/config-guide/redis/redis-session.md +++ b/guides/v2.1/config-guide/redis/redis-session.md @@ -16,7 +16,7 @@ You can use Redis for session storage in Magento versions 2.0.6 and later only. ## Configure Magento to use Redis for session storage {#config-redis-config} -Following is a sample configuration to add to `app/etc/env.php`: +Following is a sample configuration to add to `app/etc/env.php`: ```php?start_inline=1 'session' => diff --git a/guides/v2.1/config-guide/secy/secy-cron.md b/guides/v2.1/config-guide/secy/secy-cron.md index c3d451de956..f3e50342bb4 100644 --- a/guides/v2.1/config-guide/secy/secy-cron.md +++ b/guides/v2.1/config-guide/secy/secy-cron.md @@ -72,7 +72,7 @@ Contents of the file: To secure cron in Magento's `.htaccess` file: 1. Log in to your Magento server as, or switch to, the {% glossarytooltip 5e7de323-626b-4d1b-a7e5-c8d13a92c5d3 %}Magento file system owner{% endglossarytooltip %}. -2. Open `/pub/.htaccess` in a text editor. +2. Open `/pub/.htaccess` in a text editor. (Because `cron.php` is located in the `pub` directory, edit this `.htaccess` only.) @@ -219,8 +219,8 @@ If you're using an Apache web server, you must remove the restriction from the ` 1. Log in to your Magento server as a user with permissions to write to the Magento file system. 2. Open any of the following in a text editor (depending on your entry point to Magento): - /pub/.htaccess - /.htaccess + /pub/.htaccess + /.htaccess 3. Delete or comment out the following: diff --git a/guides/v2.1/config-guide/secy/secy-xframe.md b/guides/v2.1/config-guide/secy/secy-xframe.md index b4be3ddccdb..b1ad3f55576 100644 --- a/guides/v2.1/config-guide/secy/secy-xframe.md +++ b/guides/v2.1/config-guide/secy/secy-xframe.md @@ -25,7 +25,7 @@ The Chrome and Safari browsers do not support the `ALLOW-FROM` option. [Browser ## Implement `X-Frame-Options` -Set a value for `X-Frame-Options` in `/app/etc/env.php`. Following is the default value: +Set a value for `X-Frame-Options` in `/app/etc/env.php`. Following is the default value: 'x-frame-options' => 'SAMEORIGIN', diff --git a/guides/v2.1/config-guide/solr/solr-magento.md b/guides/v2.1/config-guide/solr/solr-magento.md index dcb1cfd159d..e235741d341 100644 --- a/guides/v2.1/config-guide/solr/solr-magento.md +++ b/guides/v2.1/config-guide/solr/solr-magento.md @@ -192,13 +192,13 @@ To reindex using the command line: 2. Enter the following command to reindex all indexers: ```bash -php /bin/magento indexer:reindex +php /bin/magento indexer:reindex ``` Enter the following command to reindex the catalog search index only: ```bash -php /bin/magento indexer:reindex catalogsearch_fulltext +php /bin/magento indexer:reindex catalogsearch_fulltext ``` 3. Wait while the indexers are reindexed. diff --git a/guides/v2.1/config-guide/varnish/config-varnish-final.md b/guides/v2.1/config-guide/varnish/config-varnish-final.md index beb3fcc6ad5..304ed2ef21c 100644 --- a/guides/v2.1/config-guide/varnish/config-varnish-final.md +++ b/guides/v2.1/config-guide/varnish/config-varnish-final.md @@ -54,12 +54,12 @@ For example, to use the Chrome inspector: ### Verify the Magento cache {#config-varnish-final-verify-cache} -Make sure the `/var/page_cache` directory is empty: +Make sure the `/var/page_cache` directory is empty: 1. Log in to your Magento server, or switch to, the {% glossarytooltip 5e7de323-626b-4d1b-a7e5-c8d13a92c5d3 %}Magento file system owner{% endglossarytooltip %}. 2. Enter the following command: - rm -rf /var/page_cache/* + rm -rf /var/page_cache/* 3. Access one or more cacheable Magento pages. 4. Check the `var/page_cache/` directory. diff --git a/guides/v2.1/config-guide/varnish/config-varnish.md b/guides/v2.1/config-guide/varnish/config-varnish.md index 5d0d716dbaa..df393ee0786 100644 --- a/guides/v2.1/config-guide/varnish/config-varnish.md +++ b/guides/v2.1/config-guide/varnish/config-varnish.md @@ -45,7 +45,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. @@ -59,7 +59,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.1/extension-dev-guide/build/module-load-order.md b/guides/v2.1/extension-dev-guide/build/module-load-order.md index 3b3471402a6..7c293592ef8 100644 --- a/guides/v2.1/extension-dev-guide/build/module-load-order.md +++ b/guides/v2.1/extension-dev-guide/build/module-load-order.md @@ -14,7 +14,7 @@ You may need to specify your component's dependency on other components or files If you know that your component's logic depends on something in another component, then you should add this component to `require` in `composer.json` and `` in `module.xml`. -You can check your module's load order from the `/app/etc/config.php` file after you've successfully set up Magento. This file is created dynamically at run time during set up. +You can check your module's load order from the `/app/etc/config.php` file after you've successfully set up Magento. This file is created dynamically at run time during set up. {: .bs-callout .bs-callout-info } If you change the component load order using ``, you must regenerate the component list in `config.php`; otherwise, the load order does not take effect. Currently, the only way to do this is to enable the component using [`magento module:enable `]({{ page.baseurl}}/install-gde/install/cli/install-cli-subcommands-enable.html#instgde-cli-subcommands-enable-disable), where `` is the component or components to which you added ``. diff --git a/guides/v2.1/extension-dev-guide/cache/partial-caching.md b/guides/v2.1/extension-dev-guide/cache/partial-caching.md index 0d8aa2ed092..8f9efd9e533 100644 --- a/guides/v2.1/extension-dev-guide/cache/partial-caching.md +++ b/guides/v2.1/extension-dev-guide/cache/partial-caching.md @@ -13,9 +13,9 @@ redirect_from: Magento uses [Zend_Cache](http://framework.zend.com/manual/1.12/en/zend.cache.html){:target="_blank"} to interact with the cache storage. However, Magento also has the [Magento\Cache]({{ site.mage2000url }}lib/internal/Magento/Framework/Cache){:target="_blank"} {% glossarytooltip 08968dbb-2eeb-45c7-ae95-ffca228a7575 %}library{% endglossarytooltip %} for implementing Magento-specific caching. These topics discuss how to configure caching and {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30645 %}cache{% endglossarytooltip %} types. {: .bs-callout .bs-callout-info } -By default, file system caching is enabled; no configuration is necessary to use it. This means the cache is located under `/var`. +By default, file system caching is enabled; no configuration is necessary to use it. This means the cache is located under `/var`. -To change the cache configuration, edit `/app/etc/env.php`. +To change the cache configuration, edit `/app/etc/env.php`. The cache configuration is an associative array similar to the following: diff --git a/guides/v2.1/extension-dev-guide/cache/partial-caching/database-caching.md b/guides/v2.1/extension-dev-guide/cache/partial-caching/database-caching.md index f7ce5f6cc8e..d3dff93a36a 100644 --- a/guides/v2.1/extension-dev-guide/cache/partial-caching/database-caching.md +++ b/guides/v2.1/extension-dev-guide/cache/partial-caching/database-caching.md @@ -30,14 +30,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: @@ -102,12 +102,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' =>`: @@ -145,7 +145,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). @@ -153,8 +153,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.1/extension-dev-guide/cli-cmds/cli-howto.md b/guides/v2.1/extension-dev-guide/cli-cmds/cli-howto.md index 346d3a3345d..ce452237cbc 100644 --- a/guides/v2.1/extension-dev-guide/cli-cmds/cli-howto.md +++ b/guides/v2.1/extension-dev-guide/cli-cmds/cli-howto.md @@ -53,7 +53,7 @@ Following is a summary of the process: 3. Clean the {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30645 %}cache{% endglossarytooltip %} and compiled code directories: - cd /var + cd /var rm -rf cache/* page_cache/* di/* generation/* ## Add CLI commands using the Composer autoloader {#cli-autoload} diff --git a/guides/v2.1/extension-dev-guide/intro/intro-composer.md b/guides/v2.1/extension-dev-guide/intro/intro-composer.md index 710b3e549a4..f301c9708a8 100644 --- a/guides/v2.1/extension-dev-guide/intro/intro-composer.md +++ b/guides/v2.1/extension-dev-guide/intro/intro-composer.md @@ -16,7 +16,7 @@ redirect_from: ## Links to Magento code The key to developing any {% glossarytooltip 3425e9ae-5edf-4fc6-b645-06023e9e5e5b %}Magento component{% endglossarytooltip %} is its [`composer.json`](https://getcomposer.org/doc/04-schema.md){:target="_blank"}, which specifies version and dependency information for a component, among other things. You can look at Magento 2 code, such as: -* Metapackage, look at `/composer.json`. +* Metapackage, look at `/composer.json`. * [Customer module]({{ site.mage2000url }}app/code/Magento/Customer/composer.json){:target="_blank"} * [Luma theme]({{ site.mage2000url }}app/design/frontend/Magento/luma/composer.json){:target="_blank"} * [en_us language package]({{ site.mage2000url }}app/i18n/magento/en_us/composer.json){:target="_blank"} diff --git a/guides/v2.1/frontend-dev-guide/themes/theme-create.md b/guides/v2.1/frontend-dev-guide/themes/theme-create.md index 6e0e0b7344d..66174aaf2a2 100644 --- a/guides/v2.1/frontend-dev-guide/themes/theme-create.md +++ b/guides/v2.1/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.1/get-started/gs-web-api-request.md b/guides/v2.1/get-started/gs-web-api-request.md index 8d3de7a4b76..1c18f6190d6 100644 --- a/guides/v2.1/get-started/gs-web-api-request.md +++ b/guides/v2.1/get-started/gs-web-api-request.md @@ -3,7 +3,7 @@ group: web-api title: Construct a request --- -To configure a web API, developers define some of the elements of each API call in the `/vendor///etc/webapi.xml` file, where `` is your vendor name (for example, `magento`) and `` is your module name (which exactly matches its definition in `composer.json`). For example, the web API for the Customer service is defined in the `/vendor/magento/module-customer/etc/webapi.xml` configuration file. Service data interfaces and builders define the required and optional parameters and the return values for the {% glossarytooltip 786086f2-622b-4007-97fe-2c19e5283035 %}API{% endglossarytooltip %} calls. +To configure a web API, developers define some of the elements of each API call in the `/vendor///etc/webapi.xml` file, where `` is your vendor name (for example, `magento`) and `` is your module name (which exactly matches its definition in `composer.json`). For example, the web API for the Customer service is defined in the `/vendor/magento/module-customer/etc/webapi.xml` configuration file. Service data interfaces and builders define the required and optional parameters and the return values for the {% glossarytooltip 786086f2-622b-4007-97fe-2c19e5283035 %}API{% endglossarytooltip %} calls. ## Overview {#request-overview} diff --git a/guides/v2.1/howdoi/php/php_clear-dirs.md b/guides/v2.1/howdoi/php/php_clear-dirs.md index 01c643db0e2..2bb6431eb64 100644 --- a/guides/v2.1/howdoi/php/php_clear-dirs.md +++ b/guides/v2.1/howdoi/php/php_clear-dirs.md @@ -98,7 +98,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 /var/di/* /var/generation/* + rm -rf /var/di/* /var/generation/* 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.1/install-gde/install-quick-ref.md b/guides/v2.1/install-gde/install-quick-ref.md index 4c17d5562fc..7e71b96e671 100644 --- a/guides/v2.1/install-gde/install-quick-ref.md +++ b/guides/v2.1/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.1/install-gde/install/cli/dev_downgrade.md b/guides/v2.1/install-gde/install/cli/dev_downgrade.md index 42d258bbe8c..2b833280710 100644 --- a/guides/v2.1/install-gde/install/cli/dev_downgrade.md +++ b/guides/v2.1/install-gde/install/cli/dev_downgrade.md @@ -66,7 +66,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){:target="_blank"} as follows: ```bash @@ -82,7 +82,7 @@ git checkout tags/2.0.2 -b 2.0.2 4. Manually clear Magento `var` directories: ```bash -rm -rf /var/cache/* /var/page_cache/* /var/generation/* +rm -rf /var/cache/* /var/page_cache/* /var/generation/* ``` 5. Install the Magento software in your new database instance. diff --git a/guides/v2.1/install-gde/install/cli/dev_reinstall.md b/guides/v2.1/install-gde/install/cli/dev_reinstall.md index 478e7e198d5..5725a2568b3 100644 --- a/guides/v2.1/install-gde/install/cli/dev_reinstall.md +++ b/guides/v2.1/install-gde/install/cli/dev_reinstall.md @@ -18,7 +18,7 @@ To reinstall the Magento software as a contributing developer: 2. Log in to your Magento server as a user with permissions to modify files in the Magento file system (for example, the [switch to the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 3. Make a backup copy of `composer.json` in your Magento installation directory: - cd + cd cp composer.json composer.json.bak 4. Open `composer.json` in a text editor. diff --git a/guides/v2.1/install-gde/install/cli/dev_update-magento.md b/guides/v2.1/install-gde/install/cli/dev_update-magento.md index 9d886ada547..c7bf277207a 100644 --- a/guides/v2.1/install-gde/install/cli/dev_update-magento.md +++ b/guides/v2.1/install-gde/install/cli/dev_update-magento.md @@ -20,7 +20,7 @@ To update the Magento software if you're a contributing developer: 3. Save any changes you made to `composer.json` because the following steps will overwrite it: ```bash -cd +cd cp composer.json composer.json.old ``` @@ -43,7 +43,7 @@ composer update 5. Update the Magento database: ```bash -/bin/magento setup:upgrade +/bin/magento setup:upgrade ``` 6. Clean the cache: diff --git a/guides/v2.1/install-gde/install/cli/install-cli-adminurl.md b/guides/v2.1/install-gde/install/cli/install-cli-adminurl.md index 1ad394a0474..3ed12b106ee 100644 --- a/guides/v2.1/install-gde/install/cli/install-cli-adminurl.md +++ b/guides/v2.1/install-gde/install/cli/install-cli-adminurl.md @@ -28,7 +28,7 @@ A sample result follows: Admin Panel URI: /admin_1wgrah -You can also view the Admin URI in `/app/etc/env.php`. A snippet follows: +You can also view the Admin URI in `/app/etc/env.php`. A snippet follows: ```php?startinline=1 'backend' => diff --git a/guides/v2.1/install-gde/install/cli/install-cli-theme-uninstall.md b/guides/v2.1/install-gde/install/cli/install-cli-theme-uninstall.md index 076d16b5f8c..cd8675ff3e2 100644 --- a/guides/v2.1/install-gde/install/cli/install-cli-theme-uninstall.md +++ b/guides/v2.1/install-gde/install/cli/install-cli-theme-uninstall.md @@ -11,7 +11,7 @@ functional_areas: ## Prerequisite {#instgde-install-uninst-theme-prereq} -Before you use this command, you must know the relative path to your theme. Themes are located in a subdirectory of `/app/design/`. You must specify the path to the theme starting with the area, which is either `frontend` (for storefront themes) or `adminhtml` (for {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %} themes). +Before you use this command, you must know the relative path to your theme. Themes are located in a subdirectory of `/app/design/`. You must specify the path to the theme starting with the area, which is either `frontend` (for storefront themes) or `adminhtml` (for {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %} themes). For example, the path to the Luma {% glossarytooltip d2093e4a-2b71-48a3-99b7-b32af7158019 %}theme{% endglossarytooltip %} provided with Magento 2 is `frontend/Magento/luma`. diff --git a/guides/v2.1/install-gde/install/cli/install-cli-uninstall-mods.md b/guides/v2.1/install-gde/install/cli/install-cli-uninstall-mods.md index e1b588ffb0f..c61b515c1c5 100644 --- a/guides/v2.1/install-gde/install/cli/install-cli-uninstall-mods.md +++ b/guides/v2.1/install-gde/install/cli/install-cli-uninstall-mods.md @@ -123,7 +123,7 @@ To restore the Magento codebase to the state at which you backed it up, use the magento setup:rollback [-c|--code-file=""] [-m|--media-file=""] [-d|--db-file=""] -where `` is the name of the backup file located in `/var/backups`. To display a list of backup files, enter `magento info:backups:list` +where `` is the name of the backup file located in `/var/backups`. To display a list of backup files, enter `magento info:backups:list` {:.bs-callout .bs-callout-warning} This command deletes the specified files or the database before restoring them. (For example, the --media-file option deletes media assets under `pub/media` before restoring from the specified rollback file.) Make sure you have made no changes to the file system or database that you want to keep before using this command. diff --git a/guides/v2.1/install-gde/prereq/prereq_updater.md b/guides/v2.1/install-gde/prereq/prereq_updater.md index fdb581e63e8..ffa16c64641 100644 --- a/guides/v2.1/install-gde/prereq/prereq_updater.md +++ b/guides/v2.1/install-gde/prereq/prereq_updater.md @@ -13,7 +13,7 @@ Learn more about the cron setup in [Configure the Magento application]. ## Clone the updater -Clone the [Magento 2 updater](https://github.com/magento/magento2-updater) to `/update`. +Clone the [Magento 2 updater](https://github.com/magento/magento2-updater) to `/update`. Example: diff --git a/guides/v2.1/install-gde/prereq/security.md b/guides/v2.1/install-gde/prereq/security.md index 1a7cbc88ac4..99ed47bfe02 100644 --- a/guides/v2.1/install-gde/prereq/security.md +++ b/guides/v2.1/install-gde/prereq/security.md @@ -20,10 +20,10 @@ functional_areas: 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.1/install-gde/trouble/tshoot_exceptions.md b/guides/v2.1/install-gde/trouble/tshoot_exceptions.md index fe1d1a929a5..e20c86c6a66 100644 --- a/guides/v2.1/install-gde/trouble/tshoot_exceptions.md +++ b/guides/v2.1/install-gde/trouble/tshoot_exceptions.md @@ -30,8 +30,8 @@ functional_areas: #### Solution -Clear the `/var/generation` and other directories under `var` as follows: +Clear the `/var/generation` and other directories under `var` as follows: - rm -rf /var/generation/* /var/di/* /var/cache/* + rm -rf /var/generation/* /var/di/* /var/cache/* After clearing the directories, try the installation again. diff --git a/guides/v2.1/install-gde/trouble/tshoot_install_depend.md b/guides/v2.1/install-gde/trouble/tshoot_install_depend.md index e664034f7ae..9e48e848a66 100644 --- a/guides/v2.1/install-gde/trouble/tshoot_install_depend.md +++ b/guides/v2.1/install-gde/trouble/tshoot_install_depend.md @@ -39,11 +39,11 @@ Dependencies not installed. Please run 'composer install' under /setup directory PHP Fatal error: Class 'Magento\Framework\Stdlib\DateTime\TimezoneInterface' not found in /var/www/html/magento2/app/bootstrap.php on line 56 {:.bs-callout .bs-callout-info} -If the Web Setup Wizard stops, informs you that the installation is incomplete, but does not display an error in the console log, the likely cause is you did not run composer install from the `/setup` directory. The entire message is `Installation is incomplete. Check the console log for errors before trying again.` +If the Web Setup Wizard stops, informs you that the installation is incomplete, but does not display an error in the console log, the likely cause is you did not run composer install from the `/setup` directory. The entire message is `Installation is incomplete. Check the console log for errors before trying again.` ### Description -You must run `composer install` from *both* the `` and `/setup` directories before installer. +You must run `composer install` from *both* the `` and `/setup` directories before installer. ### Suggestion diff --git a/guides/v2.1/install-gde/trouble/tshoot_no-styles.md b/guides/v2.1/install-gde/trouble/tshoot_no-styles.md index 12b55fc4c6e..ed791d5cc9f 100644 --- a/guides/v2.1/install-gde/trouble/tshoot_no-styles.md +++ b/guides/v2.1/install-gde/trouble/tshoot_no-styles.md @@ -11,7 +11,7 @@ functional_areas: The path to images and stylesheets is not correct, either because of an incorrect base {% glossarytooltip a05c59d3-77b9-47d0-92a1-2cbffe3f8622 %}URL{% endglossarytooltip %} or because server rewrites (CentOS, Ubuntu) are not set up properly. To confirm this is the case, use a web browser inspector to check the paths to static assets and verify those assets are located on the Magento file system. -Magento static assets are located under `/pub/static/`, within the `frontend` and `adminhtml` directories). +Magento static assets are located under `/pub/static/`, within the `frontend` and `adminhtml` directories). ### Solution diff --git a/guides/v2.1/install-gde/trouble/tshoot_sample-data.md b/guides/v2.1/install-gde/trouble/tshoot_sample-data.md index 127b1995a67..4a3a6405672 100644 --- a/guides/v2.1/install-gde/trouble/tshoot_sample-data.md +++ b/guides/v2.1/install-gde/trouble/tshoot_sample-data.md @@ -46,7 +46,7 @@ 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 + cd php bin/magento deploy:mode:set developer rm -rf var/generation/* var/di/* php bin/magento sampledata:deploy @@ -74,7 +74,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.1/migration/migration-migrate.md b/guides/v2.1/migration/migration-migrate.md index cd200438a39..1f47c38cd9f 100644 --- a/guides/v2.1/migration/migration-migrate.md +++ b/guides/v2.1/migration/migration-migrate.md @@ -51,7 +51,7 @@ where: 3. `{}` is the absolute file system path to `config.xml`; this argument is required. {: .bs-callout .bs-callout-info } -Logs are written to the `/var/` directory. +Logs are written to the `/var/` directory. ## Migration order {#migration_order} diff --git a/guides/v2.1/migration/migration-tool-install.md b/guides/v2.1/migration/migration-tool-install.md index c86bc80caea..6b108662061 100644 --- a/guides/v2.1/migration/migration-tool-install.md +++ b/guides/v2.1/migration/migration-tool-install.md @@ -19,7 +19,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.1/migration/migration-tool-upgrade.md b/guides/v2.1/migration/migration-tool-upgrade.md index 71cab0f650e..56ddacf844b 100644 --- a/guides/v2.1/migration/migration-tool-upgrade.md +++ b/guides/v2.1/migration/migration-tool-upgrade.md @@ -33,7 +33,7 @@ Before you upgrade the Data Migration Tool, back up at least the `vendor/magento You can also back up the entire Magento codebase and database using the following command: - php /bin/magento setup:backup --code --db + php /bin/magento setup:backup --code --db {: .bs-callout .bs-callout-warning } The `vendor/magento/data-migration-tool` directory contains your custom code. Failure to back it up means you can lose your customizations during upgrade. 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/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.2/comp-mgr/cli/cli-upgrade.md b/guides/v2.2/comp-mgr/cli/cli-upgrade.md index fe1798e5c27..2b69397edb2 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). @@ -118,6 +118,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 12fa719967a..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 @@ -127,7 +127,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). 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: 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..75ce3b52c9e 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 @@ -125,7 +125,7 @@ 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: 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/prod/prod_file-sys-perms.md b/guides/v2.2/config-guide/prod/prod_file-sys-perms.md index c61394e00e0..e788bf781fd 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 @@ -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} 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/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/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..946f6eb5d2e 100644 --- a/guides/v2.2/install-gde/trouble/tshoot_sample-data.md +++ b/guides/v2.2/install-gde/trouble/tshoot_sample-data.md @@ -43,7 +43,7 @@ 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 + cd php bin/magento deploy:mode:set developer rm -rf generated/code/* generated/metadata/* php bin/magento sampledata:deploy @@ -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.3/comp-mgr/cli/cli-upgrade.md b/guides/v2.3/comp-mgr/cli/cli-upgrade.md index fc2f08f2b0e..cf5eae16a0f 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. @@ -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} @@ -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: From cc7f5adf370bcc6e867cdd176249c3921f762968 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Sat, 20 Apr 2019 00:34:35 +0300 Subject: [PATCH 03/23] magento/devdocs#: Format Bash 1. Replace "php bin/magento" with "bin/magento" regarding Donald Booth comment --- guides/v2.1/architecture/security_intro.md | 2 +- .../starter-develop-deploy-workflow.md | 4 ++-- guides/v2.1/cloud/before/before-setup-env-install.md | 2 +- guides/v2.1/cloud/cdn/configure-fastly.md | 2 +- guides/v2.1/cloud/cdn/trouble-fastly.md | 2 +- guides/v2.1/cloud/configure/setup-cron-jobs.md | 6 +++--- guides/v2.1/cloud/howtos/install-components.md | 10 +++++----- guides/v2.1/cloud/live/live-sanity-check.md | 8 ++++---- guides/v2.1/cloud/live/sens-data-initial.md | 4 ++-- guides/v2.1/cloud/live/sens-data-over.md | 6 +++--- .../cloud/project/project-conf-files_magento-app.md | 2 +- guides/v2.1/cloud/project/project-upgrade.md | 2 +- .../v2.1/cloud/release-notes/CloudReleaseNotes101.7.md | 2 +- guides/v2.1/cloud/trouble/redis-troubleshooting.md | 2 +- guides/v2.1/cloud/trouble/theme-troubleshooting.md | 2 +- .../cloud/trouble/trouble-error-html-minification.md | 4 ++-- guides/v2.1/comp-mgr/cli/cli-upgrade.md | 4 ++-- guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md | 2 +- guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md | 2 +- .../cli/config-cli-subcommands-compiler.md | 2 +- .../cli/config-cli-subcommands-spt-util.md | 4 ++-- guides/v2.1/config-guide/prod/prod_file-sys-perms.md | 4 ++-- .../config-guide/prod/single-machine-deployment.md | 10 +++++----- guides/v2.1/frontend-dev-guide/cache_for_frontdevs.md | 2 +- guides/v2.1/install-gde/trouble/php/tshoot_opcache.md | 2 +- guides/v2.1/install-gde/trouble/tshoot_sample-data.md | 4 ++-- guides/v2.1/release-notes/ReleaseNotes2.1.10CE.md | 2 +- guides/v2.1/release-notes/ReleaseNotes2.1.10EE.md | 2 +- guides/v2.1/release-notes/ReleaseNotes2.1.6CE.md | 2 +- guides/v2.1/release-notes/ReleaseNotes2.1.6EE.md | 2 +- guides/v2.1/security/google-recaptcha.md | 2 +- guides/v2.1/test/js/jasmine.md | 2 +- .../starter-develop-deploy-workflow.md | 2 +- guides/v2.2/cloud/configure/setup-b2b.md | 2 +- guides/v2.2/cloud/howtos/install-components.md | 10 +++++----- .../cloud/project/project-conf-files_magento-app.md | 2 +- guides/v2.2/cloud/project/project-upgrade.md | 2 +- .../v2.2/cloud/release-notes/CloudReleaseNotes2.2.md | 2 +- guides/v2.2/comp-mgr/cli/cli-upgrade.md | 4 ++-- guides/v2.2/config-guide/bootstrap/mage-profiler.md | 6 +++--- .../cli/config-cli-subcommands-compiler.md | 2 +- .../config-guide/cli/config-cli-subcommands-index.md | 4 ++-- .../config-guide/deployment/pipeline/example/cli.md | 4 ++-- .../deployment/pipeline/production-system.md | 6 +++--- .../deployment/pipeline/technical-details.md | 8 ++++---- guides/v2.2/config-guide/deployment/single-machine.md | 2 +- guides/v2.2/config-guide/prod/prod_file-sys-perms.md | 4 ++-- .../sensitive-and-environment-settings.md | 4 ++-- guides/v2.2/frontend-dev-guide/themes/js-bundling.md | 2 +- .../v2.2/frontend-dev-guide/themes/theme-workflow.md | 6 +++--- guides/v2.2/install-gde/trouble/tshoot_sample-data.md | 4 ++-- guides/v2.2/release-notes/ReleaseNotes2.2.4CE.md | 2 +- guides/v2.2/test/js/jasmine.md | 2 +- guides/v2.3/cloud/project/project-upgrade.md | 2 +- guides/v2.3/comp-mgr/cli/cli-upgrade.md | 8 ++++---- guides/v2.3/release-notes/ReleaseNotes2.3.0Commerce.md | 2 +- .../v2.3/release-notes/ReleaseNotes2.3.0OpenSource.md | 2 +- .../rest/tutorials/inventory/configure-environment.md | 2 +- guides/v2.3/security/google-recaptcha.md | 2 +- 59 files changed, 103 insertions(+), 103 deletions(-) diff --git a/guides/v2.1/architecture/security_intro.md b/guides/v2.1/architecture/security_intro.md index 44a7ff2cd9e..f849bac7360 100644 --- a/guides/v2.1/architecture/security_intro.md +++ b/guides/v2.1/architecture/security_intro.md @@ -30,7 +30,7 @@ Magento safeguards your store from clickjacking attacks by using an X-Frame-Opti ## Use of non-default Magento Admin URL -A simple {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %} {% glossarytooltip a05c59d3-77b9-47d0-92a1-2cbffe3f8622 %}URL{% endglossarytooltip %} (like `admin` or `backend`) makes it easy to target attacks on specific locations using automated password guessing. To prevent against this type of attack, Magento by default creates a random Admin URI when you install the product. The CLI command `php bin/magento info:adminuri` is provided so that you can see the URI if you forget it. You can also use the CLI to change this URI. Although the use of a non-default admin URL will not secure the site, its use will help prevent large-scale automated attacks. See [Display or change the Admin URI]({{page.baseurl}}/install-gde/install/cli/install-cli-adminurl.html) in Configuration Guide for more information. +A simple {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %} {% glossarytooltip a05c59d3-77b9-47d0-92a1-2cbffe3f8622 %}URL{% endglossarytooltip %} (like `admin` or `backend`) makes it easy to target attacks on specific locations using automated password guessing. To prevent against this type of attack, Magento by default creates a random Admin URI when you install the product. The CLI command `bin/magento info:adminuri` is provided so that you can see the URI if you forget it. You can also use the CLI to change this URI. Although the use of a non-default admin URL will not secure the site, its use will help prevent large-scale automated attacks. See [Display or change the Admin URI]({{page.baseurl}}/install-gde/install/cli/install-cli-adminurl.html) in Configuration Guide for more information. ## Related topics diff --git a/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md b/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md index fcf8f735366..9ab7e94cc75 100644 --- a/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md +++ b/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md @@ -107,8 +107,8 @@ If you are familiar with Magento, you may be concerned about how to get your con {{site.data.var.ece}} provides a set of two [Configuration Management]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html) commands that export configuration settings from your environment into a file. These commands are only available for **{{site.data.var.ece}} 2.1.4 and later** (not 2.2). -* `php bin/magento magento-cloud:scd-dump`: Recommended. Exports only the configuration settings you have entered or modified from defaults into a configuration file. -* `php bin/magento app:config:dump`: Exports every configuration setting, including modified and default, into a configuration file. +* `bin/magento magento-cloud:scd-dump`: Recommended. Exports only the configuration settings you have entered or modified from defaults into a configuration file. +* `bin/magento app:config:dump`: Exports every configuration setting, including modified and default, into a configuration file. The generated file is located in `app/etc/`: 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 a210a8da8a5..1fa397cf3f9 100644 --- a/guides/v2.1/cloud/before/before-setup-env-install.md +++ b/guides/v2.1/cloud/before/before-setup-env-install.md @@ -194,7 +194,7 @@ 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: - php bin/magento info:adminuri + 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/configure-fastly.md b/guides/v2.1/cloud/cdn/configure-fastly.md index 3b4d4589e6c..cac2775f903 100644 --- a/guides/v2.1/cloud/cdn/configure-fastly.md +++ b/guides/v2.1/cloud/cdn/configure-fastly.md @@ -151,7 +151,7 @@ You cannot use the Fastly service in Integration environments. 3. Enter the following command to fully update and clear the cache: ```bash -php bin/magento setup:upgrade && php bin/magento cache:clean +bin/magento setup:upgrade && bin/magento cache:clean ``` 4. Edit your composer.json and ensure the Fastly module is included with version. diff --git a/guides/v2.1/cloud/cdn/trouble-fastly.md b/guides/v2.1/cloud/cdn/trouble-fastly.md index be8e01402ac..6d63deefcbc 100644 --- a/guides/v2.1/cloud/cdn/trouble-fastly.md +++ b/guides/v2.1/cloud/cdn/trouble-fastly.md @@ -252,7 +252,7 @@ This section provides suggestions for resolving errors returned when checking re If the Fastly module is not enabled (`Fastly-Module-Enabled: no`) or if the header is missing, [use SSH to log in]({{ page.baseurl }}/cloud/env/environments-ssh.html#magento-cli) to the project. Then, run the following command to check the module status. ```bash -php bin/magento module:status Fastly_Cdn +bin/magento module:status Fastly_Cdn ``` Based on the status returned, use the following instructions to update the Fastly configuration. diff --git a/guides/v2.1/cloud/configure/setup-cron-jobs.md b/guides/v2.1/cloud/configure/setup-cron-jobs.md index f64922bdefa..16c97a09e3d 100644 --- a/guides/v2.1/cloud/configure/setup-cron-jobs.md +++ b/guides/v2.1/cloud/configure/setup-cron-jobs.md @@ -38,7 +38,7 @@ The following example is the default cron included for {{site.data.var.ece}}. crons: cronrun: spec: "* * * * *" - cmd: "php bin/magento cron:run" + cmd: "bin/magento cron:run" ``` {:.bs-callout .bs-callout-info} @@ -94,7 +94,7 @@ We include a default cron job for Magento in the default file: crons: cronrun: spec: "* * * * *" - cmd: "php bin/magento cron:run" + cmd: "bin/magento cron:run" ``` 1. Edit `.magento.app.yaml` in the root directory of the Magento code in the Git branch. @@ -106,7 +106,7 @@ crons: crons: magento: spec: '* * * * *' - cmd: 'php bin/magento cron:run' + cmd: 'bin/magento cron:run' productcatalog: spec: '20 */3 * * *' cmd: 'bin/magento indexer:reindex catalog_product_category' diff --git a/guides/v2.1/cloud/howtos/install-components.md b/guides/v2.1/cloud/howtos/install-components.md index 5090ece7109..cea3409ac2e 100644 --- a/guides/v2.1/cloud/howtos/install-components.md +++ b/guides/v2.1/cloud/howtos/install-components.md @@ -87,7 +87,7 @@ To verify the extension installed properly, you can check its functionality in t 1. Enter the following command to display a list of enabled modules: ```bash - php bin/magento module:status + bin/magento module:status ``` 1. Verify the extension is listed. @@ -106,25 +106,25 @@ You can use CLI commands or directly edit `app/etc/config.php` to enable or disa 1. List all modules: ```bash - php bin/magento module:status + bin/magento module:status ``` 1. Enable a module. ```bash - php bin/magento module:enable + bin/magento module:enable ``` 1. Disable a module. ```bash - php bin/magento module:disable + bin/magento module:disable ``` 1. Verify the status of a module: ```bash - php bin/magento module:status + bin/magento module:status ``` Also, you can navigate to, and edit, the `app/etc/config.php` file to verify the module is disabled. diff --git a/guides/v2.1/cloud/live/live-sanity-check.md b/guides/v2.1/cloud/live/live-sanity-check.md index 8c491c04709..2156b2633ec 100644 --- a/guides/v2.1/cloud/live/live-sanity-check.md +++ b/guides/v2.1/cloud/live/live-sanity-check.md @@ -133,7 +133,7 @@ Before you continue, you must know the file system path to any patch we provided 1. Compile code and the dependency injection configuration: ```bash - php bin/magento setup:di:compile + bin/magento setup:di:compile ``` This command can take several minutes to complete and produces messages similar to the following: @@ -171,20 +171,20 @@ We highly recommend having Magento already installed prior to deployment. During 3. Enter the following command: ```bash -php bin/magento setup:upgrade +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: ```bash -php bin/magento cache:clean +bin/magento cache:clean ``` 5. Set the Magento application for [production mode]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode): ```bash -php bin/magento deploy:mode:set production +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 7f51d228c84..862b83495ff 100644 --- a/guides/v2.1/cloud/live/sens-data-initial.md +++ b/guides/v2.1/cloud/live/sens-data-initial.md @@ -208,13 +208,13 @@ magento-cloud environment:ssh --pipe 2. Create `config.local.php` on the integration server. ```bash -ssh "php bin/magento magento-cloud:scd-dump" +ssh "bin/magento magento-cloud:scd-dump" ``` For example, ```bash -ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "php bin/magento magento-cloud:scd-dump" +ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "bin/magento magento-cloud:scd-dump" ``` 5. If you haven't done so already, change to the project root directory. diff --git a/guides/v2.1/cloud/live/sens-data-over.md b/guides/v2.1/cloud/live/sens-data-over.md index 8e356bd41c6..26b63c6242a 100644 --- a/guides/v2.1/cloud/live/sens-data-over.md +++ b/guides/v2.1/cloud/live/sens-data-over.md @@ -27,7 +27,7 @@ Magento's store configurations are stored in the database. When updating configu After configuring your environment, generate the file using one of the following commands: -* `php bin/magento magento-cloud:scd-dump`: **Recommended**. Exports only modified configuration settings +* `bin/magento magento-cloud:scd-dump`: **Recommended**. Exports only modified configuration settings * `php ./vendor/bin/ece-tools config:dump`: Exports every configuration setting, including modified and default settings {:.bs-callout .bs-callout-warning} @@ -41,7 +41,7 @@ If sensitive data is found in your configurations, it is generated as environmen ### Switching between commands {#commands} -Can you switch between using `php bin/magento magento-cloud:scd-dump` and `php ./vendor/bin/ece-tools config:dump`? Yes, you can. +Can you switch between using `bin/magento magento-cloud:scd-dump` and `php ./vendor/bin/ece-tools config:dump`? Yes, you can. For 2.1.4 and later (not 2.2.X), you can always delete the `config.local.php` file and regenerate it with either command. Remember, `scd-dump` only pulls configured values (not defaults) and `config:dump` captures all values (default and modified). @@ -150,7 +150,7 @@ Complete all configurations for your stores in the Admin console: For example, for Pro on the Integration branch: - ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "php bin/magento magento-cloud:scd-dump" + ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "bin/magento magento-cloud:scd-dump" ### Step 2: Transfer and add the file to Git {#transfer-file} diff --git a/guides/v2.1/cloud/project/project-conf-files_magento-app.md b/guides/v2.1/cloud/project/project-conf-files_magento-app.md index 4f4c9e6b4c9..3f5663da96f 100644 --- a/guides/v2.1/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.1/cloud/project/project-conf-files_magento-app.md @@ -278,7 +278,7 @@ A sample Magento cron job follows: crons: cronrun: spec: "* * * * *" - cmd: "php bin/magento cron:run" + cmd: "bin/magento cron:run" ``` For {{site.data.var.ece}} 2.1.X, you can use only workers and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration. diff --git a/guides/v2.1/cloud/project/project-upgrade.md b/guides/v2.1/cloud/project/project-upgrade.md index 9dc31f762a7..04debaf9eda 100644 --- a/guides/v2.1/cloud/project/project-upgrade.md +++ b/guides/v2.1/cloud/project/project-upgrade.md @@ -46,7 +46,7 @@ You can upgrade the core {{site.data.var.ee}} code base to version 2.1. If you n 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.1/cloud/release-notes/CloudReleaseNotes101.7.md b/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md index d14c24c867e..cfd20f4cc6d 100644 --- a/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md +++ b/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md @@ -37,7 +37,7 @@ In `magento-cloud-configuration` releases 101.7.3, 101.7.4, 101.7.5, and 101.7.6 ### 101.7.3 changes -* Magento no longer throws an error when only the default store issued. Previously, when only the default store is used, Magento threw the following error when running `php bin/magento magento-cloud:scd-dump`: +* Magento no longer throws an error when only the default store issued. Previously, when only the default store is used, Magento threw the following error when running `bin/magento magento-cloud:scd-dump`: Exception] Notice: Undefined index: stores in /app/vendor/magento/magento-cloud-configuration/src/Magento/MagentoCloud/Console/Command/SCDConfigDump.php on line 91 diff --git a/guides/v2.1/cloud/trouble/redis-troubleshooting.md b/guides/v2.1/cloud/trouble/redis-troubleshooting.md index 75dc7b14839..df7c7c69b0e 100644 --- a/guides/v2.1/cloud/trouble/redis-troubleshooting.md +++ b/guides/v2.1/cloud/trouble/redis-troubleshooting.md @@ -66,7 +66,7 @@ If you continue to encounter these issues after using this method of deployment, 3. Run the following command to reduce deployment threads: ```bash -php bin/magento setup:static-content:deploy -j 1 +bin/magento setup:static-content:deploy -j 1 ``` You can also set an environment variable for single thread deployment by default: `STATIC_CONTENT_THREADS = 1`. diff --git a/guides/v2.1/cloud/trouble/theme-troubleshooting.md b/guides/v2.1/cloud/trouble/theme-troubleshooting.md index 2b3a8f9bb1b..3bd707611b2 100644 --- a/guides/v2.1/cloud/trouble/theme-troubleshooting.md +++ b/guides/v2.1/cloud/trouble/theme-troubleshooting.md @@ -18,7 +18,7 @@ To resolve, you need the SSH information and store URL available through the [Pr 1. Regenerate the image cache: ```bash - php bin/magento catalog:images:resize + bin/magento catalog:images:resize ``` 1. Test the category pages through the store URL. diff --git a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md index b3b285e4292..06730d5b03b 100644 --- a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md +++ b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md @@ -17,7 +17,7 @@ This topic discusses solutions to typical issues you might experience by HTML mi ### Website load errors after scd-dump, build, and deploy -After using the command `php bin/magento magento-cloud:scd-dump` to generate config.local.php, your website may encounter errors after build and deploy. When accessing the site, you may receive the error "failed to open stream: No such file or directory" for a series of files. +After using the command `bin/magento magento-cloud:scd-dump` to generate config.local.php, your website may encounter errors after build and deploy. When accessing the site, you may receive the error "failed to open stream: No such file or directory" for a series of files. The issue is due to an issue of enabling HTML minification and the setting in `config.local.php` when using `bin/magento magento-cloud:scd-dump`. @@ -41,7 +41,7 @@ As a work-around, complete the following: 3. Flush all caches. ```bash -php bin/magento cache:flush +bin/magento cache:flush redis-cli -h <> -p <> flushall ``` diff --git a/guides/v2.1/comp-mgr/cli/cli-upgrade.md b/guides/v2.1/comp-mgr/cli/cli-upgrade.md index bb089ad4eb7..751b717fcaa 100644 --- a/guides/v2.1/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.1/comp-mgr/cli/cli-upgrade.md @@ -105,11 +105,11 @@ To enable maintenance mode: 4. Update the database schema and data: ```bash - php bin/magento setup:upgrade + bin/magento setup:upgrade ``` 5. Put your storefront online (that is, cancel maintenance mode): ```bash - php bin/magento maintenance:disable + bin/magento maintenance:disable ``` 6. Restart Varnish if you use it for page caching. ```bash diff --git a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md index 380dcf6085c..e892255de96 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md +++ b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md @@ -29,5 +29,5 @@ php /bin/magento setup:upgrade 3. After the command completes, verify your upgrade was successful: ```bash -php bin/magento --version +bin/magento --version ``` diff --git a/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md b/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md index 9b2a27326a4..d3ed373f503 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md +++ b/guides/v2.1/comp-mgr/trouble/cman/tshoot_backup.md @@ -27,7 +27,7 @@ Backup functionality is currently disabled. Please use other means for backups. Enter the following CLI command: ```bash -php bin/magento config:set system/backup/functionality_enabled 1 +bin/magento config:set system/backup/functionality_enabled 1 ``` For additional information on backups, see [Back up and roll back the file system, media, and database]({{ page.baseurl }}/install-gde/install/cli/install-cli-backup.html). diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md index 93da16d8b6d..d0d052a4b0b 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md @@ -46,7 +46,7 @@ In some cases, you might want to compile code before you install the Magento app The following command enables all modules: ```bash -php bin/magento module:enable --all [-c|--clear-static-content] +bin/magento module:enable --all [-c|--clear-static-content] ``` Use the optional `[-c|--clear-static-content]` option to clear {% glossarytooltip a3e37235-4e8b-464f-a19d-4a120560206a %}static content{% endglossarytooltip %}. This is necessary if you've previously enabled or disabled modules and you must clear static content previously generated for them. diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md index 5edb4aaf9b0..e0c6015358a 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.md @@ -95,8 +95,8 @@ Run the following commands in the order shown to display the paths to the applic {:.bs-callout .bs-callout-info} The commands run properly _only_ from your Magento installation directory. -2. `php bin/magento support:utility:paths` creates `/var/support/Paths.php`, which lists the paths to all application used by the utility. -3. `php bin/magento support:utility:check` displays the file system paths. +2. `bin/magento support:utility:paths` creates `/var/support/Paths.php`, which lists the paths to all application used by the utility. +3. `bin/magento support:utility:check` displays the file system paths. A sample follows: diff --git a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md index 341806b695c..560a3922e14 100644 --- a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md +++ b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md @@ -71,7 +71,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. @@ -168,7 +168,7 @@ To remove writable permissions to files and directories from the web server user 3. As the Magento file system owner, enter the following command to change to production mode: ```bash -php bin/magento deploy:mode:set production +bin/magento deploy:mode:set production ``` 3. Enter the following command as a user with `root` privileges: diff --git a/guides/v2.1/config-guide/prod/single-machine-deployment.md b/guides/v2.1/config-guide/prod/single-machine-deployment.md index 9b43c09dc9b..8638803e61b 100644 --- a/guides/v2.1/config-guide/prod/single-machine-deployment.md +++ b/guides/v2.1/config-guide/prod/single-machine-deployment.md @@ -32,7 +32,7 @@ This guide does not apply if you used `git clone` to install Magento. Contributi 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: @@ -53,19 +53,19 @@ This guide does not apply if you used `git clone` to install Magento. Contributi 6. Update the {% glossarytooltip 66b924b4-8097-4aea-93d9-05a81e6cc00c %}database schema{% endglossarytooltip %} and data: - php bin/magento setup:upgrade + bin/magento setup:upgrade 7. Compile the code: - php bin/magento setup:di:compile + bin/magento setup:di:compile 8. Deploy static content: - php bin/magento setup:static-content:deploy + bin/magento setup:static-content:deploy 9. Exit maintenance mode: - php bin/magento maintenance:disable + bin/magento maintenance:disable ## Alternative deployment strategies diff --git a/guides/v2.1/frontend-dev-guide/cache_for_frontdevs.md b/guides/v2.1/frontend-dev-guide/cache_for_frontdevs.md index 4592d421191..2a8f3498d60 100644 --- a/guides/v2.1/frontend-dev-guide/cache_for_frontdevs.md +++ b/guides/v2.1/frontend-dev-guide/cache_for_frontdevs.md @@ -29,7 +29,7 @@ To clean cache, run To view the status of the cache, run: - php bin/magento cache:status + bin/magento cache:status For more details about working with cache, see [Manage the cache]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-cache.html) diff --git a/guides/v2.1/install-gde/trouble/php/tshoot_opcache.md b/guides/v2.1/install-gde/trouble/php/tshoot_opcache.md index 5bb770771f1..a081c323e37 100644 --- a/guides/v2.1/install-gde/trouble/php/tshoot_opcache.md +++ b/guides/v2.1/install-gde/trouble/php/tshoot_opcache.md @@ -64,4 +64,4 @@ If you have more than one `opcache.ini`, modify all of them. 6. Regenerate DI configuration and all missing classes that can be auto-generated: - * `php bin/magento setup:di:compile` + * `bin/magento setup:di:compile` diff --git a/guides/v2.1/install-gde/trouble/tshoot_sample-data.md b/guides/v2.1/install-gde/trouble/tshoot_sample-data.md index 4a3a6405672..64ddedea308 100644 --- a/guides/v2.1/install-gde/trouble/tshoot_sample-data.md +++ b/guides/v2.1/install-gde/trouble/tshoot_sample-data.md @@ -47,9 +47,9 @@ 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 + bin/magento deploy:mode:set developer rm -rf var/generation/* var/di/* - php bin/magento sampledata:deploy + bin/magento sampledata:deploy ### Symptom (security) {#trouble-samp-secy} diff --git a/guides/v2.1/release-notes/ReleaseNotes2.1.10CE.md b/guides/v2.1/release-notes/ReleaseNotes2.1.10CE.md index c785921a381..f9923d556eb 100644 --- a/guides/v2.1/release-notes/ReleaseNotes2.1.10CE.md +++ b/guides/v2.1/release-notes/ReleaseNotes2.1.10CE.md @@ -43,7 +43,7 @@ See [Magento Security Center](https://magento.com/security/patches/magento-221-2 ## Fixed issues ### 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) ### 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.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/security/google-recaptcha.md b/guides/v2.1/security/google-recaptcha.md index e8732e7a40a..95560b5e024 100644 --- a/guides/v2.1/security/google-recaptcha.md +++ b/guides/v2.1/security/google-recaptcha.md @@ -44,5 +44,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/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/basic-information/starter-develop-deploy-workflow.md b/guides/v2.2/cloud/basic-information/starter-develop-deploy-workflow.md index 7968d1eabde..eabd35c121b 100644 --- a/guides/v2.2/cloud/basic-information/starter-develop-deploy-workflow.md +++ b/guides/v2.2/cloud/basic-information/starter-develop-deploy-workflow.md @@ -109,7 +109,7 @@ If you are familiar with Magento, you may be concerned about how to get your con {{site.data.var.ece}} provides a set of two [Configuration Management]({{ page.baseurl }}/cloud/live/sens-data-over.html) commands that export configuration settings from your environment into a file. These commands are only available for **{{site.data.var.ece}} 2.2 and later**. * `php .vendor/bin/m2-ece-scd-dump`: Recommended. Exports only the configuration settings you have entered or modified from defaults into a configuration file. -* `php bin/magento app:config:dump`: Exports every configuration setting, including modified and default, into a configuration file. +* `bin/magento app:config:dump`: Exports every configuration setting, including modified and default, into a configuration file. The generated file is `app/etc/config.php`. diff --git a/guides/v2.2/cloud/configure/setup-b2b.md b/guides/v2.2/cloud/configure/setup-b2b.md index ad9f80e4a66..d7d7e9499e0 100644 --- a/guides/v2.2/cloud/configure/setup-b2b.md +++ b/guides/v2.2/cloud/configure/setup-b2b.md @@ -56,7 +56,7 @@ 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: - php bin/magento setup:upgrade + 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. diff --git a/guides/v2.2/cloud/howtos/install-components.md b/guides/v2.2/cloud/howtos/install-components.md index 82ec1dc2a6e..708bc83c846 100644 --- a/guides/v2.2/cloud/howtos/install-components.md +++ b/guides/v2.2/cloud/howtos/install-components.md @@ -87,7 +87,7 @@ To verify the extension installed properly, you can check its functionality in t 1. List all enabled modules: ```bash - php bin/magento module:status + bin/magento module:status ``` 1. Verify the extension is listed. @@ -109,25 +109,25 @@ Trying to enable and disable extensions not following this method can lead to pe 1. List all module. ```bash - php bin/magento module:status + bin/magento module:status ``` 1. Enable a module.This command updates the `config.php` file with the enabled status of the module. ```bash - php bin/magento module:enable + bin/magento module:enable ``` 1. Disable a module. This command updates the `config.php` file with the disable status of the module. ```bash - php bin/magento module:disable + bin/magento module:disable ``` 1. Verify the status of a module: ```bash - php bin/magento module:status + bin/magento module:status ``` 1. Push your updates to the Git branch. diff --git a/guides/v2.2/cloud/project/project-conf-files_magento-app.md b/guides/v2.2/cloud/project/project-conf-files_magento-app.md index b0539b21206..0780a3370e9 100644 --- a/guides/v2.2/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.2/cloud/project/project-conf-files_magento-app.md @@ -272,7 +272,7 @@ A sample Magento cron job follows: crons: cronrun: spec: "* * * * *" - cmd: "php bin/magento cron:run" + cmd: "bin/magento cron:run" ``` For {{site.data.var.ece}} 2.1.X, you can use only [workers](#workers) and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration. diff --git a/guides/v2.2/cloud/project/project-upgrade.md b/guides/v2.2/cloud/project/project-upgrade.md index cc43929dad4..f0247cf3d34 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 + bin/magento --version ``` ## Create a new config.php file diff --git a/guides/v2.2/cloud/release-notes/CloudReleaseNotes2.2.md b/guides/v2.2/cloud/release-notes/CloudReleaseNotes2.2.md index f1e09344202..455890430d2 100644 --- a/guides/v2.2/cloud/release-notes/CloudReleaseNotes2.2.md +++ b/guides/v2.2/cloud/release-notes/CloudReleaseNotes2.2.md @@ -95,7 +95,7 @@ When upgrading to {{site.data.var.ece}} 2.2, consider the following changes in d * Update and include `config.php` and add a list of all modules. If you use Configuration Management with a `config.local.php` file, you must create a `config.php` and add it to your code. For instructions, see [Configuration Management and upgrading]({{ site.baseurl }}/guides/v2.2/cloud/project/project-upgrade.html). -* The command for generating `config.php` changed in 2.2 from `php bin/magento magento-cloud:scd-dump` to `php vendor/bin/m2-ece-scd-dump`. +* The command for generating `config.php` changed in 2.2 from `bin/magento magento-cloud:scd-dump` to `php vendor/bin/m2-ece-scd-dump`. * `.magento.app.yaml` has new build and deploy hooks. As part of your upgrade, you should update the `.magento.app.yaml` file with new build and deploy hooks and a set of environment variables. All actions completed by build and deploy are completed by these hooks. For instructions, see [Update .magento.app.yaml]({{ site.baseurl }}/guides/v2.2/cloud/project/project-upgrade.html#update-the-magentoappyaml-file). For additional technical information, we have removed pre-deployment tasks, refined build and deploy tasks, and modified build and deploy variables. diff --git a/guides/v2.2/comp-mgr/cli/cli-upgrade.md b/guides/v2.2/comp-mgr/cli/cli-upgrade.md index 2b69397edb2..32aca2fdc1a 100644 --- a/guides/v2.2/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.2/comp-mgr/cli/cli-upgrade.md @@ -97,11 +97,11 @@ To enable maintenance mode: 6. Update the database schema and data: ```bash - php bin/magento setup:upgrade + bin/magento setup:upgrade ``` 7. Put your storefront online (that is, cancel maintenance mode): ```bash - php bin/magento maintenance:disable + bin/magento maintenance:disable ``` 8. Restart Varnish if you use it for page caching. ```bash diff --git a/guides/v2.2/config-guide/bootstrap/mage-profiler.md b/guides/v2.2/config-guide/bootstrap/mage-profiler.md index 2af9e7494c2..75c52bcb43a 100644 --- a/guides/v2.2/config-guide/bootstrap/mage-profiler.md +++ b/guides/v2.2/config-guide/bootstrap/mage-profiler.md @@ -58,17 +58,17 @@ To enable or disable the profiler: To enable the profiler using type `html` and create a flagfile: ```bash - php bin/magento dev:profiler:enable html + bin/magento dev:profiler:enable html ``` To enable the profiler using type `csvfile` and create a flagfile: ```bash - php bin/magento dev:profiler:enable csvfile + bin/magento dev:profiler:enable csvfile ``` To disable the profiler and remove the flagfile: ```bash - php bin/magento dev:profiler:disable + bin/magento dev:profiler:disable ``` 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 0c5fc50538e..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 @@ -40,7 +40,7 @@ In some cases, you might want to compile code before you install the Magento app 1. Enable the modules. ```bash - php bin/magento module:enable --all [-c|--clear-static-content] + 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. 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/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 e788bf781fd..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. @@ -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/extension-dev-guide/configuration/sensitive-and-environment-settings.md b/guides/v2.2/extension-dev-guide/configuration/sensitive-and-environment-settings.md index d65653599be..b4f2a42d5ee 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,8 @@ 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 + bin/magento cache:clean + 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-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/install-gde/trouble/tshoot_sample-data.md b/guides/v2.2/install-gde/trouble/tshoot_sample-data.md index 946f6eb5d2e..d846261b970 100644 --- a/guides/v2.2/install-gde/trouble/tshoot_sample-data.md +++ b/guides/v2.2/install-gde/trouble/tshoot_sample-data.md @@ -44,9 +44,9 @@ 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 + 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} diff --git a/guides/v2.2/release-notes/ReleaseNotes2.2.4CE.md b/guides/v2.2/release-notes/ReleaseNotes2.2.4CE.md index d44a8a4bf34..d2c4aaa5f20 100644 --- a/guides/v2.2/release-notes/ReleaseNotes2.2.4CE.md +++ b/guides/v2.2/release-notes/ReleaseNotes2.2.4CE.md @@ -94,7 +94,7 @@ We do not recommend upgrading to Magento 2.2.4 if you deploy across multiple web * You can specify a custom version for static files being deployed, and now nginx sample config files can match these custom versions, too. *Fix submitted by [Scott Buchanan](https://github.com/scottsb) in pull request 12521*. -* The `CrontabManager.php` file has been updated as follows: If `crontab` has already been populated, the `php bin/magento cron:install` command adds `#~ MAGENTO START` and the rest of code directly to the last row of crontab without any spaces. *Fix submitted by [Michele Fantetti](https://github.com/WaPoNe) in pull request*. +* The `CrontabManager.php` file has been updated as follows: If `crontab` has already been populated, the `bin/magento cron:install` command adds `#~ MAGENTO START` and the rest of code directly to the last row of crontab without any spaces. *Fix submitted by [Michele Fantetti](https://github.com/WaPoNe) in pull request*. * The `ext-bcmath` PHP extension is now required in Open Source. Previously, it was required for Commerce only. *Fix submitted by [Mobecls](https://github.com/Mobecls) in pull request 12768*. 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 4a945a48395..348f29ae059 100644 --- a/guides/v2.3/cloud/project/project-upgrade.md +++ b/guides/v2.3/cloud/project/project-upgrade.md @@ -49,7 +49,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 cf5eae16a0f..884a69475f1 100644 --- a/guides/v2.3/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.3/comp-mgr/cli/cli-upgrade.md @@ -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 @@ -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 diff --git a/guides/v2.3/release-notes/ReleaseNotes2.3.0Commerce.md b/guides/v2.3/release-notes/ReleaseNotes2.3.0Commerce.md index 5a36336f01b..9e93d2338bc 100644 --- a/guides/v2.3/release-notes/ReleaseNotes2.3.0Commerce.md +++ b/guides/v2.3/release-notes/ReleaseNotes2.3.0Commerce.md @@ -1084,7 +1084,7 @@ We've fixed hundreds of issues in the Magento 2.3.0 core code. * Magento can now generate unsecure URLs if the current URL is secure. [GitHub-6175](https://github.com/magento/magento2/issues/6175) -* The `php bin/magento app:config:dump` command no longer adds an extra space to multiline array values every time it runs. Previously, this command inserted extra spaces, which triggered Github to commit these files as changed. *Fix submitted by [adrian-martinez-interactiv4](https://github.com/adrian-martinez-interactiv4) in pull request [11452](https://github.com/magento/magento2/pull/11452)*. [GitHub-11328](https://github.com/magento/magento2/issues/11328) +* The `bin/magento app:config:dump` command no longer adds an extra space to multiline array values every time it runs. Previously, this command inserted extra spaces, which triggered Github to commit these files as changed. *Fix submitted by [adrian-martinez-interactiv4](https://github.com/adrian-martinez-interactiv4) in pull request [11452](https://github.com/magento/magento2/pull/11452)*. [GitHub-11328](https://github.com/magento/magento2/issues/11328) * The `StockItemCriteriaInterface` method `setProductsFilter` now accepts an array of IDs. Previously, this method accepted either a single integer or an array, but returned only one item. *Fix submitted by [Kirill Morozov](https://github.com/kirmorozov) in pull request [11503](https://github.com/magento/magento2/pull/11503)*.[GitHub-7678](https://github.com/magento/magento2/issues/7678) diff --git a/guides/v2.3/release-notes/ReleaseNotes2.3.0OpenSource.md b/guides/v2.3/release-notes/ReleaseNotes2.3.0OpenSource.md index dd92eee9b94..6ad450a810a 100644 --- a/guides/v2.3/release-notes/ReleaseNotes2.3.0OpenSource.md +++ b/guides/v2.3/release-notes/ReleaseNotes2.3.0OpenSource.md @@ -1013,7 +1013,7 @@ See [Magento Security Center](https://magento.com/security/patches/magento-2.2.7 * Magento can now generate unsecure URLs if the current URL is secure. [GitHub-6175](https://github.com/magento/magento2/issues/6175) -* The `php bin/magento app:config:dump` command no longer adds an extra space to multiline array values every time it runs. Previously, this command inserted extra spaces, which triggered Github to commit these files as changed. *Fix submitted by [adrian-martinez-interactiv4](https://github.com/adrian-martinez-interactiv4) in pull request [11452](https://github.com/magento/magento2/pull/11452)*. [GitHub-11328](https://github.com/magento/magento2/issues/11328) +* The `bin/magento app:config:dump` command no longer adds an extra space to multiline array values every time it runs. Previously, this command inserted extra spaces, which triggered Github to commit these files as changed. *Fix submitted by [adrian-martinez-interactiv4](https://github.com/adrian-martinez-interactiv4) in pull request [11452](https://github.com/magento/magento2/pull/11452)*. [GitHub-11328](https://github.com/magento/magento2/issues/11328) * The `StockItemCriteriaInterface` method `setProductsFilter` now accepts an array of IDs. Previously, this method accepted either a single integer or an array, but returned only one item. *Fix submitted by [Kirill Morozov](https://github.com/kirmorozov) in pull request [11503](https://github.com/magento/magento2/pull/11503)*.[GitHub-7678](https://github.com/magento/magento2/issues/7678) 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 ``` From 48db08fcde4451cde9d2189f29c558a26110e2e2 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Sat, 20 Apr 2019 00:58:52 +0300 Subject: [PATCH 04/23] magento/devdocs#: Format Bash --- guides/v2.1/cloud/cdn/configure-fastly.md | 18 ++++--- guides/v2.1/cloud/howtos/sample-data.md | 21 ++++---- guides/v2.1/cloud/live/live-sanity-check.md | 27 +++++----- guides/v2.1/cloud/live/sens-data-initial.md | 51 +++++++++---------- .../cloud/trouble/redis-troubleshooting.md | 6 +-- .../trouble-error-html-minification.md | 12 ++--- .../comp-mgr/trouble/cman/ce-ee-upgrade.md | 15 +++--- .../cli/config-cli-subcommands-compiler.md | 2 +- .../cli/config-cli-subcommands-i18n.md | 32 ++++++------ .../config-guide/prod/prod_file-sys-perms.md | 38 +++++++------- guides/v2.1/config-guide/solr/solr-magento.md | 44 ++++++++-------- .../install-gde/install/cli/dev_downgrade.md | 47 +++++++++-------- .../install/cli/dev_update-magento.md | 34 ++++++------- 13 files changed, 180 insertions(+), 167 deletions(-) diff --git a/guides/v2.1/cloud/cdn/configure-fastly.md b/guides/v2.1/cloud/cdn/configure-fastly.md index cac2775f903..35801fb2f7d 100644 --- a/guides/v2.1/cloud/cdn/configure-fastly.md +++ b/guides/v2.1/cloud/cdn/configure-fastly.md @@ -150,24 +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: -```bash -bin/magento setup:upgrade && bin/magento cache:clean -``` + ```bash + bin/magento setup:upgrade && 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 + + ```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: -```bash -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/howtos/sample-data.md b/guides/v2.1/cloud/howtos/sample-data.md index bca5cc32d2c..e762658af7c 100644 --- a/guides/v2.1/cloud/howtos/sample-data.md +++ b/guides/v2.1/cloud/howtos/sample-data.md @@ -27,23 +27,24 @@ 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: -```bash -/bin/magento sampledata:deploy -``` + ```bash + /bin/magento sampledata:deploy + ``` 3. Wait for components to update. 4. Commit and push the changes: -```bash -git add -A && git commit -m "Install sample data" -git push origin -``` + ```bash + git add -A && git commit -m "Install sample data" + 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: -```bash -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 2156b2633ec..6e4cc86b248 100644 --- a/guides/v2.1/cloud/live/live-sanity-check.md +++ b/guides/v2.1/cloud/live/live-sanity-check.md @@ -42,11 +42,11 @@ 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. -```bash -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. @@ -135,6 +135,7 @@ Before you continue, you must know the file system path to any patch we provided ```bash bin/magento setup:di:compile ``` + This command can take several minutes to complete and produces messages similar to the following: ```terminal @@ -170,22 +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: -```bash -bin/magento setup:upgrade -``` + ```bash + 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: -```bash -bin/magento cache:clean -``` + ```bash + bin/magento cache:clean + ``` 5. Set the Magento application for [production mode]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode): -```bash -bin/magento deploy:mode:set production -``` + ```bash + 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 862b83495ff..1ddaf4f8cea 100644 --- a/guides/v2.1/cloud/live/sens-data-initial.md +++ b/guides/v2.1/cloud/live/sens-data-initial.md @@ -79,7 +79,6 @@ This procedure corresponds to step 2 in the [recommended procedure]({{ page.base The following snippet from `config.local.php` shows an example of changing the default locale to `en_GB` and changing static file optimization settings: ```php -
  'general' => [
      'locale' => [
          'code' => 'en_GB',
@@ -104,8 +103,8 @@ The following snippet from `config.local.php` shows an example of changing the d
      ],
 
      ... more ...
-
``` +{: .no-copy} ## Push and deploy config.local.php to environments {#deploy} @@ -158,21 +157,21 @@ To delete `config.local.php`: 1. On your local workstation, check out the `master` branch. 2. SSH to the integration server: -```bash -magento-cloud ssh -``` + ```bash + magento-cloud ssh + ``` 3. Delete `config.local.php`. -```bash -rm app/etc/config.local.php -``` + ```bash + rm app/etc/config.local.php + ``` 4. Close the SSH tunnel. -```bash -exit -``` + ```bash + exit + ``` ### Change configuration values in Integration {#change-settings} @@ -201,36 +200,36 @@ To generate a new file: 1. On your local workstation, find the integration server's SSH URL. -```bash -magento-cloud environment:ssh --pipe -``` + ```bash + magento-cloud environment:ssh --pipe + ``` 2. Create `config.local.php` on the integration server. -```bash -ssh "bin/magento magento-cloud:scd-dump" -``` + ```bash + ssh "bin/magento magento-cloud:scd-dump" + ``` For example, -```bash -ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "bin/magento magento-cloud:scd-dump" -``` + ```bash + ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "bin/magento magento-cloud:scd-dump" + ``` 5. If you haven't done so already, change to the project root directory. 6. Transfer `config.local.php` to your local workstation. -```bash -rsync :app/etc/config.local.php ./app/etc/config.local.php -``` + ```bash + rsync :app/etc/config.local.php ./app/etc/config.local.php + ``` ### Push the changes to Git {#push-again} To push your changes, enter the following command: -```bash -git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master -``` + ```bash + git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master + ``` Wait for deployment to complete. diff --git a/guides/v2.1/cloud/trouble/redis-troubleshooting.md b/guides/v2.1/cloud/trouble/redis-troubleshooting.md index df7c7c69b0e..6061f1b0435 100644 --- a/guides/v2.1/cloud/trouble/redis-troubleshooting.md +++ b/guides/v2.1/cloud/trouble/redis-troubleshooting.md @@ -65,8 +65,8 @@ If you continue to encounter these issues after using this method of deployment, 2. SSH to the server after deployment completes. 3. Run the following command to reduce deployment threads: -```bash -bin/magento setup:static-content:deploy -j 1 -``` + ```bash + bin/magento setup:static-content:deploy -j 1 + ``` You can also set an environment variable for single thread deployment by default: `STATIC_CONTENT_THREADS = 1`. diff --git a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md index 06730d5b03b..718dda5efb2 100644 --- a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md +++ b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md @@ -26,13 +26,13 @@ As a work-around, complete the following: 1. Copy the file `app/etc/config.local.php` to your local. 2. Edit and remove the minify section from `config.local.php`: -```php + ```php 'template' => array ( 'allow_symlink' => '0', 'minify_html' => '1', ), -``` + ``` 2. Modify the setting for minify in the database with this command: @@ -40,10 +40,10 @@ As a work-around, complete the following: update core_config_data set value=0 where path ='dev/template/minify_html' 3. Flush all caches. -```bash -bin/magento cache:flush -redis-cli -h <> -p <> flushall -``` + ```bash + bin/magento cache:flush + redis-cli -h <> -p <> flushall + ``` 4. Remove all `base_url` related items in `config.local.php`. 5. Save changes and complete full deployment of `config.local.php`: push to Git branch, build and deploy, and deploy across environments as needed. diff --git a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md index e892255de96..c2816d1fbc7 100644 --- a/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md +++ b/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.md @@ -12,22 +12,25 @@ functional_areas: ### Problem: Error upgrading from CE to EE {#ce-ee} Your upgrade from **{{site.data.var.ce}}** to **{{site.data.var.ee}}** might fail with the following error: + ```terminal [2016-01-19 23:33:24 UTC] An error occurred while executing job "setup:upgrade {"command":"setup:upgrade"}": Could not complete setup:upgrade {"command":"setup:upgrade"} successfully: Source class "\Cybersource" for "CybersourceLogger" generation does not exist. ``` + If this error displays, resolve it as follows: 1. Log in to your Magento server as the {% glossarytooltip 5e7de323-626b-4d1b-a7e5-c8d13a92c5d3 %}Magento file system owner{% endglossarytooltip %}. 2. Enter the following commands in the order shown: -```bash -php /bin/magento setup:upgrade -``` + ```bash + php /bin/magento setup:upgrade + ``` 3. After the command completes, verify your upgrade was successful: -```bash -bin/magento --version -``` + + ```bash + bin/magento --version + ``` diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md index d0d052a4b0b..77195e0e559 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.md @@ -67,4 +67,4 @@ The following message displays to confirm success: ```terminal Generated code and dependency injection configuration successfully. -``` \ No newline at end of file +``` diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md index 30778b26bf8..b0a34127c40 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.md @@ -43,9 +43,9 @@ You have options for using the translated dictionary: Command options: -```bash -bin/magento i18n:collect-phrases [-o|--output=""] [-m|--magento] -``` + ```bash + bin/magento i18n:collect-phrases [-o|--output=""] [-m|--magento] + ``` The following table explains this command's parameters and values: @@ -218,12 +218,13 @@ The following sections provide end-to-end examples of using the commands discuss To add a German translation to a module or theme that you want to distribute to other merchants: 1. Collect phrases from your module: -```bash -bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/code/ExampleCorp/SampleModule/i18n/xx_YY.csv" /var/www/html/magento2/app/code/ExampleCorp/SampleModule -``` + + ```bash + bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/code/ExampleCorp/SampleModule/i18n/xx_YY.csv" /var/www/html/magento2/app/code/ExampleCorp/SampleModule + ``` {:.bs-callout .bs-callout-info} - The .csv file name must _exactly match_ the locale, including the characters' case. + The .csv file name must _exactly match_ the locale, including the characters' case. 1. Translate the words and phrases using [these guidelines](#config-cli-subcommands-xlate-dict-trans). 1. If necessary, copy `xx_YY.csv` to `/var/www/html/magento2/app/code/ExampleCorp/SampleModule/i18n` or to the module's theme directory (depending on whether the translation dictionary is for a module or a theme). @@ -233,19 +234,20 @@ bin/magento i18n:collect-phrases -o "/var/www/html/magento2/app/code/ExampleCorp Similar to the preceding example, generate a `.csv` file, but instead of specifying a module or theme directory, specify the entire Magento application root directory. The resulting `.csv` contains any phrases that the command could find in the code. 1. Collect phrases from your module: -```bash -bin/magento i18n:collect-phrases -o "/var/www/html/magento2/xx_YY.csv" -m -``` -{:.bs-callout .bs-callout-info} -The `.csv` file name must _exactly match_ the locale, including the characters' case. + ```bash + bin/magento i18n:collect-phrases -o "/var/www/html/magento2/xx_YY.csv" -m + ``` + + {:.bs-callout .bs-callout-info} + The `.csv` file name must _exactly match_ the locale, including the characters' case. 1. Translate the words and phrases using [these guidelines](#config-cli-subcommands-xlate-dict-trans). 1. Create the language package. -```bash -bin/magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY -``` + ```bash + bin/magento i18n:pack /var/www/html/magento2/xx_YY.csv -d xx_YY + ``` 1. Create a directory for the language package. diff --git a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md index 560a3922e14..f85c930c9d4 100644 --- a/guides/v2.1/config-guide/prod/prod_file-sys-perms.md +++ b/guides/v2.1/config-guide/prod/prod_file-sys-perms.md @@ -70,15 +70,15 @@ To remove write permissions to files and directories from the web server user's 1. Change to production mode. -```bash -bin/magento deploy:mode:set production -``` + ```bash + bin/magento deploy:mode:set production + ``` 1. Remove write permissions to the following directories. -```bash -find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type f -or -type d \) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php && chmod u+x bin/magento -``` + ```bash + find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type f -or -type d \) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php && chmod u+x bin/magento + ``` #### Make code files and directories writable: @@ -88,9 +88,9 @@ To make files and directories writable so you can update components and upgrade 2. Change to your Magento installation directory. 3. Enter the following commands: -```bash -chmod -R u+w . -``` + ```bash + chmod -R u+w . + ``` ### Optionally set `magento_umask` @@ -141,9 +141,11 @@ 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: + ```bash cd find var pub/static pub/media app/etc -type f -exec chmod g+w {} + find var pub/static pub/media app/etc -type d -exec chmod g+ws {} + + ``` ### Two Magento file system owners in production mode {#mage-owner-two-prod} @@ -167,15 +169,15 @@ 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: -```bash -bin/magento deploy:mode:set production -``` + ```bash + bin/magento deploy:mode:set production + ``` 3. Enter the following command as a user with `root` privileges: -```bash -find app/code lib pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type d -or -type f \) -exec chmod g-w {} + && chmod o-rwx app/etc/env.php -``` + ```bash + find app/code lib pub/static app/etc var/generation var/di var/view_preprocessed vendor \( -type d -or -type f \) -exec chmod g-w {} + && chmod o-rwx app/etc/env.php + ``` #### Make code files and directories writable: @@ -185,8 +187,8 @@ To make files and directories writable so you can update components and upgrade 2. Change to your Magento installation directory. 3. Enter the following command: -```bash -find app/code lib var pub/static pub/media vendor app/etc \( -type d -or -type f \) -exec chmod g+w {} + && chmod o+rwx app/etc/env.php -``` + ```bash + find app/code lib var pub/static pub/media vendor app/etc \( -type d -or -type f \) -exec chmod g+w {} + && chmod o+rwx app/etc/env.php + ``` {% endcollapsibleh2 %} diff --git a/guides/v2.1/config-guide/solr/solr-magento.md b/guides/v2.1/config-guide/solr/solr-magento.md index e235741d341..b07ecd07f83 100644 --- a/guides/v2.1/config-guide/solr/solr-magento.md +++ b/guides/v2.1/config-guide/solr/solr-magento.md @@ -26,21 +26,21 @@ The example Solr configuration is _not_ intended to be used in a production site 1. As a user with root privileges, enter the following commands in the order shown to copy over the Solr configuration with the one packaged with {{site.data.var.ee}}: -```bash -cd /example/solr -cp -R collection1 magento2 -cd magento2 -cp -R /vendor/magento/module-solr/conf/* ./conf/ -``` + ```bash + cd /example/solr + cp -R collection1 magento2 + cd magento2 + cp -R /vendor/magento/module-solr/conf/* ./conf/ + ``` For example, if Solr is installed in /opt/solr/solr-4.10.4 and {{site.data.var.ee}} is installed in /var/www/magento/html/magento2ee, enter: -```bash -cd /opt/solr/solr/solr-4.10.4/example/solr -cp -R collection1 magento2 -cd magento2 -cp -R /var/www/html/magento2ee/vendor/magento/module-solr/conf/* ./conf/ -``` + ```bash + cd /opt/solr/solr/solr-4.10.4/example/solr + cp -R collection1 magento2 + cd magento2 + cp -R /var/www/html/magento2ee/vendor/magento/module-solr/conf/* ./conf/ + ``` {:.bs-callout .bs-callout-info} If you're prompted to overwrite files, try the command `\cp -R /vendor/magento/module-solr/conf/* .`. @@ -73,10 +73,10 @@ cp -R /var/www/html/magento2ee/vendor/magento/module-solr/conf/* ./conf/ As a user with root privileges, enter the following command to start Solr: -```bash -cd /example -java -jar start.jar -``` + ```bash + cd /example + java -jar start.jar + ``` {:.bs-callout .bs-callout-warning} This method for starting Solr is for convenience and testing purposes only. In a production environment, you should start and stop Solr using a script as discussed in [Script Solr startup and shutdown]({{ page.baseurl }}/config-guide/solr/solr-script.html#solr-script). @@ -191,15 +191,15 @@ To reindex using the command line: 1. Log in to your Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. Enter the following command to reindex all indexers: -```bash -php /bin/magento indexer:reindex -``` + ```bash + php /bin/magento indexer:reindex + ``` Enter the following command to reindex the catalog search index only: -```bash -php /bin/magento indexer:reindex catalogsearch_fulltext -``` + ```bash + php /bin/magento indexer:reindex catalogsearch_fulltext + ``` 3. Wait while the indexers are reindexed. diff --git a/guides/v2.1/install-gde/install/cli/dev_downgrade.md b/guides/v2.1/install-gde/install/cli/dev_downgrade.md index 2b833280710..370ac270875 100644 --- a/guides/v2.1/install-gde/install/cli/dev_downgrade.md +++ b/guides/v2.1/install-gde/install/cli/dev_downgrade.md @@ -33,28 +33,28 @@ To change versions after cloning: 1. Log in to your Magento server as, or switch to, [the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 2. Use the following command to uninstall the Magento software: -```bash -php /bin/magento setup:uninstall -``` + ```bash + php /bin/magento setup:uninstall + ``` 3. Either remove your old Magento clone directory or [update the Magento software]({{ page.baseurl }}/install-gde/install/cli/dev_update-magento.html). 4. If you haven't already done so, clone the Magento 2 GitHub repository as follows: -```bash -git clone git@github.com:magento/magento2.git -``` + ```bash + git clone git@github.com:magento/magento2.git + ``` 5. Change to [release tag](https://github.com/magento/magento2/tags){:target="_blank"} as follows: -```bash -git checkout tags/ [-b ] -``` + ```bash + git checkout tags/ [-b ] + ``` For example, to check out the 2.0.6 release tag in a new branch named `2.0.6`, enter -```bash -git checkout tags/2.0.6 -b 2.0.6 -``` + ```bash + git checkout tags/2.0.6 -b 2.0.6 + ``` 5. Install the Magento software using 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). @@ -66,24 +66,27 @@ 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 + ```bash + php /bin/magento setup:backup --code --media --db + ``` + 3. Change to [release tag](https://github.com/magento/magento2/tags){:target="_blank"} as follows: -```bash -git checkout tags/ [-b ] -``` + ```bash + git checkout tags/ [-b ] + ``` For example, to check out the 2.0.2 release tag in a new branch named `2.0.2`, enter -```bash -git checkout tags/2.0.2 -b 2.0.2 -``` + ```bash + git checkout tags/2.0.2 -b 2.0.2 + ``` 4. Manually clear Magento `var` directories: -```bash -rm -rf /var/cache/* /var/page_cache/* /var/generation/* -``` + ```bash + rm -rf /var/cache/* /var/page_cache/* /var/generation/* + ``` 5. Install the Magento software in your new database instance. diff --git a/guides/v2.1/install-gde/install/cli/dev_update-magento.md b/guides/v2.1/install-gde/install/cli/dev_update-magento.md index c7bf277207a..7014f945ad9 100644 --- a/guides/v2.1/install-gde/install/cli/dev_update-magento.md +++ b/guides/v2.1/install-gde/install/cli/dev_update-magento.md @@ -19,35 +19,35 @@ To update the Magento software if you're a contributing developer: 1. Log in to your Magento server as, or switch to, the [Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). 3. Save any changes you made to `composer.json` because the following steps will overwrite it: -```bash -cd -cp composer.json composer.json.old -``` + ```bash + cd + cp composer.json composer.json.old + ``` 3. Update your local repository to get the latest code: -```bash -git pull origin develop -``` + ```bash + git pull origin develop + ``` {:.bs-callout .bs-callout-info} - If `git pull origin develop` fails, see [troubleshooting]({{ page.baseurl }}/install-gde/trouble/git/tshoot_git-pull-origin.html). + If `git pull origin develop` fails, see [troubleshooting]({{ page.baseurl }}/install-gde/trouble/git/tshoot_git-pull-origin.html). 3. Diff and merge your `composer.json.old` with `composer.json` installed with the Magento software. 4. Enter the following command: -```bash -composer update -``` + ```bash + composer update + ``` 5. Update the Magento database: -```bash -/bin/magento setup:upgrade -``` + ```bash + /bin/magento setup:upgrade + ``` 6. Clean the cache: -```bash -bin/magento cache:clean -``` \ No newline at end of file + ```bash + bin/magento cache:clean + ``` From 7c65dae43e8b10e862558b985411838c04763c54 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Sat, 20 Apr 2019 01:16:08 +0300 Subject: [PATCH 05/23] magento/devdocs#: Format Bash --- .../starter-develop-deploy-workflow.md | 4 ++-- guides/v2.1/cloud/before/before-setup-env-install.md | 4 +++- guides/v2.1/cloud/cdn/configure-fastly.md | 4 ++-- guides/v2.1/cloud/cdn/trouble-fastly.md | 4 ++-- guides/v2.1/cloud/configure/setup-cron-jobs.md | 12 ++++++------ guides/v2.1/cloud/docker/docker-development-debug.md | 6 +++--- guides/v2.1/cloud/howtos/install-components.md | 10 +++++----- guides/v2.1/cloud/live/live-sanity-check.md | 8 ++++---- guides/v2.1/cloud/live/sens-data-initial.md | 4 ++-- guides/v2.1/cloud/live/sens-data-over.md | 8 ++++---- .../cloud/project/project-conf-files_magento-app.md | 2 +- guides/v2.1/cloud/project/project-upgrade.md | 2 +- guides/v2.1/cloud/reference/cloud-composer.md | 4 ++-- guides/v2.1/cloud/reference/discover-deploy.md | 6 +++--- .../cloud/release-notes/CloudReleaseNotes101.7.md | 2 +- .../cloud/release-notes/cloud-release-archive.md | 2 +- .../cloud/setup/first-time-setup-import-import.md | 12 +++++++++--- guides/v2.1/cloud/trouble/redis-troubleshooting.md | 2 +- guides/v2.1/cloud/trouble/theme-troubleshooting.md | 2 +- .../cloud/trouble/trouble-error-html-minification.md | 6 +++--- 20 files changed, 56 insertions(+), 48 deletions(-) diff --git a/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md b/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md index 9ab7e94cc75..fcf8f735366 100644 --- a/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md +++ b/guides/v2.1/cloud/basic-information/starter-develop-deploy-workflow.md @@ -107,8 +107,8 @@ If you are familiar with Magento, you may be concerned about how to get your con {{site.data.var.ece}} provides a set of two [Configuration Management]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html) commands that export configuration settings from your environment into a file. These commands are only available for **{{site.data.var.ece}} 2.1.4 and later** (not 2.2). -* `bin/magento magento-cloud:scd-dump`: Recommended. Exports only the configuration settings you have entered or modified from defaults into a configuration file. -* `bin/magento app:config:dump`: Exports every configuration setting, including modified and default, into a configuration file. +* `php bin/magento magento-cloud:scd-dump`: Recommended. Exports only the configuration settings you have entered or modified from defaults into a configuration file. +* `php bin/magento app:config:dump`: Exports every configuration setting, including modified and default, into a configuration file. The generated file is located in `app/etc/`: 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 1fa397cf3f9..ef529bbde6e 100644 --- a/guides/v2.1/cloud/before/before-setup-env-install.md +++ b/guides/v2.1/cloud/before/before-setup-env-install.md @@ -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: - bin/magento info:adminuri + ```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/configure-fastly.md b/guides/v2.1/cloud/cdn/configure-fastly.md index 35801fb2f7d..5d5e72d5db0 100644 --- a/guides/v2.1/cloud/cdn/configure-fastly.md +++ b/guides/v2.1/cloud/cdn/configure-fastly.md @@ -131,7 +131,7 @@ updated settings and full VCL snippet uploading support. Don't configure the module in your local before building and deploying. You'll configure the module in those environments. -We recommend using the `bin/magento magento-cloud:scd-dump` command for +We recommend using the `php bin/magento magento-cloud:scd-dump` command for Configuration Management([2.1.X]({{ site.baseurl }}/guides/v2.1/cloud/live/sens-data-over.html#cloud-config-specific-recomm), [2.2.X]({{ site.baseurl }}/guides/v2.2/cloud/live/sens-data-over.html#cloud-config-specific-recomm)). When you use the `app:config:dump` command, all configuration options for Fastly @@ -151,7 +151,7 @@ You cannot use the Fastly service in Integration environments. 3. Enter the following command to fully update and clear the cache: ```bash - bin/magento setup:upgrade && bin/magento cache:clean + php bin/magento setup:upgrade && php bin/magento cache:clean ``` 4. Edit your composer.json and ensure the Fastly module is included with version. diff --git a/guides/v2.1/cloud/cdn/trouble-fastly.md b/guides/v2.1/cloud/cdn/trouble-fastly.md index 6d63deefcbc..e954a5839f4 100644 --- a/guides/v2.1/cloud/cdn/trouble-fastly.md +++ b/guides/v2.1/cloud/cdn/trouble-fastly.md @@ -252,7 +252,7 @@ This section provides suggestions for resolving errors returned when checking re If the Fastly module is not enabled (`Fastly-Module-Enabled: no`) or if the header is missing, [use SSH to log in]({{ page.baseurl }}/cloud/env/environments-ssh.html#magento-cli) to the project. Then, run the following command to check the module status. ```bash -bin/magento module:status Fastly_Cdn +php bin/magento module:status Fastly_Cdn ``` Based on the status returned, use the following instructions to update the Fastly configuration. @@ -269,7 +269,7 @@ Based on the status returned, use the following instructions to update the Fastl If the module is not enabled (`Fastly_CDN => 0`) in the `config.php` file, delete the file and run the following command to update `config.php` with the latest configuration settings. ```bash - bin/magento magento-cloud:scd-dump + php bin/magento magento-cloud:scd-dump ``` #### Fastly VCL has not been uploaded {#no-VCL} diff --git a/guides/v2.1/cloud/configure/setup-cron-jobs.md b/guides/v2.1/cloud/configure/setup-cron-jobs.md index 16c97a09e3d..c80d023691d 100644 --- a/guides/v2.1/cloud/configure/setup-cron-jobs.md +++ b/guides/v2.1/cloud/configure/setup-cron-jobs.md @@ -27,7 +27,7 @@ You will add the cron job to `.magento.app.yaml` in the `crons` section. The gen crons: productcatalog: spec: '20 */3 * * *' - cmd: 'bin/magento indexer:reindex catalog_product_category' + cmd: 'php bin/magento indexer:reindex catalog_product_category' ``` The following example is the default cron included for {{site.data.var.ece}}. @@ -38,7 +38,7 @@ The following example is the default cron included for {{site.data.var.ece}}. crons: cronrun: spec: "* * * * *" - cmd: "bin/magento cron:run" + cmd: "php bin/magento cron:run" ``` {:.bs-callout .bs-callout-info} @@ -77,7 +77,7 @@ With the settings: * `` is `/usr/bin/php` * `/app/abc123edf890` is the install directory, which includes the Project ID for this example -* `bin/magento indexer:reindex catalog_category_product` is the script actions +* `php bin/magento indexer:reindex catalog_category_product` is the script actions ## Add cron jobs to .magento.app.yaml {#add-cron} @@ -94,7 +94,7 @@ We include a default cron job for Magento in the default file: crons: cronrun: spec: "* * * * *" - cmd: "bin/magento cron:run" + cmd: "php bin/magento cron:run" ``` 1. Edit `.magento.app.yaml` in the root directory of the Magento code in the Git branch. @@ -106,10 +106,10 @@ crons: crons: magento: spec: '* * * * *' - cmd: 'bin/magento cron:run' + cmd: 'php bin/magento cron:run' productcatalog: spec: '20 */3 * * *' - cmd: 'bin/magento indexer:reindex catalog_product_category' + cmd: 'php bin/magento indexer:reindex catalog_product_category' ``` 4. Save the file and push updates to the Git branch. diff --git a/guides/v2.1/cloud/docker/docker-development-debug.md b/guides/v2.1/cloud/docker/docker-development-debug.md index ba8acf924d1..f301d93fb80 100644 --- a/guides/v2.1/cloud/docker/docker-development-debug.md +++ b/guides/v2.1/cloud/docker/docker-development-debug.md @@ -111,10 +111,10 @@ You can debug any Magento command or PHP script using the following steps. 1. Open the _Run/Debug Configuration_ window and add a new **PHP script** with the following settings: - - **Name**—Enter `bin/magento`. - - **Configuration** > **File**—Select the path to the `bin/magento` file in your local environment. + - **Name**—Enter `php bin/magento`. + - **Configuration** > **File**—Select the path to the `php bin/magento` file in your local environment. -1. Add breakpoints in the `bin/magento` file and the debug PHP script created in the previous step. +1. Add breakpoints in the `php bin/magento` file and the debug PHP script created in the previous step. ## Using Xdebug Helper diff --git a/guides/v2.1/cloud/howtos/install-components.md b/guides/v2.1/cloud/howtos/install-components.md index cea3409ac2e..5090ece7109 100644 --- a/guides/v2.1/cloud/howtos/install-components.md +++ b/guides/v2.1/cloud/howtos/install-components.md @@ -87,7 +87,7 @@ To verify the extension installed properly, you can check its functionality in t 1. Enter the following command to display a list of enabled modules: ```bash - bin/magento module:status + php bin/magento module:status ``` 1. Verify the extension is listed. @@ -106,25 +106,25 @@ You can use CLI commands or directly edit `app/etc/config.php` to enable or disa 1. List all modules: ```bash - bin/magento module:status + php bin/magento module:status ``` 1. Enable a module. ```bash - bin/magento module:enable + php bin/magento module:enable ``` 1. Disable a module. ```bash - bin/magento module:disable + php bin/magento module:disable ``` 1. Verify the status of a module: ```bash - bin/magento module:status + php bin/magento module:status ``` Also, you can navigate to, and edit, the `app/etc/config.php` file to verify the module is disabled. diff --git a/guides/v2.1/cloud/live/live-sanity-check.md b/guides/v2.1/cloud/live/live-sanity-check.md index 6e4cc86b248..f288dbd73b2 100644 --- a/guides/v2.1/cloud/live/live-sanity-check.md +++ b/guides/v2.1/cloud/live/live-sanity-check.md @@ -133,7 +133,7 @@ Before you continue, you must know the file system path to any patch we provided 1. Compile code and the dependency injection configuration: ```bash - bin/magento setup:di:compile + php bin/magento setup:di:compile ``` This command can take several minutes to complete and produces messages similar to the following: @@ -172,20 +172,20 @@ We highly recommend having Magento already installed prior to deployment. During 3. Enter the following command: ```bash - bin/magento setup:upgrade + 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: ```bash - bin/magento cache:clean + php bin/magento cache:clean ``` 5. Set the Magento application for [production mode]({{ page.baseurl }}/config-guide/bootstrap/magento-modes.html#production-mode): ```bash - bin/magento deploy:mode:set production + 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 1ddaf4f8cea..114a46a5bf4 100644 --- a/guides/v2.1/cloud/live/sens-data-initial.md +++ b/guides/v2.1/cloud/live/sens-data-initial.md @@ -207,13 +207,13 @@ To generate a new file: 2. Create `config.local.php` on the integration server. ```bash - ssh "bin/magento magento-cloud:scd-dump" + ssh "php bin/magento magento-cloud:scd-dump" ``` For example, ```bash - ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "bin/magento magento-cloud:scd-dump" + ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "php bin/magento magento-cloud:scd-dump" ``` 5. If you haven't done so already, change to the project root directory. diff --git a/guides/v2.1/cloud/live/sens-data-over.md b/guides/v2.1/cloud/live/sens-data-over.md index 26b63c6242a..7cd074e9d1f 100644 --- a/guides/v2.1/cloud/live/sens-data-over.md +++ b/guides/v2.1/cloud/live/sens-data-over.md @@ -27,7 +27,7 @@ Magento's store configurations are stored in the database. When updating configu After configuring your environment, generate the file using one of the following commands: -* `bin/magento magento-cloud:scd-dump`: **Recommended**. Exports only modified configuration settings +* `php bin/magento magento-cloud:scd-dump`: **Recommended**. Exports only modified configuration settings * `php ./vendor/bin/ece-tools config:dump`: Exports every configuration setting, including modified and default settings {:.bs-callout .bs-callout-warning} @@ -41,7 +41,7 @@ If sensitive data is found in your configurations, it is generated as environmen ### Switching between commands {#commands} -Can you switch between using `bin/magento magento-cloud:scd-dump` and `php ./vendor/bin/ece-tools config:dump`? Yes, you can. +Can you switch between using `php bin/magento magento-cloud:scd-dump` and `php ./vendor/bin/ece-tools config:dump`? Yes, you can. For 2.1.4 and later (not 2.2.X), you can always delete the `config.local.php` file and regenerate it with either command. Remember, `scd-dump` only pulls configured values (not defaults) and `config:dump` captures all values (default and modified). @@ -77,7 +77,7 @@ All system configurations are set during deployment according to the following o ## Configuration settings you can change {#cloud-clp-settings} -The following table shows the configuration settings affected by the `bin/magento magento-cloud:scd-dump` command. These are the configuration settings that you can manage in Git. If you use `php ./vendor/bin/ece-tools config:dump`, all settings are exported. +The following table shows the configuration settings affected by the `php bin/magento magento-cloud:scd-dump` command. These are the configuration settings that you can manage in Git. If you use `php ./vendor/bin/ece-tools config:dump`, all settings are exported. The `config.local.php` file includes the following settings and configuration values: @@ -150,7 +150,7 @@ Complete all configurations for your stores in the Admin console: For example, for Pro on the Integration branch: - ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "bin/magento magento-cloud:scd-dump" + ssh itnu84v4m4e5k-master-ouhx5wq@ssh.us.magentosite.cloud "php bin/magento magento-cloud:scd-dump" ### Step 2: Transfer and add the file to Git {#transfer-file} diff --git a/guides/v2.1/cloud/project/project-conf-files_magento-app.md b/guides/v2.1/cloud/project/project-conf-files_magento-app.md index 3f5663da96f..4f4c9e6b4c9 100644 --- a/guides/v2.1/cloud/project/project-conf-files_magento-app.md +++ b/guides/v2.1/cloud/project/project-conf-files_magento-app.md @@ -278,7 +278,7 @@ A sample Magento cron job follows: crons: cronrun: spec: "* * * * *" - cmd: "bin/magento cron:run" + cmd: "php bin/magento cron:run" ``` For {{site.data.var.ece}} 2.1.X, you can use only workers and [cron jobs](#crons). For {{site.data.var.ece}} 2.2.X, cron jobs launch consumers to process batches of messages, and do not require additional configuration. diff --git a/guides/v2.1/cloud/project/project-upgrade.md b/guides/v2.1/cloud/project/project-upgrade.md index 04debaf9eda..384e3cc8b95 100644 --- a/guides/v2.1/cloud/project/project-upgrade.md +++ b/guides/v2.1/cloud/project/project-upgrade.md @@ -46,7 +46,7 @@ You can upgrade the core {{site.data.var.ee}} code base to version 2.1. If you n 1. Verify the upgrade in your Integration, Staging, or Production environment by using SSH to log in and check the version. ```bash - bin/magento --version + php bin/magento --version ``` ## Verify and upgrade your extensions {#extensions} diff --git a/guides/v2.1/cloud/reference/cloud-composer.md b/guides/v2.1/cloud/reference/cloud-composer.md index 508070bddbf..0e24418e154 100644 --- a/guides/v2.1/cloud/reference/cloud-composer.md +++ b/guides/v2.1/cloud/reference/cloud-composer.md @@ -48,8 +48,8 @@ This package depends on a floating version of `magento/magento-cloud-configurati This package contains the following scripts and `magento` commands that automatically perform building and deployment of the codebase on the cloud environment: * `pre-deploy.php` - * `bin/magento magento-cloud:deploy` - * `bin/magento magento-cloud:build` + * `php bin/magento magento-cloud:deploy` + * `php bin/magento magento-cloud:build` `magento/magento-cloud-configuration` also contains patch files that are specific to Cloud. diff --git a/guides/v2.1/cloud/reference/discover-deploy.md b/guides/v2.1/cloud/reference/discover-deploy.md index b05320e3a44..4eaadaa36b6 100644 --- a/guides/v2.1/cloud/reference/discover-deploy.md +++ b/guides/v2.1/cloud/reference/discover-deploy.md @@ -97,7 +97,7 @@ During the build phase, the site is not in maintenance mode and will not be brou This phase builds the codebase and runs hooks in the `build` section of `.magento.app.yaml`. The default Magento build hook is the `magento-cloud:build` command and performs the following: - Applies patches located in `vendor/magento/ece-patches`, as well as optional, project-specific patches in `m2-hotfixes` -- Regenerates code and the {% glossarytooltip 2be50595-c5c7-4b9d-911c-3bf2cd3f7beb %}dependency injection{% endglossarytooltip %} configuration (that is, the `var/generation` and `var/di` directories) using `bin/magento setup:di:compile`. +- Regenerates code and the {% glossarytooltip 2be50595-c5c7-4b9d-911c-3bf2cd3f7beb %}dependency injection{% endglossarytooltip %} configuration (that is, the `var/generation` and `var/di` directories) using `php bin/magento setup:di:compile`. - Checks if the [`app/etc/config.php`]({{ page.baseurl }}/cloud/live/sens-data-over.html) file exists in the codebase. Magento auto-generates this file it does not detect it during the build phase and includes a list of modules and extensions. If it exists, the build phase continues as normal, compresses static files using `gzip`, and deploys the files, which reduces downtime in the deployment phase. Refer to [Magento build options]({{ site.baseurl }}/guides/v2.1/cloud/env/variables-build.html) to learn about customizing or disabling file compression. {:.bs-callout .bs-callout-info} @@ -149,9 +149,9 @@ Refer to [Magento deploy variables]({{ site.baseurl }}/guides/v2.1/cloud/env/var There are two default deploy hooks. The `pre-deploy.php` hook completes necessary cleanup and retrieval of resources and code generated in the build hook. The `php ./vendor/bin/m2-ece-deploy` hook runs a series of commands and scripts: -- If Magento is **not installed**, it installs Magento with `bin/magento setup:install`, updates the deployment configuration, `app/etc/env.php`, and the database for your specified environment, such as Redis and website URLs. **Important:** When you completed the [First time deployment]({{ page.baseurl }}/cloud/setup/first-time-deploy.html) during setup, {{site.data.var.ee}} was installed and deployed across all environments. +- If Magento is **not installed**, it installs Magento with `php bin/magento setup:install`, updates the deployment configuration, `app/etc/env.php`, and the database for your specified environment, such as Redis and website URLs. **Important:** When you completed the [First time deployment]({{ page.baseurl }}/cloud/setup/first-time-deploy.html) during setup, {{site.data.var.ee}} was installed and deployed across all environments. -- If Magento **is installed**, performs any necessary upgrades. The deployment script runs [`bin/magento setup:upgrade`]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-db-upgr.html) to update the database schema and data (which is necessary after extension or core code updates), and also updates the [deployment configuration]({{ page.baseurl }}/config-guide/config/config-php.html), `app/etc/env.php`, and the database for your environment. Finally, the deployment script clears the Magento cache. +- If Magento **is installed**, performs any necessary upgrades. The deployment script runs [`php bin/magento setup:upgrade`]({{ page.baseurl }}/install-gde/install/cli/install-cli-subcommands-db-upgr.html) to update the database schema and data (which is necessary after extension or core code updates), and also updates the [deployment configuration]({{ page.baseurl }}/config-guide/config/config-php.html), `app/etc/env.php`, and the database for your environment. Finally, the deployment script clears the Magento cache. - The script optionally generates static web content using the command [`magento setup:static-content:deploy`]({{ page.baseurl }}/config-guide/cli/config-cli-subcommands-static-view.html). diff --git a/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md b/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md index cfd20f4cc6d..d14c24c867e 100644 --- a/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md +++ b/guides/v2.1/cloud/release-notes/CloudReleaseNotes101.7.md @@ -37,7 +37,7 @@ In `magento-cloud-configuration` releases 101.7.3, 101.7.4, 101.7.5, and 101.7.6 ### 101.7.3 changes -* Magento no longer throws an error when only the default store issued. Previously, when only the default store is used, Magento threw the following error when running `bin/magento magento-cloud:scd-dump`: +* Magento no longer throws an error when only the default store issued. Previously, when only the default store is used, Magento threw the following error when running `php bin/magento magento-cloud:scd-dump`: Exception] Notice: Undefined index: stores in /app/vendor/magento/magento-cloud-configuration/src/Magento/MagentoCloud/Console/Command/SCDConfigDump.php on line 91 diff --git a/guides/v2.1/cloud/release-notes/cloud-release-archive.md b/guides/v2.1/cloud/release-notes/cloud-release-archive.md index a8c12bb83ec..9940fd22c8b 100644 --- a/guides/v2.1/cloud/release-notes/cloud-release-archive.md +++ b/guides/v2.1/cloud/release-notes/cloud-release-archive.md @@ -24,7 +24,7 @@ We merged `vendor/magento/ece-patches` with `vendor/magento/ece-tools` in this r - **Backup configuration files**—The deployment process now automatically creates a backup of the `app/etc/env.php` and `app/etc/config.php` configuration files after deployment. We also added a [new CLI command]({{ site.baseurl }}/guides/v2.1/cloud/trouble/restore-configuration-files.html) to restore these configuration files from a backup. -- **Troubleshooting validation errors**—We changed the command you must use to resolve validation errors when `config.php` does not contain enough data for static content deployment. Previously, the error message instructed you to run `bin/magento app:config:dump`. Now, you must run `php ./vendor/bin/ece-tools config:dump`. +- **Troubleshooting validation errors**—We changed the command you must use to resolve validation errors when `config.php` does not contain enough data for static content deployment. Previously, the error message instructed you to run `php bin/magento app:config:dump`. Now, you must run `php ./vendor/bin/ece-tools config:dump`. - **New environment variables**—You can now use environment variables to connect custom [search]({{ site.baseurl }}/guides/v2.1/cloud/env/variables-deploy.html#search_configuration) and [AMQP-based]({{ site.baseurl }}/guides/v2.1/cloud/env/variables-deploy.html#queue_configuration) services to your site. diff --git a/guides/v2.1/cloud/setup/first-time-setup-import-import.md b/guides/v2.1/cloud/setup/first-time-setup-import-import.md index 412e41a1a0a..7c857c6d354 100755 --- a/guides/v2.1/cloud/setup/first-time-setup-import-import.md +++ b/guides/v2.1/cloud/setup/first-time-setup-import-import.md @@ -279,10 +279,16 @@ To import media files into your Cloud environment: On the Cloud environment, enter the following commands in the order shown: +```bash +php bin/magento setup:upgrade ``` -bin/magento setup:upgrade -bin/magento magento setup:static-content:deploy -bin/magento cache:clean + +```bash +php bin/magento magento setup:static-content:deploy +``` + +```bash +php bin/magento cache:clean ``` After the {% glossarytooltip 0bc9c8bc-de1a-4a06-9c99-a89a29c30645 %}cache{% endglossarytooltip %} flushes, enter `exit` to close the SSH tunnel. diff --git a/guides/v2.1/cloud/trouble/redis-troubleshooting.md b/guides/v2.1/cloud/trouble/redis-troubleshooting.md index 6061f1b0435..e36561b819b 100644 --- a/guides/v2.1/cloud/trouble/redis-troubleshooting.md +++ b/guides/v2.1/cloud/trouble/redis-troubleshooting.md @@ -66,7 +66,7 @@ If you continue to encounter these issues after using this method of deployment, 3. Run the following command to reduce deployment threads: ```bash - bin/magento setup:static-content:deploy -j 1 + php bin/magento setup:static-content:deploy -j 1 ``` You can also set an environment variable for single thread deployment by default: `STATIC_CONTENT_THREADS = 1`. diff --git a/guides/v2.1/cloud/trouble/theme-troubleshooting.md b/guides/v2.1/cloud/trouble/theme-troubleshooting.md index 3bd707611b2..2b3a8f9bb1b 100644 --- a/guides/v2.1/cloud/trouble/theme-troubleshooting.md +++ b/guides/v2.1/cloud/trouble/theme-troubleshooting.md @@ -18,7 +18,7 @@ To resolve, you need the SSH information and store URL available through the [Pr 1. Regenerate the image cache: ```bash - bin/magento catalog:images:resize + php bin/magento catalog:images:resize ``` 1. Test the category pages through the store URL. diff --git a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md index 718dda5efb2..50fe9e7cffe 100644 --- a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md +++ b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md @@ -17,9 +17,9 @@ This topic discusses solutions to typical issues you might experience by HTML mi ### Website load errors after scd-dump, build, and deploy -After using the command `bin/magento magento-cloud:scd-dump` to generate config.local.php, your website may encounter errors after build and deploy. When accessing the site, you may receive the error "failed to open stream: No such file or directory" for a series of files. +After using the command `php bin/magento magento-cloud:scd-dump` to generate config.local.php, your website may encounter errors after build and deploy. When accessing the site, you may receive the error "failed to open stream: No such file or directory" for a series of files. -The issue is due to an issue of enabling HTML minification and the setting in `config.local.php` when using `bin/magento magento-cloud:scd-dump`. +The issue is due to an issue of enabling HTML minification and the setting in `config.local.php` when using `php bin/magento magento-cloud:scd-dump`. As a work-around, complete the following: @@ -41,7 +41,7 @@ As a work-around, complete the following: 3. Flush all caches. ```bash - bin/magento cache:flush + php bin/magento cache:flush redis-cli -h <> -p <> flushall ``` From 8684ef7c133fbac50961e17fcc0f9c3a528f9eeb Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Sat, 20 Apr 2019 01:18:39 +0300 Subject: [PATCH 06/23] magento/devdocs#: Format Bash --- guides/v2.1/cloud/cdn/configure-fastly.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/v2.1/cloud/cdn/configure-fastly.md b/guides/v2.1/cloud/cdn/configure-fastly.md index 5d5e72d5db0..3251fb1f3fd 100644 --- a/guides/v2.1/cloud/cdn/configure-fastly.md +++ b/guides/v2.1/cloud/cdn/configure-fastly.md @@ -168,7 +168,7 @@ You cannot use the Fastly service in Integration environments. 3. Add, commit, and push the changes to your code repository with the following command: ```bash - git add -A; git commit -m "Install Fastly"; git push origin + git add -A; git commit -m "Install Fastly" && git push origin ``` 4. Merge the branch code with the `master` Integration branch. From 70d75b1020ee95919cab74deb40eb50165639e69 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Sat, 20 Apr 2019 01:46:14 +0300 Subject: [PATCH 07/23] magento/devdocs#: Format Bash --- .../cloud/cdn/cloud-vcl-custom-snippets.md | 3 ++ guides/v2.1/cloud/cdn/trouble-fastly.md | 8 ++--- guides/v2.1/cloud/docker/docker-config.md | 1 + guides/v2.1/cloud/env/setup-notifications.md | 3 ++ .../v2.1/cloud/howtos/install-components.md | 24 ++++++++++++++ guides/v2.1/cloud/howtos/sample-data.md | 3 ++ .../trouble-error-html-minification.md | 3 ++ guides/v2.1/comp-mgr/cli/cli-upgrade.md | 19 +++++++++++ .../comp-mgr/upgrader/ce-ee-upgrade-start.md | 6 ++-- guides/v2.1/comp-mgr/upgrader/upgrade.md | 10 ++++++ .../cli/config-cli-subcommands-cache.md | 6 ++++ .../elasticsearch/es-config-nginx.md | 2 ++ .../multi-master/multi-master_manual.md | 32 +++++++++++++++---- guides/v2.1/config-guide/solr/solr-magento.md | 21 ++++++++++++ .../build/enable-module.md | 2 ++ .../cli-cmds/cli-naming-guidelines.md | 9 ++++++ .../css-topics/css_debug.md | 13 +++++++- .../translations/translate_practice.md | 2 ++ .../install/cli/dev_update-magento.md | 3 ++ .../install-gde/prereq/install-rabbitmq.md | 2 ++ .../v2.1/install-gde/prereq/prereq_updater.md | 2 ++ .../install-gde/trouble/php/tshoot_php-set.md | 2 +- .../install-gde/trouble/tshoot_wrong-mysql.md | 5 +++ .../v2.1/mtf/create_test/create_new_test.md | 4 ++- .../v2.1/mtf/features/parallel_execution.md | 1 + guides/v2.1/mtf/features/test_suite.md | 3 ++ guides/v2.1/mtf/features/webdriver.md | 2 ++ guides/v2.1/mtf/mtf_entities/mtf_fixture.md | 5 +++ guides/v2.1/mtf/mtf_installation.md | 3 ++ .../mtf_quickstart_environment.md | 1 + .../mtf_quickstart/mtf_quickstart_runtest.md | 2 ++ guides/v2.1/mtf/mtf_update.md | 1 + guides/v2.1/security/google-recaptcha.md | 2 ++ .../security/two-factor-authentication.md | 2 ++ 34 files changed, 190 insertions(+), 17 deletions(-) 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/trouble-fastly.md b/guides/v2.1/cloud/cdn/trouble-fastly.md index e954a5839f4..dbe09561465 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 e762658af7c..dc29baaf945 100644 --- a/guides/v2.1/cloud/howtos/sample-data.md +++ b/guides/v2.1/cloud/howtos/sample-data.md @@ -36,6 +36,9 @@ To install sample data: ```bash git add -A && git commit -m "Install sample data" + ``` + + ```bash git push origin ``` diff --git a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md index 50fe9e7cffe..eb0da076af9 100644 --- a/guides/v2.1/cloud/trouble/trouble-error-html-minification.md +++ b/guides/v2.1/cloud/trouble/trouble-error-html-minification.md @@ -42,6 +42,9 @@ As a work-around, complete the following: ```bash php bin/magento cache:flush + ``` + + ```bash redis-cli -h <> -p <> flushall ``` diff --git a/guides/v2.1/comp-mgr/cli/cli-upgrade.md b/guides/v2.1/comp-mgr/cli/cli-upgrade.md index 751b717fcaa..52e9808b711 100644 --- a/guides/v2.1/comp-mgr/cli/cli-upgrade.md +++ b/guides/v2.1/comp-mgr/cli/cli-upgrade.md @@ -44,37 +44,48 @@ To enable maintenance mode: 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Enable maintenance mode: + ```bash 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). ## Upgrade using the command line {#upgrade-cli-upgr} 1. Log in to your Magento server as, or switch to, the Magento file system owner. 2. Change to the directory in which you installed the Magento software. For example, + ```bash cd /var/www/html/magento2 ``` + 3. Require the Magento package using Composer and update the dependencies: + ```bash composer require --no-update ``` + ```bash composer update ``` For example, to upgrade to {{ site.data.var.ce }} version {{ page.guide_version }}.13, enter: + ```bash composer require magento/product-community-edition {{ page.guide_version }}.13 --no-update ``` + ```bash composer update ``` + To upgrade to {{ site.data.var.ee }} version {{ page.guide_version }}.13, enter: + ```bash composer require magento/product-enterprise-edition {{ page.guide_version }}.13 --no-update ``` + ```bash composer update ``` @@ -92,9 +103,11 @@ To enable maintenance mode: ```bash rm -rf /var/cache/* ``` + ```bash rm -rf /var/page_cache/* ``` + ```bash rm -rf /var/generation/* ``` @@ -104,14 +117,19 @@ To enable maintenance mode: 4. Update the database schema and data: + ```bash bin/magento setup:upgrade ``` + 5. Put your storefront online (that is, cancel maintenance mode): + ```bash bin/magento maintenance:disable ``` + 6. Restart Varnish if you use it for page caching. + ```bash service varnish restart ``` @@ -119,6 +137,7 @@ To enable maintenance mode: 7. Access your storefront. The following error might display: + ```terminal We're sorry, an error has occurred while generating this email. ``` diff --git a/guides/v2.1/comp-mgr/upgrader/ce-ee-upgrade-start.md b/guides/v2.1/comp-mgr/upgrader/ce-ee-upgrade-start.md index 723cbcc8ee3..03ab6f7684c 100644 --- a/guides/v2.1/comp-mgr/upgrader/ce-ee-upgrade-start.md +++ b/guides/v2.1/comp-mgr/upgrader/ce-ee-upgrade-start.md @@ -57,9 +57,9 @@ After the upgrade completes: 2. Restart Varnish if you use it for page caching. - ```bash - service varnish restart - ``` + ```bash + service varnish restart + ``` #### Errors diff --git a/guides/v2.1/comp-mgr/upgrader/upgrade.md b/guides/v2.1/comp-mgr/upgrader/upgrade.md index 026a57c86fb..7ee1901b8b5 100644 --- a/guides/v2.1/comp-mgr/upgrader/upgrade.md +++ b/guides/v2.1/comp-mgr/upgrader/upgrade.md @@ -41,9 +41,17 @@ bin/magento cache:clean After the upgrade completes, manually clear `var` subdirectories: +```bash rm -rf /var/cache/* +``` + +```bash rm -rf /var/page_cache/* +``` + +```bash rm -rf /var/generation/* +``` ## Restart Varnish @@ -74,7 +82,9 @@ Clear the `var/cache`, `var/page_cache`, `var/generation` A sample command follows: +```bash rm -rf var/cache/* var/page_cache/* var/generation/* +``` ### Access your storefront again diff --git a/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md b/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md index d89238c7f7c..e9281fb2481 100644 --- a/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md +++ b/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.md @@ -61,6 +61,9 @@ Command options: ```bash bin/magento cache:enable [type] ... [type] +``` + +```bash bin/magento cache:disable [type] ... [type] ``` @@ -108,6 +111,9 @@ Command usage: ```bash bin/magento cache:clean [type] ... [type] +``` + +```bash bin/magento cache:flush [type] ... [type] ``` diff --git a/guides/v2.1/config-guide/elasticsearch/es-config-nginx.md b/guides/v2.1/config-guide/elasticsearch/es-config-nginx.md index ce1e68cf315..a0ad36a175b 100644 --- a/guides/v2.1/config-guide/elasticsearch/es-config-nginx.md +++ b/guides/v2.1/config-guide/elasticsearch/es-config-nginx.md @@ -55,7 +55,9 @@ This section discusses how to specify who can access the {% glossarytooltip b14e For example, if your proxy uses port 8080: + ```bash curl -i http://localhost:8080/_cluster/health + ``` Messages similar to the following display to indicate success: diff --git a/guides/v2.1/config-guide/multi-master/multi-master_manual.md b/guides/v2.1/config-guide/multi-master/multi-master_manual.md index bace65094d9..bd014d5c822 100644 --- a/guides/v2.1/config-guide/multi-master/multi-master_manual.md +++ b/guides/v2.1/config-guide/multi-master/multi-master_manual.md @@ -232,8 +232,10 @@ If you are using a [Network Database (NDB)](http://dev.mysql.com/doc/refman/5.6/ 1. Convert tables from InnoDb to NDB type in dump files: + ```bash sed -ei 's/InnoDb/NDB/' .sql - + ``` + 2. Remove rows with a FULLTEXT key from dumps because NDB tables don't support FULLTEXT. #### Restore the data @@ -242,8 +244,16 @@ Run the following commands: ```bash mysql -u -p < //sales.sql +``` + +```bash mysql -u -p < //sequence.sql +``` + +```bash mysql -u -p < //salesarchive.sql + +```bash mysql -u -p < //customercustomattributes.sql ``` @@ -285,8 +295,11 @@ ALTER TABLE quote_item DROP FOREIGN KEY QUOTE_ITEM_STORE_ID_STORE_STORE_ID; Run the script as follows: 1. Log in to your MySQL database as the root or administrative user: - - mysql -u root -p + + ```bash + mysql -u root -p + ``` + 2. At the `mysql >` prompt, run the script as follows: it. source /