Installing a Magento Extension manually via FTP or SSH

May 3, 2010

A number of people have been having some difficulty installing my extension manually, and so they should, they are not designed to be installed manually but rather through Magento Connect. This will be a short and sweet guide to installing my Magento extension through FTP or SSH. This could probably be applied to installing any extension manually, so if you just need help knowing where to put extension files, read on.

Those that follow this blog (all 3 of you) will know that I’ve been unable to upload my latest release to Magento Connect and have been offering it for download through my site directly in the meantime. Quite a number of you have been able to install it without a hitch, but the confusing nature of the extension layout is blocking some people from being able to use the extension. Let’s hope this guide helps.

Preparation

The first thing to do is download the extension, you can get it over at my blog post about the new email logging features. For the purposes of this little how to guide, let’s assume you put the file in your home directory.

Installing a Magento Extension by SSH

On a Unix or Mac computer, start your Terminal of choice, on windows I think you’ll have to use WinSCP (someone want to correct me on that?) and navigate to your home directory, where you diligently saved the extension release file.

Run this command to upload the file to your server home directory (in this example I’m using version 1.1.1, adjust accordingly):

scp Aschroder_SMTPPro-1.1.1.tgz username@server:

Once the file is on the server then jump on there yourself to install the extension:

ssh username@server

Now unarchive the extension, I suggest doing this in a temporary directory, to keep everything tidy

mkdir ext-temp
mv Aschroder_SMTPPro-1.1.1.tgz ext-temp
cd ext-temp
tar xzf Aschroder_SMTPPro-1.1.1.tgz

Now is a good time to check your handy work:

aschroder:ext-temp ashley$ ls
Aschroder_SMTPPro-1.1.1		package.xml
Aschroder_SMTPPro-1.1.1.tgz
aschroder:ext-temp ashley$ ls Aschroder_SMTPPro-1.1.1
Aschroder	adminhtml	modules

Looks good eh? Ok now to put those folders where they are supposed to be. For this part I’m going to assume you have a public_html directory in your home directory, and that is the root of your Magento installation. If that is crazy talk to you, an SSH install may not be the best option.

mv Aschroder_SMTPPro-1.1.1/Aschroder/ ~/public_html/app/code/community/
mv Aschroder_SMTPPro-1.1.1/modules/Aschroder_SMTPPro.xml ~/public_html/app/etc/modules/
# This could debate-ably be put in base, not default as of Magento 1.4 - I'm open to opinion on that.
# PS: Lines that start with a hash symbol are comments, you just read them
mv Aschroder_SMTPPro-1.1.1/adminhtml/default/default/template/smtppro ~/public_html/app/design/adminhtml/default/default/template/

So that puts all the files where they need to be, now you just have to clear your Magento cache and you’re done. You made it.

If you are OCD on files hanging around your server, you’ll want to get rid of the temporary files once everything is working:

cd ..
rm -r ext-temp

Installing a Magento Extension by FTP

The FTP route is much more graphical, so I’ll try to draw this as a picture using Mac finder, hopefully that will make it clear. You’ll want to do this using your favorite FTP client.

Extract the package, possibly in a temporary directory:

The extracted extension files

The extracted extension files


These are the files you’ll see inside the Aschroder_SMTPPro-1.1.1 directory:
The files inside the actual package

The files inside the actual package


Your target Magento install should look like this:
The base of the Magento install that you'll be installing into

The base of the Magento install that you'll be installing into


Put the Aschroder directory into the app/code/community:
Put the Aschroder directory into the community directory.

Put the Aschroder directory into the community directory.


Put the modules/Aschroder_SMTPPro.xml file into app/etc/modules/:
Put the module file into the app/etc/modules directory.

Put the module file into the app/etc/modules directory.


Put the smtppro template folder into the default adminhtml template folder:
Put the smtppro templates into the default adminhtml templates directory.

Put the smtppro templates into the default adminhtml templates directory.

And then you should be done. Refresh your Magento cache and you’ll be complete. Happy emailing. Let me know how you get on.

Ashley

Posts

Hi! I'm Ashley Schroder, a Software Engineer from New Zealand - this is a collection of notes on my experiences with Ecommerce Web Development, particularly Magento Development.

Are Your Customers Getting The Magento Emails You Send?

MageSend Magento Email sending with Amazon SES

I have made a premium Magento Extension called MageSend. MageSend makes it simple and easy to send using Amazon's highly reliable SES email service.

The extension is $99, and comes with a complete money back guarantee, please check it out, I am confident it will resolve any email sending problems with your Magento store.

14 responses to Installing a Magento Extension manually via FTP or SSH

  1. Thanks Ashley for rapid reply,
    I appreciate it being free extension developer myself (for Joomla CMS).

    Good that you didn’t omit the ftp method as for simple eshops Magento is often installed on basic hosting programs with no ssh. I had a little problem with the settings (hosting states that SSL has to be on, but in fact it shouldn’t) and I was able to track and fix it using the self-test error log.

    Too bad there are problems with Magento Connect, hope they’ll fix it soon so your work can spread.

    My note: maybe insert a short note that the extension option shouldn’t be ‘disabled’ in order to run the self-test.

    cheers to Kiviland 😉
    p

  2. A suggestion: most manually installed extensions come with the complete file structure already in place so the developer can just copy the app folder over the existing app folder, assuming there are no files that will be overwritten, which there aren’t with your extension.

  3. I’m sorry, but I followed all the steps and still don’t get the extension in the admin panel (or I don’t know where it is supposed to show up).

    Does the package.xml should be moved somewhere? I don’t see anything related to that file in the steps.

    Thank you!

  4. A suggestion: most manually installed extensions come with the complete file structure already in place so the developer can just copy the app folder over the existing app folder, assuming there are no files that will be overwritten, which there aren’t with your extension.

  5. I did the install instructions via ftp but can’t get the extension to appear 🙁

  6. @Miro – I replied to your other comment over here

  7. Hi,

    Great extension. Tested on Community and works as advertised. Just wondering what I need to change to make this extension work in enterprise 1.3.2.4?

    Thx.

  8. Re. my previous comment

    >Great extension. Tested on Community and works as advertised. Just wondering what I need to >change to make this extension work in enterprise 1.3.2.4?

    The error message was 404 on Email Log and Test page, and actually on some other extensions. Everything else works fine.

    Turns out that it was a multi store/view website culprit. The fix and things to look for were:

    1. Make sure Add Store Code to Urls => NO
    in System – Configuration – Web (admin/system_config/edit/section/web/ )

    2. Make sure index.php in root uses:
    $mageFilename = ‘/home/magentohome/public_html/magento/app/Mage.php’;
    Mage::run();
    Mage::run(‘default’);

    3. Make adjustment on index.php in other folder to:

    $mageFilename = ‘/home/magentohome/public_html/magento/app/Mage.php’;
    Mage::run();
    Mage::run(‘store-view-name’);

  9. Thanks for the update Will, if anyone using Magento enterprise edition needs to use their own SMTP servers or Google Apps account, I’m sure your tips will help. Was this enterprise specific or just store configuration in general?

  10. Hi Asley,

    It is just Store Configuration in general.

    I was unable to open Log and Test page post install (gave 404) because of store config (#1). The rest just to make sure they’re properly configured.

  11. HI, Dear Asley,

    Thank you very much for the Extension. I following the manual installation steps and your extension work now. THANKS!

    I tried with Magento connection but always come up with errors.

    I have a question for you: which version is the latest version? I see you have version 1.3.4, and also 1.1.1, I install the version 1.1.1, is this the latest version?

    Great Extension !

  12. I get this when I install manually. Fatal error: Class ‘Aschroder_SMTPPro_Model_Mysql4_Setup’ not found in /var/www/html/magento/includes/src/Mage_Core_Model_Resource_Setup.php on line 160

  13. Hey guys, This might be the wrong post to ask the question as it is discussion installation via ftp but since we have all the magento devs here i am going to put it here. I am having the issue Couldn’t resolve host ‘magento-community’ when i go in to try and install from the admin panel and i get the same sort of error when i try to connect 2 key as well. Any ideas why that would be? Could me being behind a proxy or firewall be causing that? The module i am trying to install is a stable release.

  14. Installed with Magento Connect and still got this error “Fatal error: Class ‘Aschroder_SMTPPro_Model_Mysql4_Setup’ not found in /var/www/includes/src/Mage_Core_Model_Resource_Setup.php on line 234 ” … trying to figure out the reason now.