0

When I switched to using a blank theme, the WordPress dashboard disappeared.

To re-activate the previous theme I was using (which did have dashboard support), I reset the values of template, stylesheet and current_theme fields in the wp_options table to the previous theme (by manually entering the theme name). However, this failed to restore the dashboard. I did restart both the MySQL database and the Apache web server. I am using the Bitnami WAMP stack.

How can I manually activate my previous theme without browser access to dashboard?

2

In your current theme, you can use switch_theme('stylesheet') in the index.php of your theme folder.No need to make changes in the database :)

<?php
 switch_theme('twentyfifteen');//Specify the name of stylesheet of intended theme
 exit;
 //Rest of the code
?>

You can remove the code after use

0

At the server, can you delete (or download and delete) the current non-working theme? The other one (if it's the only other one) should be activated as the next option.

Otherwise download and delete all themes but use some theme (any theme!) that gives you dashboard access.

Then upload a zipped version of your good downloaded theme as a new theme, and activate it.

0

Are you sure that you've entered the correct name? For template you need to usually use the folder name (template name).

UPDATE wp_options SET option_value = 'twentysixteen' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'twentysixteen' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'twentysixteen' WHERE option_name = 'current_theme';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.