{"id":4324,"date":"2018-02-06T18:07:34","date_gmt":"2018-02-06T18:07:34","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2018\/02\/06\/change-wordpress-theme-using-wp-cli\/"},"modified":"2021-08-16T22:28:34","modified_gmt":"2021-08-17T02:28:34","slug":"change-wordpress-theme-using-wp-cli","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/","title":{"rendered":"Change WordPress Theme Using WP-CLI"},"content":{"rendered":"<p>InMotion Hosting&#8217;s <a href=\"https:\/\/www.inmotionhosting.com\/wordpress-hosting\" target=\"_blank\" title=\"Click here to navigate to our main website to see our available WordPress Hosting plans.\" rel=\"noopener noreferrer\">WordPress Hosting<\/a> features <strong>WordPress Command Line Interface<\/strong> (<em>WP-CLI<\/em>). WP-CLI allows you to use the command line to efficiently maintain your WordPress website(s). In our previous guide, <a href=\"\/support\/edu\/wordpress\/wp-cli\/install-a-theme-using-wp-cli\/\" target=\"_blank\" title=\"Click here to navigate to our guide and learn how to install a theme using WP-CLI.\" rel=\"noopener noreferrer\">Install a Theme Using WP-CLI<\/a> we introduced the <strong>wp theme<\/strong> command. In this guide, you will learn <strong>how to <em>list your installed themes<\/em><\/strong> and <strong>how to <em>change the theme for your WordPress website<\/em> using WP-CLI<\/strong>.<\/p>\n<h2>List Installed Themes<\/h2>\n<ol class=\"article_list\">\n<li><a href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" title=\"Click here to navigate to our guide and learn how to use SSH to connect to your server\" rel=\"noopener noreferrer\">SSH into your server<\/a> as the cPanel user that owns the website you would like to list the themes for.<\/li>\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" rel=\"noopener noreferrer\">document root directory of your website<\/a>.Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n<li>Run the following subcommand, to list your currently installed themes:<span class=\"cli\">wp theme list<\/span><\/li>\n<p>The example output below, indicates that we have four (4) themes installed.<\/p>\n<pre class=\"cli\">exampl3@example.com [~\/public_html]# wp theme list +-----------------+----------+--------+---------+ | name            | status   | update | version | +-----------------+----------+--------+---------+ | boldgrid-primas | inactive | none   | 1.23.1  | | boldgrid-swifty | active   | none   | 1.1.1   | | twentyfifteen   | inactive | none   | 1.9     | | twentyseventeen | inactive | none   | 1.4     | | twentysixteen   | inactive | none   | 1.4     | +-----------------+----------+--------+---------+<\/pre>\n<p>Under the <i>status<\/i> column, <b>active<\/b> appears next to the theme that is currently activated for the website.<\/p>\n<\/ol>\n<p>Now that you are familiar with listing the installed themes, you can follow the instructions in the next section to change the active theme for your website to one of the themes listed. If you have not yet installed the theme you would like to change to, you can follow our guide <a href=\"\/support\/edu\/wordpress\/wp-cli\/install-a-theme-using-wp-cli\/\" target=\"_blank\" title=\"Click here to navigate to our guide and learn how to install a theme using WP-CLI.\" rel=\"noopener noreferrer\">Install a Theme Using WP-CLI<\/a>.<\/p>\n<h2>Change Theme<\/h2>\n<p>Once you have a theme in mind to change your website to, you can simply use the <b>wp theme<\/b> command to activate it.<\/p>\n<ol class=\"article_list\">\n<li><a href=\"\/support\/server\/ssh\/shared-reseller-ssh\/\" target=\"_blank\" title=\"Click here to navigate to our guide and learn how to use SSH to connect to your server\" rel=\"noopener noreferrer\">SSH into your server<\/a> as the cPanel user that owns the website you would like to change the theme on.<\/li>\n<li>Use the <span class=\"cli\">cd<\/span> command to switch to the <a href=\"\/support\/website\/where-to-upload-files\/\" target=\"_blank\" title=\"Click here to navigate to our guide and learn how to find the document root directory of your website.\" rel=\"noopener noreferrer\">document root directory of your website<\/a>.Example: <span class=\"cli\">cd <b>public_html\/my_website<\/b><\/span>\n<div class=\"alert alert-info\" role=\"alert\"><b>NOTE: <\/b>Be sure to replace <span class=\"cli\"><b>public_html\/my_website<\/b><\/span> with the actual path to the document root directory of your website.<\/div>\n<\/li>\n<li>Run the following subcommand, to list your currently installed themes:\n<pre class=\"cli\">wp theme activate boldgrid-primas<\/pre>\n<\/li>\n<p>Once the theme is activated, you will receive a successful message, like the one below:<\/p>\n<pre class=\"cli\">exampl3@example.com [~\/public_html]# wp theme activate boldgrid-primas <span style=\"color:lime\">Success:<\/span> Switched to 'Primas' theme.<\/pre>\n<\/ol>\n<p><b>Congratulations!<\/b> You now know how to list the installed themes and how to change the theme for your WordPress site, using WP-CLI.<\/p>\n\n<p>Learn more about <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/\">WP-CLI<\/a>, the command-line interface for WordPress, and how to streamline your WordPress maintenance workflows!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>InMotion Hosting&#8217;s WordPress Hosting features WordPress Command Line Interface (WP-CLI). WP-CLI allows you to use the command line to efficiently maintain your WordPress website(s). In our previous guide, Install a Theme Using WP-CLI we introduced the wp theme command. In this guide, you will learn how to list your installed themes and how to change<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\"> Read More ><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4374],"tags":[],"class_list":["post-4324","post","type-post","status-publish","format-standard","hentry","category-wp-cli"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Change a WordPress Theme Using WP-CLI<\/title>\n<meta name=\"description\" content=\"In this guide, you will learn how to list the installed WordPress themes and how to change the theme from the command line, using WP-CLI.\" \/>\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.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change a WordPress Theme Using WP-CLI\" \/>\n<meta property=\"og:description\" content=\"In this guide, you will learn how to list the installed WordPress themes and how to change the theme from the command line, using WP-CLI.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-06T18:07:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T02:28:34+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\"},\"headline\":\"Change WordPress Theme Using WP-CLI\",\"datePublished\":\"2018-02-06T18:07:34+00:00\",\"dateModified\":\"2021-08-17T02:28:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\"},\"wordCount\":368,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"WP-CLI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\",\"name\":\"Change a WordPress Theme Using WP-CLI\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2018-02-06T18:07:34+00:00\",\"dateModified\":\"2021-08-17T02:28:34+00:00\",\"description\":\"In this guide, you will learn how to list the installed WordPress themes and how to change the theme from the command line, using WP-CLI.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Change WordPress Theme Using WP-CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change a WordPress Theme Using WP-CLI","description":"In this guide, you will learn how to list the installed WordPress themes and how to change the theme from the command line, using WP-CLI.","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.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/","og_locale":"en_US","og_type":"article","og_title":"Change a WordPress Theme Using WP-CLI","og_description":"In this guide, you will learn how to list the installed WordPress themes and how to change the theme from the command line, using WP-CLI.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2018-02-06T18:07:34+00:00","article_modified_time":"2021-08-17T02:28:34+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b"},"headline":"Change WordPress Theme Using WP-CLI","datePublished":"2018-02-06T18:07:34+00:00","dateModified":"2021-08-17T02:28:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/"},"wordCount":368,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["WP-CLI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/","name":"Change a WordPress Theme Using WP-CLI","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2018-02-06T18:07:34+00:00","dateModified":"2021-08-17T02:28:34+00:00","description":"In this guide, you will learn how to list the installed WordPress themes and how to change the theme from the command line, using WP-CLI.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/change-wordpress-theme-using-wp-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Change WordPress Theme Using WP-CLI"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5fbfcaed32a2672fb83ab312f5b7237b","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/john-paul\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4374,"name":"WP-CLI","slug":"wp-cli","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=4324"}],"version-history":[{"count":5,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4324\/revisions"}],"predecessor-version":[{"id":83773,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/4324\/revisions\/83773"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=4324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=4324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=4324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}