CheapestHostingDeals

How To Uninstall an Extension in Magento 2 | Nexcess

How To Uninstall an Extension in Magento 2|Nexcess


As your organization grows, you’ll likely set up Magento styles and extensions to enhance your ecommerce shop style and performance. However when you include brand-new modules, it’s likewise important to eliminate old ones to prevent code disputes and efficiency problems.

The actions to uninstall an extension in Magento 2 differ based upon the setup procedure.

If the extension was set up utilizing an Author metapackage, you might uninstall it with the Magento module: uninstall command. Nevertheless, if the extension was set up utilizing an archive file, you should uninstall it by hand.

In this tutorial, we’ll reveal you both approaches to uninstall Magento 2 extensions.

Here’s what we’ll cover:

Prerequisites

No matter which approach you utilize to uninstall extensions in Magento 2, follow these actions prior to you begin:

Back Up Magento

Actions such as eliminating a Magento 2 style or extension modify the Magento database and codebase. Developing a backup prior to making such modifications guarantees you can roll back to a practical variation of your website if things fail.

Adobe deprecated the integrated Magento backup performance in Magento variations 2.1.16, 2.2.7, 2.3.0, and above. Therefore, we suggest consulting your hosting company to check out code and database backup alternatives for your Magento shop.

Nexcess consumers can support their Magento shop by visiting to the Customer Website and starting an on-demand backup from Strategy Control panel > > Backups > > Produce Backup.

Modification the Magento Operation Mode to Designer

Prior to switching on designer mode, clear all produced classes and proxies to avoid unanticipated mistakes throughout the uninstallation procedure utilizing:

<< pre><> < code>>.

$ rm -rf << magento-root>>/ generated/metadata/ * << magento-root>>/ generated/code/ *.

<

Then, change the Magento operation mode to designer utilizing:

<< pre><> < code>>.

$ php bin/magento deploy: mode: set designer.

<

How To Uninstall an Extension in Magento 2

1. Visit to your server and allow upkeep mode.

2. Disable the extension, upgrade reliances, and clear the Magento 2 cache.

3. Validate the uninstallation.

4. Eliminate the directory site of module files from the “app” folder.

5. Disable upkeep mode.

Let’s check out the actions to uninstall an extension in Magento 2 by hand.

1. Visit to Your Server and Allow Upkeep Mode

Log in to your Magento 2 server over SSH, browse to the Magento root directory site, and allow upkeep mode utilizing:

<< pre><> < code>>.

$ php bin/magento upkeep: allow.

<

2. Disable the Extension, Update Dependencies, and Clear the Magento 2 Cache

Disable the Magento 2 extension utilizing the following command:

<< pre><> < code>>.

$ php bin/magento module: disable << ExtensionProvider_ExtensionName> >– clear-static-content.

<

For example, here’s the command we’re utilizing to disable our customized Magento 2 module:

<< pre><> < code>>.

$ php bin/magento module: disable Nexcess_CustomModule– clear-static-content.

<

When you have actually disabled the customized module, upgrade the Magento job reliances utilizing the following command:

<< pre><> < code>>.

$ php bin/magento setup: upgrade.

<

As an included step, clear the Magento cache utilizing the following command:

<< pre><> < code>>.

$ php bin/magento cache: flush.

<

3. Validate the Uninstallation

You can validate if the extension uninstallation achieves success utilizing the following command:

<< pre><> < code>>.

$ php bin/magento module: status << VendorName>> _<< ModuleName>>.

<

The output ought to specify “Module is handicapped.”

4. Eliminate the Directory Site of Module Files From the “app” Folder

To finish the extension elimination procedure, eliminate extension files from the Magento file system as follows:

<< pre><> < code>>.

$ rm -R app/code/<< extension-folder-name>>.

<

5. Disable Upkeep Mode

Disable the upkeep mode utilizing the command listed below:

<< pre><> < code>>.

$ php bin/magento upkeep: disable.

<

Open your Magento shop in a web internet browser and validate whatever is working generally.

If you discover any problems, roll back to a previous variation. In addition, connect to your third-party extension designer to assist you uninstall the extension in Magento 2.

How To Uninstall an Author Extension in Magento 2

If you set up a Magento 2 module by means of Author, you can eliminate it utilizing either the “author eliminate” command or Magento’s “module: uninstall” command.

It’s simpler to uninstall Magento extensions utilizing the uninstall script as it automates all the actions you would require with the “author eliminate” command.

Here’s how you can uninstall an extension in Magento 2 utilizing the module: uninstall command.

1. Visit to Your Server

Log in to your Magento server and browse to the Magento setup folder by means of the command line user interface. We do not require to put Magento in upkeep mode due to the fact that the uninstall script does that instantly.

2. Uninstall the Magento 2 Extension Utilizing the module: uninstall Command

Carry out the following command in your terminal:

<< pre><> < code>>.

$ php bin/magento module: uninstall << Vendor_Name> >– remove-data– clear-static-content.

<

The Magento module: uninstall command carries out the following jobs:

1. Checks if the extension is specified as an Author plan.

2. Look for reliances.

3. Request for verification prior to continuing if there’s no reliance.

4. Puts Magento in upkeep mode.

5. Eliminates database schema and information specified in the extensions Uninstall classes.

6. Eliminates the extension from the setup_module database table.

7. Eliminates the extension from the app/etc/config. php file.

8. Performs the author eliminate command and updates the Magento job requirements in the composer.json file.

9. Cleans Magento cache, updates produced classes, and clears fixed view files.

10. Disables upkeep mode.

Here’s what effective execution of the Magento uninstall command appears like in the terminal:

In case of mistakes, the command returns an output detailing the mistake. Fix the mistake based upon the output got and rerun the module: uninstall command.

3. Inspect the Extension Status

You can validate the extension is uninstalled utilizing the following command:

<< pre><> < code>>.

$ php bin/magento module: status << VendorName>> _<< ModuleName>>.

<

After validating the module is handicapped, switch Magento to the production mode, gain access to your shop in an internet browser, and validate whatever works properly. If you discover any mistakes, attempt clearing the Magento cache and running the setup: upgrade command.

If that does not repair it, roll back to a previous variation and connect to your extension designer for help.

Last Ideas: How To Uninstall an Extension in Magento 2

In addition to our guide, make certain you reference the extension paperwork for additional actions to uninstall the extension in Magento 2.

Eliminating undesirable extensions can assist you enhance Magento shop efficiency by minimizing code disputes. It likewise decreases the opportunities of your shop being hacked due to unidentified vulnerabilities in an out-of-date extension.

If you’re searching for more methods to protect Magento 2 and enhance its efficiency, register for Managed Magento hosting with Nexcess. Our strategies consist of Magento-optimized hosting environments, nighttime backups, and 24/7/365 security.

Browse our strategies to get going today.



Source link .

Leave a Comment

Your email address will not be published.