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.
- 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.
- 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.
- 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.
8 thoughts on “Solution to Invalid file type and directory not found error while installing opencart 2.X extensions”
nothing happened i try all
This comment has been removed by a blog administrator.
Great blog. All posts have something to learn. Your work is very good and I appreciate you and hopping for some more informative posts. Opencart Facebook Pixel Code
The downloadable software you can use to convert your files gets the job done, and there is no shortage of programs you can find and install on your computer. For every File Extensions, you can use MyPCFile.