Redis - Server Config rewrite Command


Redis CONFIG REWRITE command rewrites the redis.conf file the server was started with, applying minimal changes needed to reflect the configuration currently used by the server. It may be different compared to the original one because of the use of the CONFIG SET command.

Return Value

String reply – OK, when the configuration is rewritten properly. Otherwise, an error is returned.


Following is the basic syntax of Redis CONFIG REWRITE command.

redis> CONFIG REWRITE parameter