Migrate an extension from one site to another in magento 2

Migrate an Extension from one site to another

zip folder.zip sourcefolder(ubuntu command to zip a file)   

1. tar -zcvf html_nishorgo.tar.gz /html (demo) or zip it manually then download it

2. Upload it in new site

3. Delete same existing installed extension (if any)

     Go to directory  /var/www/html

     Check extension status php bin/magento module:status

If extension is installed through composer it will be in vendor folder otherwise in /app/code folder

          If it is in composer:

  • php -f bin/magento module:disable Mirasvit_Giftr (demo)
  • php -f bin/magento module:disable Mirasvit_Core (demo)
  • delete main file:   composer remove mirasvit/module-giftr  (demo)

Ubuntu:

rm -rf mirasvit/

4. Extract zip extension

tar xvzf html_16Sept.tar.gz (demo)