You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ecommerce-applications/magento-1/how-to-configure-redis-for-magento-1.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,7 @@ Redis is a caching method which can increase the speed of the backend and fronte
18
18
19
19
**NB: When you used the [hypernode-importer](../../hypernode-platform/tools/how-to-migrate-your-shop-to-hypernode.md#how-to-migrate-your-shop-to-hypernode) and you were already using Redis you don't have to follow this tutorial.**
20
20
21
-
Want to know how to configure Redis or Valkey in Magento 2? Have a look at [Redis on Magento-2](../../ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md) or
22
-
[Valkey on Magento-2](../../ecommerce-applications/magento-2/how-to-configure-valkey-for-magento-2.md)!
21
+
Want to know how to configure Redis or Valkey in Magento 2? Have a look at [Redis on Magento-2](../../ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md)!
Redis is a caching method which can increase the speed of the backend and frontend of your shop. On Hypernode every customer has access to Redis cache, starting from 64 MB, depending on the plan. This article will explain how to configure Redis on your Magento 2 shop on Hypernode and how to work with redis-cli.
20
+
Valkey is a Redis-compatible in-memory store en supported by the latest Magento 2 versions. Since all the existing Redis configuration flags work unchanged, you can easily switch from Redis to Valkey. Valkey is available on Debian Bookworm Hypernodes.
21
+
> `redis-cli`and `redis-tools` is symlinked to `valkey-cli` and `valkey-tools` when Valkey is enabled. You can use **either**. Examples below show `redis-cli` with an `or valkey-cli` alternative.
19
22
20
23
Want to know how to configure Redis in Magento 1? Have a look at [this article](../../ecommerce-applications/magento-1/how-to-configure-redis-for-magento-1.md)!
21
24
22
-
Want to know how to configure Valkey in Magento 2? Have a look at [this article](../../ecommerce-applications/magento-2/how-to-configure-valkey-for-magento-2.md)!
25
+
# Enable Redis or Valkey on your Hypernode
26
+
27
+
First thing you need to do is enable Redis or Valkey on your Hypernode.
28
+
29
+
Redis is enabled by default, if you want to make use of Valkey, you can enable it by running the following command:
There are two ways to configure Redis Cache for Magento 2. You can either run a command which automatically updates the `env.php` with the correct details or you can manually change the `env.php` file.
37
+
There are two ways to configure Redis/Valkey Cache for Magento 2. You can either run a command which automatically updates the `env.php` with the correct details or you can manually change the `env.php` file.
27
38
28
-
## Configure Redis Cache for Magento 2 Through the Commandline
39
+
## Configure Redis/Valkey Cache for Magento 2 Through the Commandline
29
40
30
-
Use the following command to enable Redis backend caching:
41
+
Use the following command to enable Redis/Valkey backend caching:
## Configure Redis Full Page Caching for Magento 2
58
+
## Configure Redis/Valkey Full Page Caching for Magento 2
48
59
49
-
To enable page caching Redis, extend your /data/web/magento2/app/etc/env.php with the following snippet. You should paste this in between the cache keys, so leave the cache tag in this snippet out of it.
60
+
To enable page caching in Redis/Valkey, extend your /data/web/magento2/app/etc/env.php with the following snippet. You should paste this in between the cache keys, so leave the cache tag in this snippet out of it.
50
61
51
62
```console
52
63
$ cd /data/web/magento2
@@ -65,7 +76,7 @@ $ redis-cli flushall
65
76
66
77
## Flush Your Caches
67
78
68
-
To flush your Magento cache, clear the Redis database corresponding to your configured Redis database:
79
+
To flush your Magento cache, clear the Redis/Valkey database corresponding to your configured Redis/Valkey database:
69
80
70
81
```console
71
82
$ redis-cli -n 1 flushdb
@@ -98,15 +109,15 @@ $ # If you use Magento's builtin page cache with Redis
## Configure Magento 2 to Use Redis as the Session Store
112
+
## Configure Magento 2 to Use Redis/Valkey as the Session Store
102
113
103
-
You can use Redis for storing sessions too!
114
+
You can use Redis/Valkey for storing sessions too!
104
115
105
-
Hypernodes bigger than a Grow plan, often have enough memory to store the session data in Redis. This way sessions are stored in-memory, making the shop faster and use less IO than when using MySQL or files as session store.
116
+
Hypernodes bigger than a Grow plan, often have enough memory to store the session data in Redis/Valkey. This way sessions are stored in-memory, making the shop faster and use less IO than when using MySQL or files as session store.
106
117
107
-
### Configure Magento 2 to Store Sessions in Redis
118
+
### Configure Magento 2 to Store Sessions in Redis/Valkey
108
119
109
-
As Magento 2 is fully supporting Redis, there is no need to install additional extensions to configure Redis. All you need to do is extend your `app/etc/env.php` and flush your cache.
120
+
As Magento 2 is fully supporting Redis, there is no need to install additional extensions to configure Redis/Valkey. All you need to do is extend your `app/etc/env.php` and flush your cache.
110
121
111
122
To enable session storage in Redis, run the following command:
### Enable Second Redis/Valkey Instance for Sessions
129
140
130
141
We have made it possible to enable a second Redis instance more tailored for saving session data (more information can be found in our [changelog](https://changelog.hypernode.com/changelog/experimental-changes-redis-sessions-aws-performance/)).
131
142
132
-
To enable the second Redis instance for sessions you run the command: `hypernode-systemctl settings redis_persistent_instance True`
143
+
To enable the second Redis/Valkey instance for sessions you run the command: `hypernode-systemctl settings redis_persistent_instance True`
133
144
134
-
After enabling the second Redis instance you need to change the configured Redis session port value to `6378` instead of the default `6379` and the database to `0`, since we're using a separate Redis instance now:
145
+
After enabling the second Redis/Valkey instance you need to change the configured Redis session port value to `6378` instead of the default `6379` and the database to `0`, since we're using a separate Redis/Valkey instance now:
135
146
136
147
```console
137
148
$ cd /data/web/magento2
@@ -146,7 +157,7 @@ Furthermore you need to add the following line to your crontab:
146
157
* * * * * redis-cli -p 6378 bgsave
147
158
```
148
159
149
-
### Test Whether Your Sessions Are Stored in Redis
160
+
### Test Whether Your Sessions Are Stored in Redis/Valkey
150
161
151
162
To verify whether your configuration is working properly, first clear your session store:
0 commit comments