{"id":1264,"date":"2019-11-20T11:49:08","date_gmt":"2019-11-20T10:49:08","guid":{"rendered":"https:\/\/www.combell.nl\/en\/help\/?post_type=ht_kb&#038;p=1264"},"modified":"2023-03-01T11:26:16","modified_gmt":"2023-03-01T10:26:16","slug":"how-to-implement-redis-in-wordpress","status":"publish","type":"ht_kb","link":"https:\/\/www.combell.nl\/en\/help\/kb\/how-to-implement-redis-in-wordpress\/","title":{"rendered":"How to implement Redis in WordPress?"},"content":{"rendered":"    \t\t<div class=\"hts-messages hts-messages--info   hts-messages--withicon \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tHINT: If you have a CMS hosting account (WordPress Performance, Magento Business, Joomla Express, Drupal Express, etc.), Combell will automatically choose the best caching method for you and configure it. You do not need to go through this procedure.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p>REDIS is the preferred method for caching WordPress if the backend and\/or the frontend are slow<\/p>\n<p><strong>To implement REDIS in WordPress follow this tutorial:<\/strong><\/p>\n<ol>\n<li>First make sure you <a href=\"https:\/\/www.combell.nl\/en\/help\/kb\/activate-caching-on-your-webhosting\/\">Activate Redis <\/a>caching from <a href=\"https:\/\/my.combell.nl\/en\" target=\"_blank\" rel=\"noopener\">control panel<\/a><\/li>\n<li>Log into the backend of WordPress<\/li>\n<li>Install the following plugin: Redis Object Cache (https:\/\/wordpress.org\/plugins\/redis-cache\/other_notes\/)<\/li>\n<li>Activate the plugin but do not yet click on the &#8220;Enable Object Cache&#8221; button in the settings section of the plugin control.Now, as you see, this plugin has a settings screen, but you can not enter the IP address and port of your REDIS. Therefore, we should add the following to the wp-config.php via ssh:\n<pre><code>\/**\n* REDIS config\n*\/\n\ndefine('WP_REDIS_HOST', '176.62.167.157');\ndefine('WP_REDIS_PORT', '10039');\ndefine('WP_REDIS_PASSWORD', 'password');\ndefine('WP_REDIS_MAXTTL', '86400');<\/code><\/pre>\n<p>You are adding this block of code just above this line:<\/p>\n<pre><code>\/* That's all, stop editing! Happy blogging. *\/<\/code><\/pre>\n<\/li>\n<li>Now back in the Settings section of your WordPress plugin, click on the &#8220;Enable Object Cache&#8221; button.<br \/>\nNow your Redis should work.<\/li>\n<\/ol>\n<h3 id=\"checkingredis\">Checking Redis<\/h3>\n<p>Then check if the Redis Cache is being correctly filled. This is done as follows via the Redis-CLI:<\/p>\n<p>Execute this command:<\/p>\n<pre><code>redis-cli -h redisipadress -p redisportnumber\n<\/code><\/pre>\n<p>Example:<\/p>\n<pre><code>redis-cli -h 250.250.250.1 -p 10000\n<\/code><\/pre>\n<p>This is what will appear<\/p>\n<pre><code>250.250.250.1:10000&gt;\n<\/code><\/pre>\n<p>Now enter the word &#8220;AUTH&#8221; followed by the password of the Redis instance and press enter. This looks like this:<\/p>\n<pre><code>250.250.250.1:10000&gt; AUTH ***************\n<\/code><\/pre>\n<p>You should now get an \u201cOK\u201d back. Respond with executing this command: \u201ckeys *\u201d like so:<\/p>\n<pre><code>250.250.250.1:10000&gt; keys *\n<\/code><\/pre>\n<p>If Redis is configured properly, you see an output similar to the following:<\/p>\n<pre><code>1) \"zc:k:f01_B95179DADADD876876ADDaD87630E9E\"\n2) \"zc:ti:f01_BLOCK_SLIDE2\"\n3) \"zc:k:f01_Zend_LocaleC_nl_NL_country_MR\"\n4) \"zc:ti:f01_BLOCK_CATEGORY_ABOVE_EMPTY_COLLECTION\"\n5) \"zc:k:f01_6ADDaDA9B2A0BB12371C0A5FB79E\"\n6) \"zc:k:f01_CMS_BLOCK_BLOCK_LEFT_TOP_1_1\"\n7) \"zc:k:f01_Zend_LocaleC_sv_SE_language_sv\"\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>REDIS is the preferred method for caching WordPress if the backend and\/or the frontend are slow To implement REDIS in WordPress follow this tutorial: First make sure you Activate Redis caching from control panel Log into the backend of WordPress Install the following plugin: Redis Object Cache (https:\/\/wordpress.org\/plugins\/redis-cache\/other_notes\/) Activate the&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[84,74],"ht-kb-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/1264"}],"collection":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/comments?post=1264"}],"version-history":[{"count":11,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/1264\/revisions"}],"predecessor-version":[{"id":3391,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/1264\/revisions\/3391"}],"wp:attachment":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/media?parent=1264"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-category?post=1264"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=1264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}