Support » Plugin: Google Cloud Storage plugin » google storage not work

  • Resolved newstube


    Fatal error: Uncaught Google\Cloud\Exception\GoogleException: No project ID was provided, and we were unable to detect a default project ID. in /home/ Stack trace: #0 /home/ Google\Cloud\Storage\StorageClient->detectProjectId(Array) #1 /home/ Google\Cloud\Storage\StorageClient->configureAuthentication(Array) #2 /home/ Google\Cloud\Storage\StorageClient->__construct() #3 /home/ include(‘/home/45870-698…’) #4 /home/ in /home/ on line 168

Viewing 15 replies - 1 through 15 (of 24 total)
  • Yeah, same here… Would be awesome if I could get it working!

    Hey guys, I’m reaching out to the plugin authors over at Google since I run a hosting company on GCP to see if I can help write some documentation for the plugin and clean up some installation help.

    I’ll follow up with you tomorrow as it is late here right now, but the short version is that you need to have need to create a Google Cloud account and a project. The how to for that are here:


    When you create a project, it will assign an ID for it. That is what the plugin is asking for. This plugin really should validate without throwing a Fatal error. We’ll work on that. But this should help get your started. I hope this helps some until I can or the authors can do a more full installation how to.

    @jteague please help us to know how to use!
    I believe that there are lots of parameters in files, as you said, it’s better that the plugin’s author should make them into inputs, so, if you can, let us know where the parameters are and how they related to the Google cloud storage…
    Thanks a lot!

    @jteague can you please laso give us some help with the permissions you should add to the bucket? should we create a service account also?

    Hey @dnowba, @ciricaki33, guys, I am working on a write up for this. Please be patient as I have to do this when I get some spare time outside of work hours. But I will post a write up as a blog post and then post a link here tonight (I’m in the U.S. Central Time Zone). It will include all the settings you need to get you set up correctly and some other options to get connected as a fallback.



    Quick couple of answers. When you create your cloud account and project, it will create a default service account.

    Your project needs to have Google storage APIs enabled, which you can do through GCP Console.

    Your Storage Bucket must have permissions set to “Share Publicly”. You can also set that on the storage bucket you created.

    I’m still working on the full how to post, but hope this helps.

    Hi guys, thanks for the interests, and sorry about the trouble. The primary use case of this plugin was to use it on Google Cloud Platform. In that case, the project ID is automatically detected.

    Also on the other hosting environment, you will likely need to use a service account JSON key file.

    The easy fix would be adding a field for the service account key file. I’ll work on adding that field and release a new version.

    I think there is a workaround, although it’s not fancy as using the admin UI.

    You can download the service account JSON key, and upload the json key file to the hosting server, and also you need to set an environment variable GOOGLE_APPLICATION_CREDENTIALS, with the path of the key file.

    For example, if the json key file is at /secure-place/my-service-account.json on the hosting server, you can add the following line in wp-config.php.


    Please don’t put the service account key file in the web server’s document root. Keep the file secret.

    When creating the service account, please add Storage Object Admin permission to the new service account.

    I think probably we just need to update the install document. I’ll work on that.

    @takashimatsuo I was working on a write up that covers some of this. If you would like Id be happy to collaborate on the plugin docs, etc. I do have a current CLA with Google, and my company is a GCP customer. Don’t want to intrude though, so please let me know.


    If you are already working on a documentation, that’s great, but just in case you want to contribute to the docs in the source code, the plugin’s source code is hosted at

    I always welcome pull requests 🙂


    Perfect. I’ll drop by and assist with the docs and such. Look forward to that. 😉

    plugin not work


    This plugin was designed to run on WordPress sites installed inside the Google Cloud Platform environment. So, it won’t connect properly without modifications. The author is working on some things to make the easier to understand. But for now, you might want to explore an alternative if you are not installed in the Google Cloud… Although I would highly recommend them.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘google storage not work’ is closed to new replies.