$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>How to change WordPress theme outside of admin? Can't access dashboard|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

How to change WordPress theme outside of admin? Can't access dashboard

matteradmin11PV0评论

I have extracted my theme via File Manager but it somehow crashed. I activated the theme and now I can not access my admin at /my-web/wp-admin/.

Is there another way to change my theme since I cannot access the admin?

Thanks.

I have extracted my theme via File Manager but it somehow crashed. I activated the theme and now I can not access my admin at /my-web/wp-admin/.

Is there another way to change my theme since I cannot access the admin?

Thanks.

Share Improve this question edited Jan 17, 2019 at 1:38 RiddleMeThis 3,8078 gold badges22 silver badges30 bronze badges asked Jan 16, 2019 at 19:46 S_DenniS_Denni 31 silver badge2 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

There are a couple things you can do.

Option 1 - FTP

Easiest would be to FTP into your site and change the name of the currently active theme. Your themes are located in \wp-content\themes\. Temporarily changing the name will disable the theme. This should give you back access to the admin.

Option 2 - Database / PhpMyAdmin

You can also change the theme through the database, mostly likely via PhpMyAdmin.

There are 3 option rows in wp-options that you need to change. Once you change these it will change your theme.

  • template – the “Theme Name” as defined in style.css
  • stylesheet – the actual name of your theme folder
  • current_theme - the actual name of your theme folder

FYI - You can run the following SQL to narrow down just those 3 rows

SELECT *
FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';
Post a comment

comment list (0)

  1. No comments so far