Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Say hello to redesigned Cloudways, an empowering Startup Program, enhanced Staging, a new Let’s Encrypt Wildcard SSL certificate feature, and more. GET STARTED

How to Setup Laravel Application on Cloudways With Redis Cache

Updated on  19th October

3 Min Read
Reading Time: 3 minutes

Laravel provides a number of cache drivers like a database, Memcached, and Redis. Out of these options, Redis Cache for Laravel is the best because it is different from Memcached in the sense that it has persistence. Further advantages of Redis over Memcached are that it works with more data types, and it uses less memory.

laravel redis

Cloudways offers Laravel on its Managed Cloud Web Hosting Platform. I’m writing this blog post to help you set up Redis Cache in Laravel in a jiffy!

Let’s begin.

Setting up Laravel Application on Cloudways

Signup at Cloudways; Select Laravel 5.5 as your application; Fill in your application and server name and launch the server. Your new Laravel 5.5 application will be launched within minutes, as shown in the GIF below.

Enable Redis on Cloudways Server.

I assume that you are signed into your Cloudways account. Follow these steps:

  1. Select Server Management tab
  2. Go to Server Settings & Packages tab
  3. Press the Packages button and turn on Redis by clicking the Install button

In a few moments, Redis is installed and enabled on your Cloudways server.

Setting up Redis on Laravel

Now that the Redis is installed and enabled on your server, let’s set it up on your Laravel 5.5 application. For this, follow these steps

  1. Go to the Application Management tab.
  2. Get your application’s SSH terminal and start a SSH session using the provided SSH credentials.
  3. Now to make sure that Redis is working, type the following command:

    If you get PONG in response, Redis is enabled on your server.

  4. Before using Redis with Laravel, you will need to install the predis/predis package (~1.0) via Composer. To do that, type the following command in terminal

  5. The Redis configuration for your application is located in the config/database.php file

    In the config/cache.php file, you can change your default cache driver from file to Redis, and start using Redis in your application.

laravel cta


You’re done! I hope this post was helpful for those who want to activate Laravel app along with Redis cache on Cloudways Cloud Console. If you have any question, feel free to ask in the comments section below. To check out the features offered by Cloudways for Laravel users, visit this page.

Share your opinion in the comment section. COMMENT NOW

Ayaz Ahmed Khan

Ayaz Ahmed Khan works as Senior Research and Development Engineer at Cloudways.

Create Laravel apps without the worry of server management.

Deploy your app on optimized PHP hosting servers for Laravel.

Get Our Newsletter
Be the first to get the latest updates and tutorials.