The easiest way to manage your wordpress themes is inside your WP admin. However, in some cases, this isn’t possible, in such situations the only way to change the theme is manually from the database.
Log into cPanel. Click on the phpMyAdmin icon in the database tools section.
In phpMyAdmin, in the left menu, select the name of the database your site uses.
Then click wp_options to open the options table.
Find the rows called template and stylesheet. They are usually located on page 2 in the options table.
Select Edit next to the template entry. Then replace the current theme by adding the new theme in option_value.
Then Select Edit next to the stylesheet entry. Do the same for stylesheet.