{"id":12129,"date":"2021-10-26T10:28:52","date_gmt":"2021-10-26T10:28:52","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=12129"},"modified":"2024-04-23T12:35:02","modified_gmt":"2024-04-23T11:35:02","slug":"install-redis-php-redis-cpanel-server","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/","title":{"rendered":"How to Install Redis and PHP Redis on a cPanel Server?"},"content":{"rendered":"<p>cPanel users operate a Linux-based server, meaning they need to install Redis and PHP Redis. This software is vital for developers who are building their projects with PHP.<\/p>\n<p>Redis is an open-source and powerful in-memory data structure store. Also acting as a key-value store, it contains strings, hashes, lists, sets, and sorted sets. With Redis, it is easy to store large data amounts without affecting the data transfer performance. It has a passive data caching mechanism that removes the dirty cache while updating new content.<\/p>\n<h2>To Install Redis<\/h2>\n<p>1. Log in to your cPanel server via SSH.<\/p>\n<p>2. Run these commands to download the rpm files for Redis.<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true \"># wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\n\n# wget http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm<\/pre>\n<p>3. Enter and run these commands to install Redis:<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true \"># rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm\n\n# yum install \u2013y redis<\/pre>\n<p>With this, you will have installed the Redis on your server.<\/p>\n<p>4. Run this command to enable Redis:<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true \"># chkconfig redis on<\/pre>\n<p>It will allow Redis to start its operation on the server reboot automatically.<\/p>\n<p>Now that you have done the installation, we will move on to configure Redis.<\/p>\n<p>5. Open the <strong>redis.conf<\/strong> file and enter\/copy these lines at the end of the file:<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true \">vi \/etc\/redis.conf\n\nmaxmemory 256mb\n\nmaxmemory-policy allkeys-lru<\/pre>\n<p>It will set the basic configurations for Redis on your server. Consequently, it is now time that you install the PHP Redis extension.<\/p>\n<h2>To Install PHP Redis<\/h2>\n<p>1. Log in to WHM with root access.<\/p>\n<p>2. Select the <strong>Software<\/strong> option from the navigation menu.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13609\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png\" alt=\"\" width=\"1599\" height=\"700\" \/><\/p>\n<p>3. Click on <strong>Module Installers<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11797\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_mod_install.png\" alt=\"\" width=\"1919\" height=\"752\" \/><\/p>\n<p>4. Click <strong>Manage<\/strong> for <strong>PHP Pecl<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11798\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/06\/whm_pecl_manage.png\" alt=\"\" width=\"680\" height=\"448\" \/><\/p>\n<p>The\u00a0<em>PHP Pecl Installer<\/em> section will open.<\/p>\n<p>Do you see the <em>Find a &#8220;PHP PECL&#8221;<\/em> section? Good!<\/p>\n<p>5. Type &#8220;<strong>redis<\/strong>&#8221; in the <em>Search<\/em> box and click <strong>Go<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13610\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_php_pecl_installer_redis_go.png\" alt=\"\" width=\"1340\" height=\"538\" \/><\/p>\n<p>6. The search will return the appropriate PHP Redis module. Click <strong>Install<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13611\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_php_pecl_installer_redis_install.png\" alt=\"\" width=\"832\" height=\"326\" \/><\/p>\n<p>It will install the PHP extension that will act as an interface for Redis.<\/p>\n<p>7. Finally, run these commands in the SSH:<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true \"># service httpd restart\n\n# service redis restart<\/pre>\n<p>It will restart Redis and httpd for the changes to take effect.<\/p>\n<p>With it, the installation of Redis and PHP Redis on your cPanel server will be complete.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cPanel users operate a Linux-based server, meaning they need to install Redis and PHP Redis. This software is vital for developers who are building their projects with PHP. Redis is an open-source and powerful in-memory data structure store. Also acting as a key-value store, it contains strings, hashes, lists, sets, and sorted sets. With Redis, [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,41,229],"tags":[152,2374,2607,2608,1260,1179],"class_list":["post-12129","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-cpanel-faq","category-howtos","category-whm","tag-cpanel","tag-cpanel-server","tag-php-redis-cpanel","tag-php-redis-extension","tag-redis-installation","tag-ssh-access"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Redis and PHP Redis on a cPanel Server?<\/title>\n<meta name=\"description\" content=\"This tutorial will help cPanel users as it describes the steps to install Redis and PHP Redis if they have SSH and root access to the server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Redis and PHP Redis on a cPanel Server?\" \/>\n<meta property=\"og:description\" content=\"This tutorial will help cPanel users as it describes the steps to install Redis and PHP Redis if they have SSH and root access to the server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-26T10:28:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-23T11:35:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png\" \/>\n<meta name=\"author\" content=\"Prasad Khartadkar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasad Khartadkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/\",\"name\":\"How to Install Redis and PHP Redis on a cPanel Server?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png\",\"datePublished\":\"2021-10-26T10:28:52+00:00\",\"dateModified\":\"2024-04-23T11:35:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\"},\"description\":\"This tutorial will help cPanel users as it describes the steps to install Redis and PHP Redis if they have SSH and root access to the server.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png\",\"width\":1599,\"height\":700},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Redis and PHP Redis on a cPanel Server?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\",\"name\":\"Prasad Khartadkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g\",\"caption\":\"Prasad Khartadkar\"},\"description\":\"Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/prasad-khartadkar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Redis and PHP Redis on a cPanel Server?","description":"This tutorial will help cPanel users as it describes the steps to install Redis and PHP Redis if they have SSH and root access to the server.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/","og_locale":"en_GB","og_type":"article","og_title":"How to Install Redis and PHP Redis on a cPanel Server?","og_description":"This tutorial will help cPanel users as it describes the steps to install Redis and PHP Redis if they have SSH and root access to the server.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2021-10-26T10:28:52+00:00","article_modified_time":"2024-04-23T11:35:02+00:00","og_image":[{"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png","type":"","width":"","height":""}],"author":"Prasad Khartadkar","twitter_misc":{"Written by":"Prasad Khartadkar","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/","name":"How to Install Redis and PHP Redis on a cPanel Server?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png","datePublished":"2021-10-26T10:28:52+00:00","dateModified":"2024-04-23T11:35:02+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e"},"description":"This tutorial will help cPanel users as it describes the steps to install Redis and PHP Redis if they have SSH and root access to the server.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/whm_software.png","width":1599,"height":700},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/install-redis-php-redis-cpanel-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Install Redis and PHP Redis on a cPanel Server?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e","name":"Prasad Khartadkar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g","caption":"Prasad Khartadkar"},"description":"Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/prasad-khartadkar\/"}]}},"views":738,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/12129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=12129"}],"version-history":[{"count":4,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/12129\/revisions"}],"predecessor-version":[{"id":15406,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/12129\/revisions\/15406"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=12129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=12129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=12129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}