wordpress 如何從後台資料庫修改theme

來源:互聯網
上載者:User
============================================================博文原創,轉載請聲明出處電子咖啡(原id藍岩)============================================================我們在wordpress主題theme配置的時候,會從網站上下載比較流行的theme,使自己的blog看著很酷。也有不順利的時候,你下載的theme有bug或者下載包出問題了,安裝過後你的web頁面不能在訪問了。悲催,想通過web將theme改回去也不行。我們只能夠通過後台資料庫來手動修改theme了。方法如下:開啟phpMyAdmin,選擇對應的資料庫,在sql文字框中輸入一下查詢語句,我們就能得到當前的theme
SELECT *FROM wp_optionsWHERE option_name = 'template'OR option_name = 'stylesheet'OR option_name = 'current_theme';


結果如下:我們可以將對應的欄位修改為我們的theme,系統內建的有 ‘classic’ 和‘default’.你可以選擇其一,這裡有兩種方法,第一,我們可以點擊左側編輯符號進行手動修改,第二,我們可以執行一下sql語句:

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

注意,你可能在最佳化的時候將系統內建的theme刪除了,所以我們設定的新theme需要和wp的theme下檔案名稱一致,

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.