2

I have set up a Craft 3 site on shared hosting. When I try to update Craft or install plugins via the CP, I get the following error:

The "https://composer.craftcms.com/packages.json" file could not be downloaded: allow_url_fopen must be enabled in php.ini

allow_url_fopen cannot be enabled on this hosting & there is no SSH access

What are my options for updating Craft & installing/updating plugins in this scenario?

Is the only option to avoid CMS access temporarily, copy down the live database, do any updating locally and then upload the file changes & update the live database?

Thanks

1

Is the only option to avoid CMS access temporarily, copy down the live database, do any updating locally and then upload the file changes & update the live database?

Pretty much. You'll want to lock the version of PHP in your composer.json file to whatever your production PHP version is so you don't pull in dependencies locally running a higher version of PHP that you deploy live. You can do that like so: https://github.com/pixelandtonic/craftnet/blob/develop/composer.json#L46-L50

Note that allow_url_fopen is a Composer requirement... there are several issues in their repo of people running into this: https://github.com/composer/composer/issues?utf8=%E2%9C%93&q=is%3Aissue+allow_url_fopen

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.