-2

I am trying to install the Shopify API onto a WordPress site by SSHing into the server and using WP CLI.

I have tried using the command

wp package install https://github.com/Shopify/shopify-api-php.git

But it didn't work and I received this error:

Error: Composer directory '/.wp-cli/packages' for packages couldn't be created: mkdir(): Read-only file system

I can make directories else where in the server, so it just seems the default location for the packages to be installed can't be accessed?

Any advice on how to make this work?

I'm also open to not using WP CLI.

I did try speaking to WordPress support, but they weren't very helpful.

Paul Zhu
  • 1
  • 1

1 Answers1

0

Not sure what you are trying to do, but using the Shopify API has nothing to do with installing it, nor with using SSH. It is an API. You make HTTP calls to it. Like almost every other API on the planet. Nothing more, nothing less.

If you explain what you are trying to accomplish, maybe you'll get an answer that will help steer you in the right direction. What do you need to do with the Shopify API to make your WP site happy? You do know you can use the Shopify Storefront API and Buy Buttons to make simple things like WP able to sell Shopify products right?

David Lazar
  • 10,865
  • 3
  • 25
  • 38
  • Hi David, Thanks for your response. I'm trying to use the gift card creation functionality. https://shopify.dev/docs/api/admin-rest/2022-04/resources/gift-card I was looking at the php explanation of the code, which includes functions which are imported from a library, which I presume needs installation? This having said, I'm looking at your comment and I'm guessing I can simply call it using cURL in php? If so.... apologies for the stupid question.. FYI I'm trying to create giftcards in shops that we would partner with, so shops we don't have much access to, hence the API. – Paul Zhu Mar 01 '23 at 15:43