Getting Started is Instant and Free!





By creating your account, you agree to our Terms of Service



Forgot your password?

Not Registered?

Forgot your password?

Enter your email address below to have your password reset. We'll send you an email with a link to change your password.

Your IP address will be logged and monitored for this request.


Cancel

Your password has reset!

We have sent you an email with a link to change your password.

OK

make php redis super easy with Redis Cloud

Redis Cloud is a fully-managed cloud service for hosting and running Redis datasets in a highly available and auto-scalable manner, with predictable and stable top performance. It overcomes Redis’ scalability limitation and supports all Redis commands at any dataset size. The service provides in-memory replication and instant auto-failover within the same data center or across data centers. It completely frees developers from dealing with nodes, clusters, scaling, data persistence issues or failure recovery.

Setting up PHP to work with Redis Cloud

Applicable for the Predis client

  1. Create a new Redis DB at your Redis Labs account.
  2. Create a new client instance as shown below and enter the following items (provided to you upon DB creation):
    1. The hostname of your DB's endpoint
    2. The port number of your DB's endpoint
      <?php
        $redis = new Predis\Client
          (
            'hostname:port'
          );
      
      //is equivalent to:
      $redis = new Predis\Client
        (
          array
            (
              'scheme' => 'tcp',
              'host' => 'hostname',
              'port' => port,
            )
          );
      
      //and is also equivalent to:
      $redis = new Predis\Client
        (
          array
            (
              array
                (
                  'host' => 'hostname',
                  'port' => port
                )
              )
            );
      
    3. Note: disable master/slave configuration (write on master, read from slaves). Use the single endpoint provided upon DB creation to access your Redis DB. Redis Cloud distributes your dataset across multiple shards and efficiently balances the load between these shards
  3. You are done!

More Platforms

Interact with Redis Cloud

Enter your Redis commands,
see how fast it responds!

Redis Cloud > |

See Our Open Source Contributions