4

I'm trying to manually install a plugin Pic Puller for Craft 3 Beta.

My shared hosting won't allow enabling of allow_url_fopen so it can't be done via the plugin store within the dashboard.

Any docs I checked are telling me to add the plugin files to /craft/plugins/ but I'm not seeing this directory in Craft 3.

I tried adding it to the /modules/ directory but this didn't work for me.

Thanks!

7

You have to create the folder where you want to include your plugins by yourself. There are no requirements how you name it. Let's say you want to create the folder plugins in your Craft folder, then you have to include the plugin in your composer.json like this

"require": {
   "php": ">=7.0.0",
   ....
   "namespace/pluginhandle": "your version",
   "secondred/form-builder": "^1.0" (<--- example how it could look like)
},
"repositories": [
{
  "type": "path",
  "url": "plugins/yourPluginFolderName"
},
{
  "type": "path",   
  "url": "plugins/form-builder" (<--- example how it could look like)
},
....

Then you'll need access to your server via ssh and do composer update

  • Thanks for your reply Robin, I'll try that out. My shared hosting doesn't allow cmd line access, is there another way to perform the composer update? – Christian Rochford Feb 12 '18 at 16:29
  • You can download the project with the entire database, copy it into your local xampp/wampp/lampp (...) run the composer update there and upload all files afterwards. That's the way we handle it – Robin Schambach Feb 12 '18 at 16:52
  • Sorry for the delayed reply Robin, that's a great tip thanks a lot! – Christian Rochford Feb 22 '18 at 9:21
  • Why composer update? Why not composer install? Update will update all of the packages and you can get into problems – Mladen Janjetovic Aug 6 '19 at 8:58
  • Because in case there is already a locked composer file it won't install the newly added package. Composer install only installs all dependencies in the composer lock (if there is one). In some cases the new package won't be downloaded and included to your project if you don't run "composer update" – Robin Schambach Aug 6 '19 at 9:16

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.