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
- Access your server via FTP (using programs like FileZilla).
- Navigate to the /wp-content/themes/ folder.
- Make sure the theme you want to activate is present in this folder.
- Open the wp-config.php file in the root of your WordPress installation.
- Add the following lines just before the comment
/* That's all, stop editing! Happy publishing. */
:Replace
theme-name
with the folder name of the theme (found in /wp-content/themes/). - Save the wp-config.php file.
Option 2: Using phpMyAdmin
- Log in to phpMyAdmin and select your website’s database.
- Find the wp_options table.
- Look for the rows with the option names template and stylesheet.
- Change the values of both rows to the folder name of the theme you want to activate.
- Save the changes.
Leave A Comment