Databases

Redis on Cloud Ninza: turn it on and connect WordPress, Laravel, Node.js, Django or Spring Boot

A private Redis-compatible cache for your project (Growth 64 MB, Business 128 MB, Pro 256 MB): turn it on, connect your app, and use it for caching, sessions and queues.

  1. What you get
  2. Turn it on
  3. Connect a Node.js, Python or Java app
  4. Connect WordPress
  5. Connect Laravel or another PHP app
  6. How it behaves
  7. Manage it
  8. Need more?

What you get

Every Growth, Business and Pro plan of WordPress, PHP, Node.js, Python and Java hosting includes a private, Redis-compatible store (Valkey 7.2): 64 MB on Growth, 128 MB on Business, 256 MB on Pro. It is not included with Starter plans or static websites.

It is yours alone: it runs as your hosting account, only your account can connect (other accounts and the internet are refused), and it always needs its password. It counts towards your plan’s memory.

1. Turn it on

Dashboard → Databases → Redis → choose the project → Turn Redis on. It starts in a few seconds and the page shows the host (127.0.0.1), port, password, Unix socket and a ready REDIS_URL.

2. Connect a Node.js, Python or Java app

Press Add these settings to my app: REDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD and REDIS_SOCKET (plus SPRING_DATA_REDIS_* for Java) are added to the app’s environment and the app restarts once.

  • Node.js (ioredis, node-redis, BullMQ, connect-redis): new Redis(process.env.REDIS_URL).
  • Django: CACHES = {"default": {"BACKEND": "django.core.cache.backends.redis.RedisCache", "LOCATION": os.environ["REDIS_URL"]}}; sessions with SESSION_ENGINE = "django.contrib.sessions.backends.cache".
  • Flask / FastAPI: redis.Redis.from_url(os.environ["REDIS_URL"]).
  • Spring Boot with spring-boot-starter-data-redis: nothing to configure — it reads SPRING_DATA_REDIS_HOST, _PORT and _PASSWORD. Add @EnableCaching and spring.cache.type=redis for the cache abstraction.

3. Connect WordPress

  • Install the free Redis Object Cache plugin (Plugins → Add New).
  • Copy the lines shown on the Redis page into wp-config.php, above “That’s all, stop editing” (WP_REDIS_HOST, WP_REDIS_PORT, WP_REDIS_PASSWORD, WP_REDIS_PREFIX).
  • Settings → Redis → Enable Object Cache. The status should say Connected.
  • Database queries are now answered from memory; with Ninza Speed’s page cache on as well, both cached and uncached pages are faster (wp-admin and WooCommerce benefit most).

4. Connect Laravel or another PHP app

The PHP Redis extension (phpredis) is installed on every PHP version. In Laravel’s .env: REDIS_CLIENT=phpredis, REDIS_HOST=127.0.0.1, REDIS_PORT=<your port>, REDIS_PASSWORD=<your password>, then CACHE_STORE=redis, SESSION_DRIVER=redis and, for queues, QUEUE_CONNECTION=redis; run php artisan config:cache.

How it behaves

  • A cache, not a database: when it is full, the least recently used keys are removed automatically (allkeys-lru). Keep anything you cannot lose in MariaDB or PostgreSQL.
  • Saved to disk: a snapshot is written every 5–15 minutes when data changes and is part of your twice-daily backups. After a restart Redis reloads it.
  • Disabled commands: CONFIG, DEBUG, MODULE and replication commands are switched off for safety; everything apps use (GET/SET, hashes, lists, sets, sorted sets, streams, pub/sub, Lua scripts, transactions, expiry, FLUSHDB/FLUSHALL) works.
  • Plan changes: upgrading or downgrading resizes Redis automatically; moving to Starter turns it off.
  • Suspension: if the project is suspended, Redis stops with it and starts again when the project is restored.

Manage it

  • The Redis page shows memory used, number of keys, hit rate and evicted keys. A high eviction count means the cache is too small for your data — upgrade the plan or cache less.
  • Empty the cache (FLUSHALL) deletes every key (type FLUSH to confirm).
  • Turn Redis off stops it and deletes its data (type your account name to confirm).

Need more?

For gigabytes of Redis, heavy queues or your own Docker setup, ask for a quote for a Cloud Ninza cloud server: you get full control, and our engineers can set it up for you.

Stuck? Our engineers answer support tickets around the clock. Contact us, or create an account and open a ticket from the dashboard — the same guides are there too.

Next step

Move your site, or your whole cloud estate

Shared hosting you can buy in two minutes. Infrastructure and managed services quoted by an engineer within one business day.