Now you can Subscribe using RSS

Submit your Email

Wednesday

Solution to Invalid file type and directory not found error while installing opencart 2.X extensions

Vishal Shrestha
This post is a step by step guide for installing Opencart extensions in localhost or web server. This also gives solutions to common problems like "directory containing files to be uploaded couldn't be found" or "invalid file type" when you try to upload .zip extensions. So let's begin -

Installing Opencart extensions in localhost or web server -

NOTE - If you are uploading extension to localhost (local computer), you need to enable FTP in your localhost first. You can check out how to do it easily here - Setup FTP on Localhost.
  1. After download any Opencart extension, you will realize that the default file type is .zip and when you try to upload this extension you get the infamous "Invalid file type" error in opencart. To solve this issue just rename the extension such that it ends with .ocmod.zip. Example - you-extension-name.ocmod.zip.
    opencart-invalid-file-type
  2. Once you are past this hurdle, you can easily upload the extension and it will be installed or you might get the "Directory containing files to be uploaded couldn't be found" error. This error is because Opencart expects you extension files to be inside an upload folder. So you need to unzip the original extension files, move them inside an upload folder and then zip it and rename it so that it ends with .ocmod.zip.
    opencart-extension-directory-not-found
  3. Now all the necessary changes to for uploading the Opencart extension in localhost or web server has been made. Hopefully, you can install your extensions now.
If you have any issues regarding installation of extension in Opencart, feel free to drop them in the comments section below. Cheers.

Vishal Shrestha / Author & Founder

A developer by profession, a born Adventurer. I mainly do Android but like to get my hands dirty with web development and a little bit of Python. I would't rather go on a Trek than a party and you can find me having a few rounds with the heavy bag to let out the steam ;)

For Business info : My Portfolio Site.

3 comments:

Coprights @ 2017 | The Code City by Vishal Shrestha Vishal Shrestha