CheapestHostingDeals

How To Uninstall a Magento Theme: A Detailed Guide | Nexcess

How To Uninstall a Magento Style: An In-depth Guide|Nexcess


You can uninstall a Magento 2 style in 2 methods:

By eliminating it from the Magento codebase and database manually.By utilizing the Magento style uninstall command.

The approach you can utilize depends upon numerous aspects, such as:

How the Magento 2 application was set up– utilizing Author or cloning GitHub.How the style was set up– utilizing Author or by publishing style files.

If you set up the style by publishing the files, you require to uninstall it by hand despite how you set up Magento. However, if you installed it utilizing Author, then the elimination approach differs based upon the Magento setup procedure.

Keep checking out to find out:

Requirements for Uninstalling a Magento 2 Style

Follow these actions prior to you eliminate a style in Magento 2.

1. Make Sure the Style Isn’t Applied to a Shop View

Go to Material > > Style > > Setup in the Magento admin. Make sure the style you want to uninstall isn’t appointed to a shop view. If it is, follow Adobe’s guide showing how to alter a style in Magento 2 and appoint an alternate style.

2. Confirm the Style Isn’t Set as a Moms And Dad Style

Go to Material > > Style > > Styles in the Magento admin panel. Inspect the Moms and dad Style column to confirm your customized style isn’t noted there. If it is, uninstall the kid style initially and after that the parent style.

3. Back up the Magento Database and Filesystem

Adobe deprecated Magento’s integrated backup performance in Magento 2.3.0 and later on variations. Although you can still utilize it from the command-line user interface (CLI), they no longer advise utilizing it.

Consult your hosting supplier for alternatives to support your Magento shop and check out an alternative binary backup tool such as Percona XtraBackup to backup the database.

If you’re a Nexcess consumer, you can take an on-demand backup of your Magento shop in addition to the totally free 30-day incremental backups. Visit to your Customer Website and go to Strategy Control panel > > Backups > > Produce Backup to support your shop.

4. Modification the Magento Operation Mode to Designer or Default

Clear created classes and proxies from the Magento CLI utilizing the following command:

<< pre><> < code>>

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

<

Then, change Magento to the designer mode utilizing:

<< pre><> < code>>

$ php bin/magento deploy: mode: set designer

<

Steps To Uninstall a Magento 2 Style By Hand

If you’re utilizing a custom-made Magento style, you might have installed it by hand by putting the style files in a directory site in the app/design folder in the Magento root.

Here’s how you can by hand eliminate a style in Magento 2:

Action 1: Make It Possible For Upkeep Mode

Put your shop in upkeep mode to disable bootstrapping when you uninstall the Magento 2 style.

Log in to your Magento 2 server as the Magento file system owner and run the following command to make it possible for upkeep mode:

<< pre><> < code>>

$ php bin/magento upkeep: make it possible for

<

Action 2: Eliminate the Style Directory Site From the Magento Filesystem

By hand set up Magento styles are normally put in the app/design directory site in the Magento root. Discover the course to where the style files are put in the Magento root and erase the style folder.

For instance:

<< pre><> < code>>

$ rm -rf << magento-root>>/ app/design/frontend/<< vendor-name>>

<

Action 3: Eliminate the Style Record From the Magento Database

Next, to eliminate the Magento 2 style, erase all records and referrals to the style inside the shop database utilizing the following command:

<< pre><> < code>>

$ mysql -u << user> > -p -e “erase from << dbname>>. style where theme_path =’<< supplier>>/<< style>>’ AND location =’ frontend’ limitation 1″

<

Change the following placeholders prior to performing the command:

<< user>>: Get in the Magento database username.<< dbname>>: Get in the Magento database name.<< supplier>>/<< style>>: Get in the relative course to the style directory site.

Action 4: Clear Caches and Disable Upkeep Mode

To finish the uninstallation procedure, clear all Magento caches utilizing the following command:

<< pre><> < code>>

$ php bin/magento cache: tidy

<

Lastly, disable upkeep mode utilizing:

<< pre><> < code>>

$ php bin/magento upkeep: disable

<

If you observe any mistakes on the frontend, clear the cache of other caching applications such as Varnish or Redis.

Steps To Uninstall a Magento 2 Style Utilizing Author

The actions to uninstall a Magento 2 style utilizing Author differ somewhat based upon the Magento 2 setup approach. If you set up Magento utilizing Author, you can uninstall the style utilizing a CLI command.

Nevertheless, if you set up Magento by cloning its Git repo, you’ll require to eliminate the style from Magento’s composer.json file prior to utilizing the command.

Here’s how to uninstall a Magento 2 style utilizing Author:

Action 1: Eliminate the Style From the Magento composer.json File (GitHub Install Just)

Note: This action is just needed if you have actually set up Magento by cloning its Git repository.

Log in to the Magento file system and go to the Magento root directory site.

Modify the Magento composer.json file utilizing your favored full-screen editor and erase the line referencing the style plan.

Here’s a composer.json file with sample information for referral:

After getting rid of the referral to the style plan from the “need” area, upgrade the Magento task reliances through the CLI utilizing:

<< pre><> < code>>

$ author upgrade

<

Now, you can securely run the Magento style uninstall command as explained in the next action.

Note: You can likewise eliminate the reliance utilizing the author eliminate command. Nevertheless, because case, make certain you erase the style record from the Magento database by hand.

Action 2: Run the Magento Style Uninstall Command

Perform the following command in the CLI:

<< pre><> < code>>

$ php bin/magento style: uninstall– backup-code– clear-static-content {style course}

<

This command:

Checks if the style exists at the specified style path.Verifies the style is an Author package.Checks for reliances, confirms the lack of a virtual style, which the style isn’t presently in usage.

If all checks succeed, it will:

Put the shop in upkeep mode and back up the codebase if the– backup-code command is used.Remove the style from the Magento database tables initially and after that from the codebase with author remove.Clear cache files and created classes. If– clear-static-content is defined, it will likewise clear fixed view files.Disable upkeep mode once the procedure is total.

If reliances exist, you might see a mistake such as:

Deal with the reliance problem and rerun the uninstall command. If the style depends on another style, you can eliminate both all at once as follows:

<< pre><> < code>>

$ php bin/magento style: uninstall frontend/SampleCorp/SampleModuleTheme frontend/SampleCorp/SampleModuleThemeDepend– backup-code

<

Last Ideas: How To Uninstall a Magento Style

No matter how you uninstall a Magento 2 style, make certain you consult your style designers’ documents for additional actions such as getting rid of any associated extensions. It likewise assists to take a backup of your Magento shop to prevent information loss.

Get access to on-demand backups at the click of a button and streamline running a Magento shop by registering for Managed Magento hosting with Nexcess today.



Source link .

Leave a Comment

Your email address will not be published.