If you don’t have access to the WordPress admin panel, you can manually change the default theme using FTP or phpMyAdmin. Here are both options:

Option 1: Using FTP

  1. Access your server via FTP (using programs like FileZilla).
  2. Navigate to the /wp-content/themes/ folder.
  3. Make sure the theme you want to activate is present in this folder.
  4. Open the wp-config.php file in the root of your WordPress installation.
  5. Add the following lines just before the comment /* That's all, stop editing! Happy publishing. */:
    define('WP_DEFAULT_THEME', 'theme-name');

    Replace theme-name with the folder name of the theme (found in /wp-content/themes/).

  6. Save the wp-config.php file.

Option 2: Using phpMyAdmin

  1. Log in to phpMyAdmin and select your website’s database.
  2. Find the wp_options table.
  3. Look for the rows with the option names template and stylesheet.
  4. Change the values of both rows to the folder name of the theme you want to activate.
  5. Save the changes.