Skip to content

How to update Magento 2 extension

How to define the installation type?

If the following folder exists on your server, it means that the extension was installed by copying a code using a "Ready-To-Paste" package:

[your_magento_root_folder]/app/code/MageWorx

Example

If you install the SEO Suite Ultimate extension, you will see the following subfolders: SeoAll, SeoBase, etc.
If you install the Advanced Product Options extension, you will see the following subfolders: OptionBase, OptionFeatures, etc.

If the extension subfolders are missing in the app/code/MageWorx folder or app/code/MageWorx folder doesn’t exist, please check your [your_magento_root_folder]/composer.json file.

If you see the following piece of code, it means that the extension was installed via composer from a local repository:

json "mageworx": { "type": "artifact", "url": "[path_on_your_server]" }

If you see the following piece of code in your composer.json file, it means that the extension was installed via composer from an external repository:

json "mageworx_packages": { "type": "composer", "url": "https://packages.mageworx.com/" }

Extension update

Update the extension via composer from the Mageworx repo - packages.mageworx.com

1) Run the following command by your Magento files owner user(1):

1.1. To get the newest extension version files:

composer remove mageworx/module-test composer require mageworx/module-test (4)

1.2. To update the extension files according to the version constraint specified in your composer.json file for the corresponding extension:

composer update <composer_name> --update-with-dependencies

These commands remove existing extension files and add files of the newest version to the [your_Magento_root_folder]/vendor/mageworx folder.

2) To get the current extension version, please use the following command:

composer show | grep mageworx/module-test

3) Run the following commands to install the extension:

php bin/magento module:enable MageWorx_*TestAdditional* MageWorx_*TestImportExport* php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento setup:di:compile "setup:static-content:deploy" is required if your Magento is in the production mode(2)

Update the extension via composer from a local repo.

Note

Please note that this type of installation is deprecated, and we recommend to do steps 3 and 4 to remove(3) the extension and then install the extension via composer from our repo (packages.mageworx.com).

1) Download all extension packages from your account except the package started with "rtp_".

2) Copy all packages to the folder on your server specified in your composer.json file:

json "mageworx": { "type": "artifact", "url": "[path_on_your_server]" }

3) Copy composer name to install the extension, e.g., mageworx/module-test.

4) Run the following command to remove(3) the extension(2):

composer remove mageworx/module-test

5) Run the following command to get the files of the newest version of the extension(2):

composer require mageworx/module-test

These commands remove existing extension files and add files of the newest version to the [your_Magento_root_folder]/vendor/mageworx folder.

6) To get the current extension version, please use the following command(1):

composer show | grep mageworx/module-test

7) Run the following commands to install the extension(1):

php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento setup:di:compile "setup:static-content:deploy" is required if your Magento is in the production mode(2)

"Ready-to-Paste" way.

Note

Please note that this type of installation is deprecated, and we recommend installing extensions via composer. You can follow steps 1-4 below to remove(3) the extension files and then you can install the extension via composer.

  1. Download the newest extension package started with “rtp_” in your account at our website and unzip it on your local machine.

  2. Go to the app/code/MageWorx folder

  3. Connect to your server via FTP/SFTP and go to [your_magento_folder]/app/code/MageWorx

  4. Remove all subfolders related to a corresponding extension on your server

  5. Copy files and folders from your local machine to your server via FTP/SFTP. If some folders already exist on your server, please use the "merge" option. If some files already exist on your server, please use the "replace" option.

To enable extension modules, run the following command:

php bin/magento module:enable MageWorx_*TestAdditional* MageWorx_*TestImportExport*

To install the extension, run the following commands:

php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php bin/magento setup:di:compile "setup:static-content:deploy" is required if your Magento is in the production mode(2)

1) Check the following article to see a list of requirements and permissions to be able to run Magento commands: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/file-sys-perms-over.html

2) Use the following command to see the current Magento mode php bin/magento deploy:mode:show

3) Extension data is stored in the database and it won’t be touched in case you remove the extension files.

4) If you don’t specify any specific extension version while installation, the following dependency record will be added to your composer by default "^3.6" (in case the actual extension version is 3.6.0). It means that if you run the composer update command, it will update the extension to the highest available version, but less than version 4.0

Based on your requirements you can use the following variants of the ‘require’ command:

composer require mageworx/module-test * - any newest available version will be installed in case of running ‘composer update’.
composer require mageworx/module-test 3.6.* - the newest available version but less than version 3.7 will be installed in case of running ‘composer update’.