With the help of WP-CLI you can manage your website built on WordPress through the command line. The theme command can be used to manage WordPress themes - install, uninstall, update and enable/disable.

To install and activate a WordPress theme using the theme command in WP-CLI, we recommend that you follow the steps below.

- Log in to the server via SSH with the cPanel user who owns the website on which you want to install the plugin.

- Use the cd command to access the root folder of your website eg:

cd public_html/website

Replace public_html/wp with the actual path to the root folder of your website.

There are several ways to get/install a theme. Choose the one that suits you best. If you are not sure which is the best option, we recommend the Slug option.

 

Slug

Run the search subcommand to find the theme:

wp theme search divi

Replace the search term given as an divi example with the name of the theme you are looking for.

- Notice the slug value that appears next to the theme you want to install. You will use this option in the command to install and activate the desired theme.

The table below is an example of the output (search results) of executing the above command:

Name Slug Rating
Divi divi 0
Tiny Hestia tiny-hestia 0
Hestia hestia 94

Execute the following command by replacing divi with the slug value found in the search:

wp theme install divi –activate

ZIP File

- Download the theme's ZIP file and upload it to your server. Make sure you only upload the ZIP file to the root folder of your website.


Run the following command, replacing divi.zip with the actual theme file name:

wp theme install divi.zip –activate

Download Link

- Find the URL to download the theme you want to install.

Run the following command replacing https://downloads.wordpress.org/theme/hestia.1.1.56.zip  with the actual download link for your theme:

wp theme install https://downloads.wordpress.org/theme/hestia.1.1.56.zip –activate

 

For assistance in applying the above instructions on HostX servers please contact us. HostX offers the fastest WordPress hosting and can help you solve your problems.

Cette réponse était-elle pertinente? 0 Utilisateurs l'ont trouvée utile (0 Votes)