beste/firebase-php

Unofficial Firebase Admin SDK for PHP

PHP

2,435

1,885 commits

updated Oct 16, 2026

See the code

README

Firebase Admin SDK for PHP

Firebase Admin PHP SDK Logo

Current version Monthly Downloads Total Downloads
CI Docs Sponsor

[!IMPORTANT] Support the project: This SDK is downloaded 1M+ times monthly and powers thousands of applications. If it saves you or your team time, please consider sponsoring its development.

[!NOTE] The project moved from the kreait to the beste GitHub Organization in January 2026. The namespace remains Kreait\Firebase and the package name remains kreait/firebase-php. Please update your remote URL if you have forked or cloned the repository.

Overview

Firebase provides the tools and infrastructure you need to develop your app, grow your user base, and earn money. The Firebase Admin PHP SDK enables access to Firebase services from privileged environments (such as servers or cloud) in PHP.

For more information, visit the Firebase Admin PHP SDK documentation.

Installation

The recommended way to install the Firebase Admin SDK is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.

composer require "kreait/firebase-php:^8.0"

Please continue to the Setup section to learn more about connecting your application to Firebase.

If you want to use the SDK within a Framework, please follow the installation instructions here:

Quickstart

use Kreait\Firebase\Factory;

$factory = (new Factory)
    ->withServiceAccount('/path/to/firebase_credentials.json')
    ->withDatabaseUri('https://my-project-default-rtdb.firebaseio.com');

$auth = $factory->createAuth();
$realtimeDatabase = $factory->createDatabase();
$cloudMessaging = $factory->createMessaging();
$remoteConfig = $factory->createRemoteConfig();
$cloudStorage = $factory->createStorage();
$firestore = $factory->createFirestore();

Sponsors

Exitable JetBrains
Thanks to Exitable and JetBrains for supporting this project.

License

Firebase Admin PHP SDK is licensed under the MIT License.

Your use of Firebase is governed by the Terms of Service for Firebase Services.

cloud-messaging
fcm
firebase
firebase-admin
firebase-admin-sdk
firebase-auth
firebase-authentication
firebase-cloud-messaging
firebase-database
firebase-storage
firestore
google-firebase
php

beste/firebase-php

Unofficial Firebase Admin SDK for PHP

PHP

2,435

1,885 commits

updated Oct 16, 2026

See the code

README

Firebase Admin SDK for PHP

Firebase Admin PHP SDK Logo

Current version Monthly Downloads Total Downloads
CI Docs Sponsor

[!IMPORTANT] Support the project: This SDK is downloaded 1M+ times monthly and powers thousands of applications. If it saves you or your team time, please consider sponsoring its development.

[!NOTE] The project moved from the kreait to the beste GitHub Organization in January 2026. The namespace remains Kreait\Firebase and the package name remains kreait/firebase-php. Please update your remote URL if you have forked or cloned the repository.

Overview

Firebase provides the tools and infrastructure you need to develop your app, grow your user base, and earn money. The Firebase Admin PHP SDK enables access to Firebase services from privileged environments (such as servers or cloud) in PHP.

For more information, visit the Firebase Admin PHP SDK documentation.

Installation

The recommended way to install the Firebase Admin SDK is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.

composer require "kreait/firebase-php:^8.0"

Please continue to the Setup section to learn more about connecting your application to Firebase.

If you want to use the SDK within a Framework, please follow the installation instructions here:

Quickstart

use Kreait\Firebase\Factory;

$factory = (new Factory)
    ->withServiceAccount('/path/to/firebase_credentials.json')
    ->withDatabaseUri('https://my-project-default-rtdb.firebaseio.com');

$auth = $factory->createAuth();
$realtimeDatabase = $factory->createDatabase();
$cloudMessaging = $factory->createMessaging();
$remoteConfig = $factory->createRemoteConfig();
$cloudStorage = $factory->createStorage();
$firestore = $factory->createFirestore();

Sponsors

Exitable JetBrains
Thanks to Exitable and JetBrains for supporting this project.

License

Firebase Admin PHP SDK is licensed under the MIT License.

Your use of Firebase is governed by the Terms of Service for Firebase Services.

cloud-messaging
fcm
firebase
firebase-admin
firebase-admin-sdk
firebase-auth
firebase-authentication
firebase-cloud-messaging
firebase-database
firebase-storage
firestore
google-firebase
php

Significant stargazers

Matthew Bucci

39 followers · starred Feb 2018

Mygod

1,050 followers · starred Aug 2016

Florent CHAMPIGNY

4,112 followers · starred Nov 2017

Jefferson González

106 followers · starred Mar 2024