Skip to main content

How to change wordpress theme from shell

Scott avatar
Written by Scott
Updated over 2 weeks ago

Changing your WordPress theme doesn't always require logging into the admin dashboard thanks to WP-CLI, the powerful command-line tool for WordPress. Whether you're working on a server without GUI access, managing multiple sites, or simply prefer the speed of the terminal, WP-CLI allows you to switch themes quickly and efficiently with just a few commands. This article will show you exactly how to change your WordPress theme using WP-CLI.

The document root for both Shared and WPO servers is provided below:

WPO : /home/nginx/domains/yourdomaingoeshere/public/
Shared: /home/cpaneluser/public_html/

  1. Access the server via SSH. If you're using our service, you can refer to the articles below for step-by-step instructions on how to connect to the server using SSH.

  2. Navigate to the web root of your website, then run the command below to view the list of installed and active themes.

    wp theme list

  3. You currently have the PopularFX theme activated. To switch to the Twenty Twenty-Five theme, please use the command below.

    wp theme activate twentytwentyfive

  4. The theme has been successfully changed to Twenty Twenty-Five. You can also check and verify this from the WordPress dashboard.



Congratulations! You've successfully changed your wordpress theme using wp-cli.

If you have any questions, please don’t hesitate to contact our team via live chat.

For technical inquiries, please feel free to reach our support team by emailing support@bigscoots.com from your registered email or by submitting a support ticket.

Did this answer your question?