CYBER WEEK SALE - 50% OFF ALL HOSTING PLANS
50% OFF ALL NEW PLANS

In this article, you can find the following information about WordPress themes:

What is a WordPress theme?

Themes in WordPress were originally only used for changing the design (layout) of a website. Nowadays, there are a lot of themes that are very complex and totally change the way a WordPress installation functions. For example, some themes come with their own website builders that allow you to edit the website content very easily, others overhaul the default WordPress back and front-end.

How to choose a WordPress theme?

There are thousands of free themes available for preview and activation directly in the WordPress Dashboard. These themes can also be downloaded from the WordPress theme repository. Of course, this includes the default WordPress themes (like TT1 Blocks, Twenty Twenty-Three, Twenty Twenty-Two, Twenty Twenty-One, Twenty Twenty, etc.). Commercial themes can be found in the WordPress repository or dedicated theme-selling websites. Some commercial themes are available for purchase and download only through the websites of their vendors. There are basically themes available for all tastes. Of course, if you need something that is not available yet, there is always the option to hire a theme developer to build you the exact theme that you want and need.

When choosing a theme for your WordPress website, you should also consider checking if the theme receives regular updates, and if its developers, support team, or community offer any assistance. Regular updates are important as they will help prevent or fix potential compatibility issues with the theme and future versions of the WordPress core or plugins. If you run into any issues related to the theme, the chances of getting the issues resolved will increase significantly if the theme developers can help or there are active and knowledgeable members in the theme's community. You can also refer to the official WordPress community for assistance, but they may not be always able to help.

How to install a WordPress theme?

After you have found the theme that you wish to use, there are several ways to actually install it on your WordPress website - via the WordPress Dashboard, with the help of the WordPress command-line interface - WP-CLI, or by manually uploading it to the account. Installed themes can be activated via the WordPress Dashboard, as well as via WP-CLI. Some themes may require additional steps for their proper installation or activation (adding files, installing plugins, or purchasing a license for example), so please refer to the official instructions of the theme that you wish to use on your website.

You can install and test new themes on existing WordPress websites risk-free by using a staging instance. More information on how to set up a staging instance of your existing WordPress website via the hosting Control Panel is available in our Creating and using WordPress staging sites article.

Installing and activating a WordPress theme via the Dashboard

Installing a new theme via the WordPress Dashboard is the easiest and most user-friendly method which requires just a few steps. You only need to log in to your WordPress Dashboard (you can access it by adding "/wp-admin" to your website's URL - for example, http://your_domain.com/wp-admin) or even easier, use the "Log in" feature available in the hosting Control Panel > WordPress Manager as explained in our Managing WordPress administrators article.

Once logged in, navigate to the Appearance > Themes section.

WordPress Themes

Click on the Add New button or the Add New Theme block.

Add new WordPress theme

Now, there will be two installation options available depending on whether your new theme is listed in the public WordPress repository or not.

If your new theme is available in the WordPress theme repository, you can search for the theme directly through the WordPress Dashboard and use the Install button when you hover over its block.

Install WordPress theme

And if your new theme is not listed in the WordPress repository, you will need to obtain it in a ZIP format from its vendor. In this example, we are using the ZIP file of the free Hello Elementor theme.

Download WordPress theme

After you have the ZIP file, you need to click on the Upload Theme button within the Add Themes page of the WordPress Dashboard.

Upload WordPress theme

Use the Browse button to locate the ZIP file on your device, or simply drag the file from your device to the Upload Theme section. After that, click on the Install Now button.

Install uploaded WordPress theme

Your new WordPress theme should now be installed successfully, and all that is left is to activate it by simply clicking on the Activate button:

Activate WordPress theme

or the Activate link if you uploaded your theme as a ZIP file:

Actiate uploaded WordPress theme

Your new theme should now be activated.

New WordPress theme activated

Installing and activating a WordPress theme with WP-CLI

WP-CLI is supported on our servers, and you can use it with all hosting accounts. It basically allows you to use a command-line interface to manage your WordPress websites. For more information about WP-CLI, you can check our WP-CLI Tutorial article.

To install and activate a new theme via WP-CLI, you need to follow these steps:

  1. Enable SSH access for your account, and connect to it via SSH.

  2. Once you have connected to your account via SSH, navigate to the directory of your WordPress installation. If WordPress is installed on your main domain, you need to navigate to the ~/www/www directory of your account with the following command:

    cd ~/www/www

  3. If you are trying to install a new theme from the WordPress repository, you will need to find the slug of the theme. For example, the slug of the Hello Elementor theme is hello-elementor, so the WP-CLI command to install and activate this theme will be:

    wp theme install hello-elementor --activate
    The output of the command should look like this:

    Installing Hello Elementor (2.6.1)
    Downloading installation package from https://downloads.wordpress.org/theme/hello-elementor.2.6.1.zip...
    Unpacking the package...
    Installing the theme...
    Theme installed successfully.
    Activating 'hello-elementor'...
    Success: Switched to 'Hello Elementor' theme.
    Success: Installed 1 of 1 themes.

    In case your new theme is not available in the WordPress repository, you should obtain it as a ZIP file from the vendor and upload it to your account. Instructions on how to upload files to your account are available in the Uploading files section of our online documentation. So if you wish to install and activate a theme from a ZIP file named new_theme.zip that is uploaded to the Private directory of the account, you should use the following WP-CLI command:

    wp theme install ~/private/new_theme.zip --activate
    You should see a result like the following:

    Unpacking the package...
    Installing the theme...
    Theme installed successfully.
    Activating 'new-theme-slug'...
    Success: Switched to 'New Theme' theme.
    Success: Installed 1 of 1 themes.

    If your new theme is already installed and you just want to activate it, you should use the following command and make sure you replace new-theme-slug with the actual slug of the new theme:

    wp theme activate new-theme-slug

  4. That is it. Your new theme has been installed and activated successfully.

Installing a WordPress theme by uploading it to your account and activating it

This method is the least preferred as different actions have to be performed and that is why it is usually the slowest. To start, you need to:

  1. Retrieve the files of the theme from its vendor. Usually, the theme files will be bundled in an archive.
  2. Upload the archive containing the theme to the /wp-content/themes directory of your WordPress website in the account. If your website is installed on the main domain, you should upload the archive to the ~/www/www/wp-content/themes directory. You can use the hosting Control Panel > File Manager section or an FTP program. More details on how to upload files to your account can be found in the Uploading files section of our online documentation.
  3. Extract the theme files from the archive using the hosting Control Panel > File Manager section. Instructions on how to achieve this are available in our File Manager article. In general, the theme files will be located in a directory with the theme slug.
  4. Activate the theme via the WordPress Dashboard or via WP-CLI.

How to update a WordPress theme?

Updating your active WordPress theme may cause your website to malfunction or even fully crash. For this reason, it is very important that you check your website thoroughly after a theme update and always have a working recent backup of your WordPress installation. Although our automatic backups are generated twice per day and kept for seven days, we strongly recommend that you create a full backup of your WordPress installation right before updating your theme. This way you will have a restore point generated moments before the update, so you will be able to restore the website without any loss of data or information in the event of a problem. You can create backups of your WordPress websites with just a single click via the hosting Control Panel > WordPress Manager as explained in our Creating, downloading, and restoring from WordPress backups article.

Some themes may support automatic updates or updates through the WordPress Dashboard which allows for quick and easy updates. Other themes may require manual actions like downloading the latest version of the theme from the vendor, changing custom settings, or uploading the theme manually to your account. In the latter case, you should refer to the official documentation of your theme for instructions on how to update it correctly.

Utilizing automatic theme updates

There are WordPress themes that support automatic updates. Automatic updates for themes are disabled by default. You can enable them in one of two ways - the WordPress Dashboard or via WP-CLI. Automatic updates are processed twice per day by default, and you will see how much time is left before the automatic update will be processed for a theme next to it in the WordPress Dashboard > Updates section. After a theme has been updated automatically, an email message will be sent to the website owners about the event.

To enable automatic updates for a theme via the WordPress Dashboard, you need to:

  1. Log in to your WordPress Dashboard.
  2. Navigate to the Appearance > Themes section.

    WordPress Themes

  3. Click on the block of the theme that you wish to update to view its details.

    WordPress theme details

  4. Click on the "Enable auto-updates" link.

    WordPress theme enable auto updates

  5. The theme will be updated automatically from now on.

You should follow these steps to enable automatic updates for a WordPress theme via WP-CLI:

  1. Enable SSH access for your account, and connect to it via SSH.

  2. After you connect to your account via SSH, go to the directory of your WordPress installation. For example, you will need to go to the ~/www/www directory of your account if WordPress is installed on your main domain by using this command:

    cd ~/www/www

  3. Execute the following WP-CLI command to enable automatic updates for your active theme:

    wp theme auto-updates enable $(wp theme list --status=active --field=name)
    If you wish to enable automatic updates for all themes installed on your WordPress website, you can use the following WP-CLI command:

    wp theme auto-updates enable --all --disabled-only

  4. You have successfully enabled automatic updates for your WordPress theme/s.

Updating a theme through the WordPress Dashboard

Themes can be updated through the WordPress Dashboard after logging in as an administrator and going to the Updates section:

WordPress updates

In the Themes section, select the theme/s that you wish to update, and click on the Update Themes button:

Update_WordPress_theme.jpg

Alternatively, you can update a theme from the Appearance > Themes section of the WordPress Dashboard by clicking on the Update now link from the New version available notice of the theme with an available update:

Update WordPress theme 2

Updating a theme with WP-CLI

Updating a theme with WP-CLI is very quick. All you need to do is:

  1. Enable SSH access for your account, and establish connection to it via SSH.

  2. After connecting, go to the directory of your WordPress installation. Let's say WordPress is installed on your main domain, so you will need to go to the ~/www/www directory of your account by using this command:

    cd ~/www/www

  3. You can update your active theme with the following WP-CLI command:

    wp theme update $(wp theme list --status=active --field=name)
    To update all themes with pending updates, you can use this WP-CLI command:

    wp theme update --all

  4. Your WordPress theme/s should be updated now.

Updating a theme via the File Manager or FTP

The process of updating a theme via the File Manager or FTP requires that you replace the directory (and files) of the outdated version of the theme with the directory (and files) of the latest version of the theme. So, the process is almost the same as installing a new theme, which is covered in the Installing a WordPress theme by uploading it to your account and activating it section of this article. The only difference is that you will need to choose whether you wish to remove the contents of the outdated theme from the account, or upload the latest version of the theme and overwrite any existing files.

How to disable a WordPress theme?

To disable a WordPress theme, you simply have to set another theme as active for your website. More instructions on the process of installing and activating a theme are available in the How to install a WordPress theme? section of this article.

Note: We recommend that you delete any themes which you do not plan to use as third parties may be able to exploit vulnerabilities of both enabled and disabled themes and plugins.

How to delete a WordPress theme?

If you need to delete a theme from your WordPress website, this can be achieved in one of three ways: through the WordPress Dashboard, using WP-CLI, or by deleting the theme's folder from your account. In general, you should not have more than two themes (three if you use a child theme) installed on the account at all times. Your main (and child) theme, and one default WordPress theme that will be used as a fallback option in case of issues with your main (and child) theme.

Deleting a theme through the WordPress Dashboard

To delete a theme with the WordPress Dashboard, you need to log in as an administrator to your WordPress website. After that, you should navigate to the Appearance > Themes section and click on the block of the theme that you wish to delete:

WordPress theme details

Click on the Delete button that will be visible in the box showing details about the theme:

Delete WordPress theme

A prompt will appear asking you to confirm your action. Click on the OK button, and the theme will be deleted.

Note: The active theme of a WordPress website cannot be deleted via the Dashboard.

Deleting a theme using WP-CLI

The deletion of themes takes just four steps when using WP-CLI:

  1. Enable SSH access for your account, and connect to it via SSH.

  2. Go to the directory of your WordPress installation. If WordPress is installed on your main domain, you will need to navigate to the ~/www/www directory of your account. You can do this with the following command:

    cd ~/www/www

  3. To delete all inactive (and non-parent) themes from your WordPress website, you can use the following WP-CLI command:

    wp theme delete --all
    If you wish to delete just a specific theme (e.g. a theme with slug unused_theme), execute this WP-CLI command:

    wp theme delete unused_theme
    You can find the slugs of the themes installed on your WordPress website with the following WP-CLI command:

    wp theme list

Note: WP-CLI can be used with the --force option to delete themes that cannot be deleted by default or for some other reason. Please use this option with care as you may potentially break your website with it.

Deleting a theme via the File Manager or FTP

Important: This method should be used only if you are very familiar with the WordPress directory/file structure. With this method, you can delete your active (or parent) theme which will result in downtime of your website. If you still wish to give this method a try, we recommend that you create a WordPress backup of your website beforehand via the hosting Control Panel > WordPress Manager as explained our Creating, downloading, and restoring from WordPress backups article.

To delete a theme via the hosting Control Panel > File Manager section or FTP, you have to delete the theme's directory from the /wp-content/themes directory of your WordPress website in the account. If WordPress is installed on the main domain of your account, you will find your themes in the ~/www/www/wp-content/themes directory. Navigate to that directory using the File Manager section or your FTP program, and delete the directory. Details on how to connect to your account via FTP are available in the Uploading files section of our online documentation.

How to use a child theme in WordPress?

A child theme in WordPress is essentially your own version of another (parent) theme. You can define and use custom elements like stylesheets, functions, and scripts in your child theme, but at the same time, the child theme will inherit the parent theme's look, feel, and functionality. The best thing about using a child theme is that all of its custom elements will remain intact if the parent theme is updated. If you were to make changes to the files of the parent (original) theme, they would be lost upon update.

Depending on the (parent) theme that you are using on your WordPress website, you should refer to its documentation for instructions on configuring a child theme.

By default, you can create a new child theme by simply creating a new directory for it using the hosting Control Panel > File Manager section or an FTP client. The recommended naming pattern for child themes is to have the slug/directory name of the parent theme (e.g. twentytwentythree) appended with the "-child" string (e.g. twentytwentythree-child). You should create the directory in the /wp-content/themes directory of your WordPress website in the account, so for a WordPress installation on the main domain of your account, you should create the directory at ~/www/www/wp-content/themes.

For the child theme to work correctly and be recognized by WordPress, you need to create a styles.css file in its directory (e.g. ~/www/www/wp-content/themes/twentytwentythree-child/styles.css) with the following content:

/*
Template: twentytwentyone
*/

The Template definition is required as it indicates the slug/directory name of the parent theme, but you may add other definitions as necessary. To get your theme to use the default stylesheet of the parent theme, you will need to use the enqueue technique. If you would like to learn more about it and child themes in general, we would recommend that you check the official WordPress Child Themes article.

After you are ready with the changes to your child theme, you have to activate it via the WordPress Dashboard or via WP-CLI.

How to secure a WordPress theme?

Free and commercial WordPress themes are generally secure. In case any vulnerability is found for a theme and reported in the WordPress community, the developers of the theme are informed, and it is up to them to release a new version of the theme where the vulnerability has been fixed. Commercial themes are usually less likely to get affected by such issues or exploits as their source code is not publicly available; however, that is not always the case.

When it comes to the security of a WordPress theme, be it free or commercial, there are two major factors:

1. Obtaining your WordPress theme from a legitimate source

You should always obtain WordPress themes from official vendors or reputable sources. If you are interested in using a free theme on your WordPress website, you should obtain it from the WordPress theme repository. Commercial themes should be purchased and downloaded ONLY from their vendor or official resellers.

There are many leaked or pirated versions of both free and commercial themes; however, they often come at a high cost - malware or malicious code injected in the core files of the theme. Of course, this allows the bad actors to access all your website data (including all files of your hosting account) and use your account to perform malicious activities (like attacking third-party websites or networks and sending spam messages).

2. Updating and maintaining your WordPress themes regularly

The best way to keep your WordPress installation and themes protected is to perform updates regularly. Newer versions usually offer security, stability, and performance improvements as well as new features. You can find how to update your themes in the How to update a WordPress theme?section of this article.

In general, you should have just one or two themes installed on the website. If you are using a default WordPress theme, you should keep only this theme installed on your website and remove all other themes. In case you use a non-default WordPress theme, you should keep the non-default and one default WordPress theme installed on your website. Having a default WordPress theme installed is recommended as it will be used as a fallback option if a major problem occurs with your active theme.