最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - How Do I Uninstall a Current WordPress Theme and Install a Fresh Theme

programmeradmin2浏览0评论

I own a site called explainz. The current theme is all messed up. I am considering installing a new theme. How do I actually go about it? Would it be sufficient if I just uninstalled the existing theme and installed the new theme from my dashboard? Is there anything else I need to do so that there are no previous theme remnants. By the way, I would be individually uninstalling certain plugins as well. Thanks!!

I own a site called explainz. The current theme is all messed up. I am considering installing a new theme. How do I actually go about it? Would it be sufficient if I just uninstalled the existing theme and installed the new theme from my dashboard? Is there anything else I need to do so that there are no previous theme remnants. By the way, I would be individually uninstalling certain plugins as well. Thanks!!

Share Improve this question asked May 17, 2017 at 4:50 Dominic FrancisDominic Francis 11 bronze badge
Add a comment  | 

3 Answers 3

Reset to default 1

You can install the new theme and preview how it would look before changing it. See https://en.support.wordpress/themes/#preview-themes for more info.

Once you have tested that it works, you can then activate the new theme. I would keep the old theme for a few weeks until you're confident that there is nothing else needed, then take a backup of old theme before deleting it.

I'd also review the current theme's functions.php file for any customised code that you may want to copy in to the new theme's functions.php file or write a plugin to make it compatible across all themes.

As a final note though in case not obvious - install the new theme first before deleting the current/active theme.

There is more ways to do it, like cpanel or ftp access, check out codex page https://codex.wordpress/Using_Themes

Themes are quite often depending on certain plugins, such as Custom Fields or Custom Post Type, to control and display the contents. If you install a different theme the chance is that it doesn't work the same way. Start inactivating modules one-by-one and see how/if the site works.

All theme files are located in the wp-content/themes-folder. If you remove it there should be no remnants, unless some bad practices are present:

  • Hacks have been made to the WP core files to suit the theme
  • Hacks have been made to the any plugin files to suit the theme
  • Files in the media library have been used in the theme

You could always use the theme live preview function to test new themes without actually going live with it.

发布评论

评论列表(0)

  1. 暂无评论
ok 不同模板 switch ($forum['model']) { /*case '0': include _include(APP_PATH . 'view/htm/read.htm'); break;*/ default: include _include(theme_load('read', $fid)); break; } } break; case '10': // 主题外链 / thread external link http_location(htmlspecialchars_decode(trim($thread['description']))); break; case '11': // 单页 / single page $attachlist = array(); $imagelist = array(); $thread['filelist'] = array(); $threadlist = NULL; $thread['files'] > 0 and list($attachlist, $imagelist, $thread['filelist']) = well_attach_find_by_tid($tid); $data = data_read_cache($tid); empty($data) and message(-1, lang('data_malformation')); $tidlist = $forum['threads'] ? page_find_by_fid($fid, $page, $pagesize) : NULL; if ($tidlist) { $tidarr = arrlist_values($tidlist, 'tid'); $threadlist = well_thread_find($tidarr, $pagesize); // 按之前tidlist排序 $threadlist = array2_sort_key($threadlist, $tidlist, 'tid'); } $allowpost = forum_access_user($fid, $gid, 'allowpost'); $allowupdate = forum_access_mod($fid, $gid, 'allowupdate'); $allowdelete = forum_access_mod($fid, $gid, 'allowdelete'); $access = array('allowpost' => $allowpost, 'allowupdate' => $allowupdate, 'allowdelete' => $allowdelete); $header['title'] = $thread['subject']; $header['mobile_link'] = $thread['url']; $header['keywords'] = $thread['keyword'] ? $thread['keyword'] : $thread['subject']; $header['description'] = $thread['description'] ? $thread['description'] : $thread['brief']; $_SESSION['fid'] = $fid; if ($ajax) { empty($conf['api_on']) and message(0, lang('closed')); $apilist['header'] = $header; $apilist['extra'] = $extra; $apilist['access'] = $access; $apilist['thread'] = well_thread_safe_info($thread); $apilist['thread_data'] = $data; $apilist['forum'] = $forum; $apilist['imagelist'] = $imagelist; $apilist['filelist'] = $thread['filelist']; $apilist['threadlist'] = $threadlist; message(0, $apilist); } else { include _include(theme_load('single_page', $fid)); } break; default: message(-1, lang('data_malformation')); break; } ?>