PHPackages                             google/cloud-storage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. google/cloud-storage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

google/cloud-storage
====================

Cloud Storage Client for PHP

v1.50.0(1mo ago)34390.8M—0.2%30[1 PRs](https://github.com/googleapis/google-cloud-php-storage/pulls)20Apache-2.0PHPPHP ^8.1CI failing

Since Mar 10Pushed 6d ago52 watchersCompare

[ Source](https://github.com/googleapis/google-cloud-php-storage)[ Packagist](https://packagist.org/packages/google/cloud-storage)[ RSS](/packages/google-cloud-storage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (117)Used By (20)

Google Cloud Storage for PHP
============================

[](#google-cloud-storage-for-php)

> Idiomatic PHP client for [Cloud Storage](https://cloud.google.com/storage/).

[![Latest Stable Version](https://camo.githubusercontent.com/dddf8a0df42cd6e34130424c24f10b45fd064b621c0e1502e4b8846d595f7f21/68747470733a2f2f706f7365722e707567782e6f72672f676f6f676c652f636c6f75642d73746f726167652f762f737461626c65)](https://packagist.org/packages/google/cloud-storage) [![Packagist](https://camo.githubusercontent.com/f1b5200d75c1f6353a0d001ea6de7f78cee1a0033dfcc27ad6aeac6072eeff88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f676f6f676c652f636c6f75642d73746f726167652e737667)](https://packagist.org/packages/google/cloud-storage)

- [API documentation](https://cloud.google.com/php/docs/reference/cloud-storage/latest)

**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to that project.

Allows world-wide storage and retrieval of any amount of data at any time. You can use Cloud Storage for a range of scenarios including serving website content, storing data for archival and disaster recovery, or distributing large data objects to users via direct download.

### Installation

[](#installation)

To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/).

Now install this component:

```
$ composer require google/cloud-storage
```

### Authentication

[](#authentication)

Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.

### Sample

[](#sample)

```
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient();

$bucket = $storage->bucket('my_bucket');

// Upload a file to the bucket.
$bucket->upload(
    fopen('/data/file.txt', 'r')
);

// Using Predefined ACLs to manage object permissions, you may
// upload a file and give read access to anyone with the URL.
$bucket->upload(
    fopen('/data/file.txt', 'r'),
    [
        'predefinedAcl' => 'publicRead'
    ]
);

// Download and store an object from the bucket locally.
$object = $bucket->object('file_backup.txt');
$object->downloadToFile('/data/file_backup.txt');
```

### Stream Wrapper

[](#stream-wrapper)

```
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient();
$storage->registerStreamWrapper();

$contents = file_get_contents('gs://my_bucket/file_backup.txt');
```

### Debugging

[](#debugging)

Please see our [Debugging guide](https://github.com/googleapis/google-cloud-php/blob/main/DEBUG.md)for more information about the debugging tools.

### Version

[](#version)

This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

### Next Steps

[](#next-steps)

1. Understand the [official documentation](https://cloud.google.com/storage/docs).
2. Take a look at [in-depth usage samples](https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/storage/).

###  Health Score

79

—

ExcellentBetter than 100% of packages

Maintenance94

Actively maintained with recent releases

Popularity72

Solid adoption and visibility

Community49

Growing community involvement

Maturity89

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~28 days

Total

116

Last Release

56d ago

Major Versions

v0.1.0 → v1.0.02017-03-31

PHP version history (3 changes)v1.30.3PHP &gt;=7.4

v1.39.1PHP ^8.0

v1.48.2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8713415b20b4be4cec8f8b22741e3cd05f76eee9e38de1de5bf32727349b7c5?d=identicon)[bshaffer](/maintainers/bshaffer)

![](https://www.gravatar.com/avatar/3901206952845568d7557a60855b097f6d1bafaa7a24020cfcf5bb8de74f9d28?d=identicon)[google-cloud](/maintainers/google-cloud)

---

Top Contributors

[![release-please[bot]](https://avatars.githubusercontent.com/in/40688?v=4)](https://github.com/release-please[bot] "release-please[bot] (68 commits)")[![jdpedrie](https://avatars.githubusercontent.com/u/89034?v=4)](https://github.com/jdpedrie "jdpedrie (54 commits)")[![bshaffer](https://avatars.githubusercontent.com/u/103941?v=4)](https://github.com/bshaffer "bshaffer (38 commits)")[![vishwarajanand](https://avatars.githubusercontent.com/u/7369612?v=4)](https://github.com/vishwarajanand "vishwarajanand (31 commits)")[![dwsupplee](https://avatars.githubusercontent.com/u/2079879?v=4)](https://github.com/dwsupplee "dwsupplee (26 commits)")[![yoshi-automation](https://avatars.githubusercontent.com/u/44816363?v=4)](https://github.com/yoshi-automation "yoshi-automation (10 commits)")[![thiyaguk09](https://avatars.githubusercontent.com/u/179678766?v=4)](https://github.com/thiyaguk09 "thiyaguk09 (9 commits)")[![saranshdhingra](https://avatars.githubusercontent.com/u/1038319?v=4)](https://github.com/saranshdhingra "saranshdhingra (9 commits)")[![yash30201](https://avatars.githubusercontent.com/u/54198301?v=4)](https://github.com/yash30201 "yash30201 (4 commits)")[![ava12](https://avatars.githubusercontent.com/u/1997053?v=4)](https://github.com/ava12 "ava12 (3 commits)")[![jeromegamez](https://avatars.githubusercontent.com/u/67554?v=4)](https://github.com/jeromegamez "jeromegamez (3 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (3 commits)")[![salilg-eng](https://avatars.githubusercontent.com/u/267332553?v=4)](https://github.com/salilg-eng "salilg-eng (3 commits)")[![mateuszanella](https://avatars.githubusercontent.com/u/39682511?v=4)](https://github.com/mateuszanella "mateuszanella (1 commits)")[![MDrollette](https://avatars.githubusercontent.com/u/329784?v=4)](https://github.com/MDrollette "MDrollette (1 commits)")[![mpesari](https://avatars.githubusercontent.com/u/11061725?v=4)](https://github.com/mpesari "mpesari (1 commits)")[![piotrgradzinski](https://avatars.githubusercontent.com/u/1607439?v=4)](https://github.com/piotrgradzinski "piotrgradzinski (1 commits)")[![Hectorhammett](https://avatars.githubusercontent.com/u/9062626?v=4)](https://github.com/Hectorhammett "Hectorhammett (1 commits)")[![danielgsims](https://avatars.githubusercontent.com/u/695933?v=4)](https://github.com/danielgsims "danielgsims (1 commits)")[![rickclephas](https://avatars.githubusercontent.com/u/7353419?v=4)](https://github.com/rickclephas "rickclephas (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/google-cloud-storage/health.svg)

```
[![Health](https://phpackages.com/badges/google-cloud-storage/health.svg)](https://phpackages.com/packages/google-cloud-storage)
```

###  Alternatives

[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[google/cloud-bigquery

BigQuery Client for PHP

8917.2M41](/packages/google-cloud-bigquery)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[e0ipso/amazon-sqs-php-extended-client-lib

An extension to the Amazon SQS client that enables sending and receiving messages up to 2GB via Amazon S3.

19268.7k](/packages/e0ipso-amazon-sqs-php-extended-client-lib)[xi/filelib

File library for PHP

2354.5k2](/packages/xi-filelib)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
