Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


change_wordpress_theme_using_phpmyadmin

How to change WordPress theme using phpMyAdmin

If you have activated a different theme or experimental child theme (instead of first “previewing” it), and your website went down or it is throwing errors and won't permit you to login to the Admin dashboard with administrative credentials, you should still be able to change the current theme through phpMyAdmin. You may want to merely revert to the prior activated theme that was working before you activated a different troublesome theme.

Go to your phpMyadmin in your web browser and log into your website's database with the username and password credentials that has/have permissions to access your MySQL or Maria database for you website. Your database credentials can be found in the file “config.php” located in your website's root directory. On a Windows Server, use NotePad++ app to open and view the config.php file.

After logging into your database with PhpMyAdmin, select your particular website database table-set (having all the content tables) in the left panel (Hint: not the schema table set).

In phpMyAdmin right window, select the “wp_options” table in order to open wp_options table (Hint: select the text, not the checkbox) and next find the “template” row (record) and the “stylesheet” row (record). These records may not be found on the first page of the wp_options table that you are viewing in PhpMyAdmin. So, you may need to scroll down or move to the next page to find the “template” and “stylesheet” data. These rows (records) will contain your current theme name. Hint: Use the > to go to the next page on screen to locate and edit the “template” and “stylesheet” records.

In each record, to change the theme to one that should be working, just edit and change the theme name (data) in the “template” record and also change the theme name in the stylesheet record to be exactly the same as the name of sub-directory of your chosen theme in your website. For example – twentytwentytwo

Note that the theme subdirectory and file contents of your chosen theme must already be installed in your content/themes/ subdirectory.

That should be it! Clear the cache in your web browser and try accessing your website from your browser. Hope this worked for you.

change_wordpress_theme_using_phpmyadmin.txt · Last modified: 2024/07/27 15:15 by wikiadmin