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

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.

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

Sharing is caring!

8 thoughts on “Solution to Invalid file type and directory not found error while installing opencart 2.X extensions”

Leave a Reply to Shabdanant Cancel Reply

Your email address will not be published.