Skip to main content

Installing the extension

Use these steps to install the extension on your store.

Prepare for installation​

  1. Back up your store's database and web directory.
  2. Log in to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Copy the installation instructions from the page My Downloadable Products to the SSH console and press ENTER.
Note

To manually install the module in the app/code/ directory, download the archive from My Downloadable Products -> View & Download, unpack it, and copy the contents to Magento's root directory. Then, access your server via SSH, navigate to the Magento 2 root, and follow the installation steps.


Execute the following set of commands to install​

  1. Run the command to enable the extension:

    php -f bin/magento module:enable Mirasvit_Core Mirasvit_BlogMx Mirasvit_Comment Mirasvit_Vote
  2. Run the command to install the extension:

    php -f bin/magento setup:upgrade
  3. Run the command below to set up dependencies:

    php -f bin/magento setup:di:compile
  4. Run the command for clean cache:

    php -f bin/magento cache:clean
  5. Deploy static view files:

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
    php -f bin/magento setup:static-content:deploy

If you are using the Hyvä theme​

Hyvä support ships inside the extension. There is no separate compatibility package to install - Blog MX, Comments and Vote each register themselves with the Hyvä theme build.

  1. Check the file app/etc/hyva-themes.json. If there are no entries for the mirasvit/module-blog-mx, mirasvit/module-comment and mirasvit/module-vote packages, run the following command:

    php -f bin/magento hyva:config:generate
  2. Generate the styles for the installed extension:

    cd /path/to/theme/web/tailwind/;
    npm run build

    On a theme older than Hyvä 1.4, run npm run build-prod instead.

  3. Deploy the static view files:

    cd /path/to/project/;
    rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
    php -f bin/magento setup:static-content:deploy
  4. Clear the cache:

    php -f bin/magento cache:clean

If blog pages look unstyled or blog content is missing after these steps, see Troubleshooting.


If you are using Hyvä CMS​

To edit blog posts and categories in the Hyvä CMS Liveview editor, install the Hyvä CMS bridge, mirasvit/module-blog-mx-hyva-cms. It is a separate package, and it is served to every Blog MX licence: the installation instructions on My Downloadable Products already give composer access to it.

Requirements

The bridge needs Hyvä CMS (hyva-themes/commerce-module-cms). That package comes from Hyvä, not from Mirasvit, so your store also needs a Hyvä Commerce licence. Install and set up Hyvä CMS first, using Hyvä's installation guide.

The bridge requires Blog MX 3.7.7 or later and Hyvä CMS 1.0.2 or later. Blog MX 3.7.8 and later in turn require bridge 0.0.7 or later, so update the two packages together. Composer enforces these when you install or update.

  1. Install the bridge:

    composer require mirasvit/module-blog-mx-hyva-cms
  2. Enable the module and apply the database changes:

    php -f bin/magento module:enable Mirasvit_HyvaCmsBlogMx
    php -f bin/magento setup:upgrade
    php -f bin/magento setup:di:compile
    php -f bin/magento cache:clean
  3. Go to Stores > Settings > Configuration > Hyvä Commerce > Hyvä CMS > Mirasvit Blog. This group is shown only while Hyvä CMS itself is enabled. All four settings are Yes by default:

    • Enable for blog posts and Enable for blog categories turn the Hyvä Editor on for each content type.
    • Posts enabled by default and Categories enabled by default switch the Enable Hyvä Editor toggle on for every new post or category.
  4. Open a blog post or category, switch Enable Hyvä Editor on, and save it. Then edit the content in the Liveview editor. To start a new post there directly, use Add Post with Hyvä CMS above the post grid.

Publish the content

Once Enable Hyvä Editor is on, the storefront shows the post's published Hyvä CMS content instead of its regular content. Content that is only saved as a draft is not shown.

Use the latest bridge version. Blog MX 3.7.0 and later ship Hyvä theme support inside the extension, and this does not change the bridge: it is installed the same way on every supported Blog MX version.


If you want to upgrade the extension, please refer to the How to upgrade extension section. To temporarily disable or remove it, use the commands from the How to disabling extension section.