{"id":6256,"date":"2020-12-31T16:13:15","date_gmt":"2020-12-31T16:13:15","guid":{"rendered":"https:\/\/truehost.co.ke\/support\/?post_type=ht_kb&#038;p=6256"},"modified":"2024-06-21T08:31:31","modified_gmt":"2024-06-21T08:31:31","password":"","slug":"how-to-install-wordpress-using-ssh-in-cpanel","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/","title":{"rendered":"How to Install WordPress using SSH in Cpanel."},"content":{"rendered":"\n<p>Installing WordPress often takes a lot of steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Downloading and uncompressing a zip file,<\/li><li>Uploading files to the server, and<\/li><li>Setting up the database and config.<\/li><\/ul>\n\n\n\n<p>That can take a lot of time.<\/p>\n\n\n\n<p>Or you can do&nbsp;it by using the Softaculous Apps installer utility available in the control panel.&nbsp;<\/p>\n\n\n\n<p>In SSH installation process is rather easy and very fast.<\/p>\n\n\n\n<p>Requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>SSH access to your hosting account, if not, please request your hosting provider to allow SSH access.<\/li><li>SSH application, e.g. putty but for Linux users, you can use your terminal.<\/li><\/ul>\n\n\n\n<p>Step1: Login to Cpanel and access the terminal or use the SSH application eg putty with your credentials.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"183\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png\" alt=\"\" class=\"wp-image-7547\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png 738w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1-300x74.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1-50x12.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1-600x149.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1-320x79.png 320w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><figcaption>If you are accessing it for the first time, you will see a warning &#8220;Exercise extreme caution if you use this interface.&nbsp;Misuse of command-line tools can corrupt or even destroy your data.&#8221; Accept it to proceed.<\/figcaption><\/figure>\n\n\n\n<p>Step 2: Download WordPress.<\/p>\n\n\n\n<p>Need to go to the correct directory where we want to set up WordPress. Download the files and extract them there.<\/p>\n\n\n\n<p>Let&#8217;s say the directory you want your blog to be installed under the&nbsp;public_html&nbsp;directory. In that case, you will use the following command:<\/p>\n\n\n\n<p><em>cd public_html\/<\/em><\/p>\n\n\n\n<p>Download WordPress using the&nbsp;<em>wget<\/em>&nbsp;command.<\/p>\n\n\n\n<p><em>wget <a href=\"http:\/\/wordpress.org\/latest.tar.gz\">http:\/\/wordpress.org\/latest.tar.gz<\/a><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"346\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1.png\" alt=\"\" class=\"wp-image-7551\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1-300x101.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1-768x260.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1-50x17.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1-920x311.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1-600x203.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/wget-1-320x108.png 320w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Extract the downloaded WordPress using the following command.<\/p>\n\n\n\n<p><em>$tar xfz latest.tar.gz<\/em><\/p>\n\n\n\n<p>Now, after extraction, you will find a&nbsp;WordPress&nbsp;directory under the&nbsp;public_html directory containing your install.<\/p>\n\n\n\n<p>So to shift the files back to where they should be, use the following commands:<\/p>\n\n\n\n<p><code><em>mv<\/em><\/code><em> <\/em><code><em>wordpress\/* \/public_html<\/em><\/code><\/p>\n\n\n\n<p><code>Step 3: Installing WordPress<\/code><\/p>\n\n\n\n<p><code>You need first to create the database and the user and assign privileges.<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>mysql -u username \u2013p<\/em><\/li><li><em>create database dbname;<\/em><\/li><li><em>create user &#8216;dbusername&#8217;@&#8217;localhost&#8217; identified by &#8216;password&#8217;;<\/em><\/li><li><em>grant usage on *.* to username@localhost identified by &#8216;password&#8217;;<\/em><\/li><li><em>grant all privileges on dbname.* to username@localhost<\/em>;<\/li><\/ul>\n\n\n\n<p>The first command creates the database. The second one creates the database. The third command allows the user to connect to the database. The final command grants all privileges to the user for that database. You can test whether your database creation was successful by running this command:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>use dbname;<\/em><\/li><\/ul>\n\n\n\n<p>It should say &#8220;database changed&#8221;. Now you can exit the MySQL command line by typing\u00a0exit.<\/p>\n\n\n\n<p>Now you need to create the database connection in the wp-config.php<\/p>\n\n\n\n<p>Use the following command using vim editors.<\/p>\n\n\n\n<p><code><em>vi .\/wp-config.php<\/em><\/code><\/p>\n\n\n\n<p><code>Enter your database credentials and save.<\/code><\/p>\n\n\n\n<p><code>Now, you can load your website on your browser for the WordPress installer to run.<\/code><\/p>\n\n\n\n<p><code>Enjoy.<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing WordPress often takes a lot of steps: Downloading and uncompressing a zip file, Uploading files to the server, and Setting up the database and config. That can take a lot of time. Or you can do&nbsp;it by using the Softaculous Apps installer utility available in the control panel.&nbsp; In SSH installation process is rather [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1838],"doc_tag":[],"class_list":["post-6256","docs","type-docs","status-publish","hentry","doc_category-wordpress"],"year_month":"2026-07","word_count":426,"total_views":"0","reactions":{"happy":"1","normal":"0","sad":"0"},"author_info":{"name":"simon m","author_nicename":"simon","author_url":"https:\/\/truehost.com\/support\/author\/simon\/"},"doc_category_info":[{"term_name":"WordPress","term_url":"https:\/\/truehost.com\/support\/docs-category\/wordpress\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install WordPress using SSH in Cpanel. -<\/title>\n<meta name=\"description\" content=\"With just a few steps, you can install wordpress using ssh. The steps are easy and gives you fun and fulfilment when running the commands.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install WordPress using SSH in Cpanel. -\" \/>\n<meta property=\"og:description\" content=\"With just a few steps, you can install wordpress using ssh. The steps are easy and gives you fun and fulfilment when running the commands.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-21T08:31:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/\",\"name\":\"How to Install WordPress using SSH in Cpanel. -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/terminal-1.png\",\"datePublished\":\"2020-12-31T16:13:15+00:00\",\"dateModified\":\"2024-06-21T08:31:31+00:00\",\"description\":\"With just a few steps, you can install wordpress using ssh. The steps are easy and gives you fun and fulfilment when running the commands.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/terminal-1.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/terminal-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-wordpress-using-ssh-in-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install WordPress using SSH in Cpanel.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install WordPress using SSH in Cpanel. -","description":"With just a few steps, you can install wordpress using ssh. The steps are easy and gives you fun and fulfilment when running the commands.","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:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to Install WordPress using SSH in Cpanel. -","og_description":"With just a few steps, you can install wordpress using ssh. The steps are easy and gives you fun and fulfilment when running the commands.","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/","article_modified_time":"2024-06-21T08:31:31+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/","name":"How to Install WordPress using SSH in Cpanel. -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png","datePublished":"2020-12-31T16:13:15+00:00","dateModified":"2024-06-21T08:31:31+00:00","description":"With just a few steps, you can install wordpress using ssh. The steps are easy and gives you fun and fulfilment when running the commands.","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2022\/07\/terminal-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-wordpress-using-ssh-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install WordPress using SSH in Cpanel."}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/6256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=6256"}],"version-history":[{"count":3,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/6256\/revisions"}],"predecessor-version":[{"id":7552,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/6256\/revisions\/7552"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=6256"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=6256"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=6256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}