User Tools

Site Tools


Sidebar

magento_2:cms_upgrade_script

See the way CMS Upgrade Scripts for Magento 2 extension works.

Guide for CMS Upgrade Scripts for Magento 2

Simplify the development process and save time on data migration with CMS Upgrade Scripts for Magento. With this extension you can:

  • Quickly generate upgrade scripts for CMS pages, static CMS blocks, backend settings, etc
  • Easily transfer data from test environment to production/from production to a local machine
  • Reduce custom development costs
  • Improve delivery time
  • Prevent human errors

Сonfiguration

How to generate CMS upgrade file:

1. Enter a special prefix for cms upgrade file: Stores → Configuration → Ewave → CMS Upgrade 2. Then navigate to any of the suggested pages: (e.g. Widget)

  • CMS Page (Content → Pages)
  • Static Block (Content → Blocks)
  • Widget (Content → Widgets)
  • Backend Settings (Stores → Configuration)
  • Transaction Email Template (Marketing → Email Templates)

The widget page should be opened.

3. Select all widgets and in the Actions dropdown select Generate Upgrade Script. Also, Admin can select and generate only one widget. 4. Click Submit button

The message should be displayed about file location with information from which version to which version the file is generated and a new data version 5. Delete any widget or do some changes in any widget. This is necessary in order to see the changes later after applying the file.

6. In the database in the table “ewave_cms_upgrade_installed_files” the admin can see all generated files with entering prefix or without prefix. In the database in the table “ewave_cms_upgarde_data_version” admin can see which data version is installed now.

7. Then to apply the generated file need to navigate to store root folder in the SSH console and run the following command:

php bin/magento ewave:cms_upgrade {data version}

. E.g.:

php bin/magento
ewave:cms_upgrade 0.0.6-0.0.7.

8. If the current version does not match the version from which the file was generated, it is necessary to change the current version in the database to the required one.

9. Then navigate to the Widget page and you can see that deleted widget display again or widget data before the change.

10. Example how to generate script for the configuration settings:

  • Go to Admin Panel → Stores → Configuration
  • Click to the checkbox in the section with the settings which you want to generate

  • Click the button Generate Upgrade Script
  • The message should be displayed about file location with information from which version to which version the file is generated and a new data version.

Find out how to install the CMS Upgrade Scripts extension for Magento 2 via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/cms_upgrade_script.txt · Last modified: 2021/05/24 13:42 by azolotorevich