WordPress技巧:自動修復、最佳化資料庫

經過長時間的使用,資料庫難免累積些無用的數據。你或許知道 phpMyAdmin 裡可以快速最佳化及修復(Repair)資料庫,但你可能不知道 WordPress 裡也有這項功能…。

是的,是大掃除的時候了。將你的 wp-config.php 開啟,並在裡頭加入一行:

define('WP_ALLOW_REPAIR',true);

儲存後以瀏覽器訪問 /wp-admin/maint/repair.php 路徑,就能使用 WordPress 修復及最佳化資料庫的程式。在使用後別忘了將 wp-config.php 復原以免發生安全性問題。

This entry was posted in WordPress技巧. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*

您可以使用這些 HTML 標籤與屬性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>