0

I'm not a developer, and I have learned Magento 2 (my store was installed with Magento 2.1.2 through Softaculous on Cpanel) in the past 3 weeks. I don't mind learning. I'm sure there are many others similar to me trying to install and run their own stores with no dedicated web infrastructure and huge budget. So this is a question that will hopefully help my understanding as well as theirs.

I had to ask for help with installing several extensions in my store. Some are free and some have been paid for. I followed the directions of these extensions and most tell me to:

  1. "Unzip the file my-great-extension.zip into your Magento root folder". I'm well aware that the root folder of the Magento 2 installation is the folder where your Magento 2 store is installed, the same folder containing the directories "app" and "pup" and "var" and "vendor".

  2. The next step is usually a miffing "enable the extension". Once in a while, they explain the command line code to enable the extension: bin/magento module:enable my-great-extensions-name but usually not.

  3. Clear the cache, again not very specific to people that don't know Magento 2.

Usually, this ends up, if I followed the directions to the "T", in an error message at the command line:

"Unknown module(s): 'my great unknown module does not exist because i gave you the wrong installation instructions'"

THEN, I ask for help. Now after the first time, I figured out that these instructions were either wrong or not applicable to my installation. The upload was never to the root directory. I was following instructions, but I was ACTUALLY supposed to the uploaded the unzipped files to the app -> code directory WITHOUT OVERWRITING OTHER FILES IN THERE and mimic the unzipped file structure.

So this is where the problem comes in along with my questions?

  1. Firstly, are installation instructions different for every variation of the same Magento release store. Meaning, are the installation methods different for every Magento 2.1.2 store? Or IS THERE A STANDARD INSTALLATION PROCEDURE FOR MANUAL INSTALLS OF EXTENSIONS.

  2. Are the installation instructions that I'm so often given by documentation for extensions even the CORRECT instructions? Now not speaking about the free extensions, but it seems to me that this is a good way for extension developers to make a little extra money per installation, which I'm all for, but it should be stated like so, and not swindled. (no offense to the developers, we all love what you folks do and wish we could do it too).

  3. Is my Magento installation incorrect?

Sorry for the slight rant, but I'd still like to find the right way to install extensions. Some come with more then just the "code" folder in it, in those cases, am I supposed to copy over they others as well? It's almost never that well documented.

EDIT FOR THE DOWNVOTERS...if your an extension maker, it's probably a good idea to be clear about install instructions for your extensions. Just as the person that answered this was.

1

You can confirm your extension name in registration.php file of app/code/MyGreatExtensions/ModuleName

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
   'MyGreatExtensions_ModuleName',
    __DIR__
); 

and make sure your extension path is something like app/code/MyGreatExtensions/ModuleName

enter image description here

here, MyGreatExtensions is your extension namespace and ModuleName is your extension module name.

after unzip you have to follow below instruction:

  1. Enable your extension

    php bin/magento module:enable MyGreatExtensions_ModuleName

  2. Setup upgrade

    php bin/magento setup:upgrade

  3. Remove var/di, var/generation folder

    php bin/magento setup:di:compile

  4. Remove pub/static folder [OPTIONAL] may be your extension has overrides some core code(JS, CSS, etc).

    php bin/magento setup:static-content:deploy

  5. Set proper permission for your Magento store

  • Chirag, thanks for clearing this up. THIS answer is the answer that needs to be posted/utilized by all the extension developers EXCEPT you said "after unzip you have to follow below instruction:" enabling any extension after simply unzipping in the root directory. I think that's where my problem started, as with many others. THE VERY FIRST STEP is wrong. Or, am I wrong? Can I just unzip the file in the root directory and expect Magento to take the folder and place it in the right directory before I run the enable command? – Jason Nov 30 '16 at 9:16
  • you have to unzip your extension inside app/ folder. – chirag Nov 30 '16 at 9:30
  • Thank you for clearing that up. So example: i have a zipfile. I upload it into app folder. When I run unzip, it opens up and a folder called "ExtensionName" is created. From there I can run the enable command? – Jason Nov 30 '16 at 11:21
  • goto that 'ExtensionName' and open registration.php file in that ExtensionName_ModuleName and check if its not available then you have to create ModuleName folder inside 'ExtensionName' and move all code from ExtensionName to 'ModuleName', then you can follow my steps. – chirag Nov 30 '16 at 11:36
  • From there I can run the enable command? Or do I need to move contents of that folder (i.e. an "app" folder located inside the newly created "ExtensionName" folder) to its respective place? The reason I'm asking if because its a confusing process that most extension makers don't address in install instructions. For instance, I make an extension, then I put it in a folder called "ExtensionName" then zip that folder. That is much different then zipping all the cintents of that folder, and when it is unzipped, it will be different as well. – Jason Nov 30 '16 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.