Couchbase PHP Release Notes and Archives

    Release notes, installation instructions, and download archive for the Couchbase PHP Client.

    These pages cover the 3.0 versions of the Couchbase PHP SDK. For release notes, download links, and installation methods for 2.6 and earlier releases of the Couchbase PHP Client, please see the 2.x PHP Release Notes & Download Archive.

    SDK Installation

    Installing on Linux-like systems

    Before installing the PHP SDK, you must install the C SDK — libcouchbase (LCB); version 3.0.0 or higher is required for PHP Client 3.1.0.

    After installing the C SDK, install the PHP SDK through your PHP distribution’s pecl command:

    $ pecl install couchbase

    Or install from the Couchbase repository:

    $ pecl install

    Installing on Microsoft Windows

    When using Microsoft Windows, instead of using PECL, download a pre-built binary matching your environment. You may also download the source for the SDK and build it directly in your environment if you have a complete build toolchain.

    Binaries that marked with (TLS) contain libcouchbase.dll, that linked against OpenSSL 1.1.1d (MSVC15) and support secure connection to Couchbase. We highly recommend to use TLS, as it keeps all communication between SDK and Cluster secure. The packages do not include OpenSSL binaries, therefore they have to be installed in the PATH (see






    PHP 7.3 VC15 NTS

    PHP 7.3 VC15 ZTS

    PHP 7.4 VC15 NTS

    PHP 7.4 VC15 ZTS

    PHP 7.3 VC15 NTS (TLS)

    PHP 7.3 VC15 ZTS (TLS)

    PHP 7.4 VC15 NTS (TLS)

    PHP 7.4 VC15 ZTS (TLS)

    PHP 8.0 VC16 NTS (TLS)

    PHP 8.0 VC16 ZTS (TLS)

    Post Installation for All Platforms

    Once the PHP SDK has been installed, you need to specify that the PHP interpreter should load the Couchbase SDK as an extension. To do this:

    1. Locate your php.ini file. This can be done using the command php --ini

      $ php --ini
      Configuration File (php.ini) Path: /usr/local/etc/php/7.4
      Loaded Configuration File:         /usr/local/etc/php/7.4/php.ini
      Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d
      Additional .ini files parsed:      (none)
    2. Insert a line in the php.ini file specifying the extension to be loaded; this should be in the [PHP] section. If you don’t know where that is, simply search for existing commented or uncommented extension= entries in the file. Note that the line differs for Linux/Mac OS from Microsoft Windows.

    Mac & Linux

    PHP Client

    The second part of SDK is written asa PHP library and hosted on To add it to your project’s dependency list, use the following composer command:

    $ composer require couchbase/couchbase

    Note on Extension Dependencies

    The Couchbase SDK depends on the JSON module, therefore it has to be loaded before the SDK.

    Version 3.1.0 (20 January 2021)

    • PCBC-599: Implemented Datastructures in PHP library (available via composer):

      • CouchbaseList,

      • CouchbaseMap,

      • CouchbaseQueue,

      • CouchbaseSet.

    • PCBC-742: Propagate custom value transcoder to results.

    • PCBC-707: Added scope-level query and scope qualifier support for QueryOptions.

    • PCBC-741: Fixed memory leak in Bucket::viewQuery().

    • PCBC-734: Fixed destruction of SearchOptions.

    • PCBC-591: Error handling howto documentation.

    Version 3.0.4 (11 November 2020)

    • PCBC-722: Fixed boolean Search query encoding.

    • PCBC-703: Added support for Query with FlexIndex (FTS).

    • PCBC-719: Enhanced user management for Collections.

    • PCBC-702: Implemented geopolygon Search query.

    • PCBC-705: Updated eviction policy types. It now covers ephemeral buckets.

    • PCBC-721: Allow to fall back to bucket connection for older Server releases.

    Version 3.0.3 (17 June 2020)

    • PCBC-696: Fixed encoding issue in QueryString search query.

    • PCBC-667: Added maxExpiry for CollectionSpec of collection manager.

    • PCBC-690: Increased refcount of arg in ViewOptions::keys().

    • PCBC-688: Temporary strings are now copied in ViewOptions builder.

    • PCBC-666: Fixed invalid memory access of Query result "meta".

    • PCBC-665: Fixed build issue on Debian.

    • Documentation improvements:

      • PCBC-683: update documentation steps

      • PCBC-675: Add API docs for exceptions

      • Update API ref to add docs for results objects

      • Update API reference for remaining undocument query API

      • PCBC-672: Add API docs for KV functions

      • PCBC-671: Add API reference docs for cluster/bucket etc.

      • PCBC-694: Remove \ namespace prefix in return type and argument definitions

      • PCBC-694: Allow null to be passed to nullable options

      • PCBC-693: replace GetAllReplicaOptions with GetAllReplicasOptions

      • PCBC-692: Use MutationResult instead of StoreResult

      • PCBC-691: Use "|null" instead of "?" in phpdoc.

    Version 3.0.2 (4 March 2020)

    • PCBC-660: Fixed detection of replace with CAS, so CasMismatchException now raised where necessary instead of KeyExistsException.

    • PCBC-663: Search method now increases refcounter of search object, avoiding double-free error in the script termination handler.

    • Fixed memory leaks.

    • Fixed manifest issue leading to install failure.

    Version 3.0.1 (4 February 2020)

    • Exposed manager APIs on Cluster level:

      • Cluster#queryIndexes() → QueryIndexManager

      • Cluster#searchIndexes() → SearchIndexManager

      • Cluster#users() → UserManager

      • Cluster#buckets() → BucketManager

    • Exposed manager APIs on Bucket level:

      • Bucket#collections() → CollectionManager

      • Bucket#viewIndexes() → ViewIndexManager

    Version 3.0.0 (21 January 2020)

    First GA release


    Numerous Alpha and Beta releases were made in the run-up to the 3.0 release, and although unsupported, the release notes and download links are retained for archive purposes here.

    Older Releases

    Although no longer supported, documentation for older releases continues to be available in our docs archive.