WordPress Help

Change my WordPress theme with WP-CLI

WP-CLI is a command line tool that helps you perform different actions on your WordPress site. If you're comfortable with using SSH commands, you'll notice that WP-CLI has simplified commands created for WordPress sites. If you're changing the theme for troubleshooting purposes, we recommend switching to one of the default WordPress themes.

Warning: You should always back up your site before changing your theme.
Required: You'll need the following to complete these steps:
Note: If you have a VPS or DED Server, you need to install WP-CLI before you can start using it. WP-CLI is not available on our Windows Hosting plans.
  1. Connect to your hosting account with SSH.
  2. Use the bash command ls to list files and folders, and cd and ../ to move through directories until you're in the directory with your WordPress files.
  3. Enter the following command to see the list of themes installed on your site.
    wp theme list
    • (Optional) If there are themes you don’t intend to use, you can delete them with the following command:
      wp theme delete theme-name
      In the code above, replace theme-name with the actual name of the theme you want to delete.
  4. If you want to use the theme that is not installed on your site, here's how to install it. Otherwise, skip this step.
    • To install a theme from the WordPress repository, enter the following command:
      wp theme install theme-name
      In the code above, replace theme-name with the actual name of the theme you want to install.
    • To install a theme from a .zip file, upload the theme .zip file to the folder with your WordPress installation using FTP or File Manager. Then, enter the following command:
      wp theme install theme-name.zip
      In the code above, replace theme-name.zip with the actual name of the .zip file you've previously uploaded.
  5. Activate the theme with the following command:
    wp theme activate theme-name
    In the code above, replace theme-name with the actual name of the theme you want to activate.
  6. After you see the success message, visit your site in a browser to see if it works as intended. For any theme-specific issues, check your theme developer’s documentation.
Note: To install and activate a theme at the same time, append the install command with --activate. Here is how that command would look:
wp theme install theme-name --activate

More info