> For the complete documentation index, see [llms.txt](https://landofcoder.gitbook.io/how-to-install-magento-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://landofcoder.gitbook.io/how-to-install-magento-2/installation/setup-module.md).

# Setup Module

This writing mainly focuses on guiding developers to setup [**Magento 2 Extension**](https://landofcoder.com/magento/magento-2-extension.html). Landofcoder will introduce the most common and clear method to install Magento 2 Extension which is directly applied extension code to the Magento core file.

You **SHOULD** do before install:\
**1. Check the software version to make sure you have suitable one supporting necessary modules.**\
**2. Duplicate or backup all databases.**

We strongly suggest that you should find more information about the source where you install Magento 2 Extension and make sure it is trustworthy to protect your data.

**There are 4 steps to follow:**

**Step 1: Download the Magento 2 Extension module and get ready.**\
This is the very first step to install Magento 2 Extension. When you have the file purchased from the provider’s site under the zip form, you need to decompress the file.

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2FXJwLYRblgRo3EybsYB4d%2Fdownload_ProductTags.png?alt=media\&token=728f52dc-cd2e-4c29-ae8e-10baa637f785)

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2FtuOHt9yhaFuzHypewwJm%2Fzipfile.png?alt=media\&token=d0e02c7d-4e44-439c-8221-586cf7419791)

Then you have the Magento 2 extension file decompressed.

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2F2cs4HZI4EiQoe9XngnRA%2Fdecompressed_file.png?alt=media\&token=b070d61c-44a0-480a-95db-a8cdf3649651)

**Step 2: Copy and Paste the extension code.**

Access app > code and copy the “code” folder.

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2FpJ09ZO77aNyYitkUDDbk%2Fcode.png?alt=media\&token=051b1ac3-396c-4c11-a163-fbef5058333f)

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2Fhh1Z2ZlTa7458HbWOfkN%2Fcopy_code.png?alt=media\&token=02642ed6-684f-441b-b9c0-370ae9d3e826)

Go to the Magento 2 core folder.

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2FlF0j0Ol7YhTZ5VJR4KYh%2Fcore_file.png?alt=media\&token=d3fe4b61-114e-4650-8242-6af78b1717a9)

Access the “app” folder. Apply (paste) the copied folder to install Magento 2 Extension code into the server.

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2FCJE7hL82OcRjn0Yi6hJC%2Fpaste.png?alt=media\&token=7acbd1fa-731e-404a-815e-4f3a0daf760b)

**Step 3: Compile the upgrading command code below.**

*`php bin/magento setup:upgrade`*

*`php bin/magento setup:static-content:deploy -f`*

*`php bin/magento setup:di:compile`*

*`php bin/magento indexer:reindex`*

*`php bin/magento cache:clean`*

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2F2HidGEMJqBFFCaXUtCfv%2Fupgrading.png?alt=media\&token=888d1de4-faa0-44b0-9733-4a15a4bab119)

**Step 4: Check the result on your website and finish the process of setting up Magento 2 Extension.**

![](https://49939729-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FP4awIhuJ54C4SeqTrNop%2Fuploads%2Fa1J4I885fUnxSjURTj4T%2Fresult-e1582602378614.png?alt=media\&token=0fe9a132-e8e2-4513-b0f6-508518aef02f)

Above are 4 easy steps to install Magento 2 Extension. Thank you!

**Important:**\
You need to install [**Lof\_All**](https://github.com/landofcoder/module-all) module along with your purchased modules.\
We recommend you to duplicate your live store on a staging/test site and try installation on it in advance\
Backup Magento files and the store database (Go to admin > System > Tools > Backups > Backup database only) – Default it is disabled, enable it by run command: PHP bin/magento config:set system/backup/functionality\_enabled 1

It’s very important to backup all of the themes and extensions in Magento before installation, especially when you are working on a live server. We strongly recommend you to do not omit this step.
