wordpress資料庫mysql 優化:使用WP-Optimize

WP-Optimize這個Plugin可以協助wordpress網站進行優化,例如以下:

Optimize database tables
Clean all post revisions
Clean all auto-draft posts
Clean all trashed posts
Remove spam and trashed comments

Remove unapproved comments
Remove expired transient options
Remove pingbacks
Remove trackbacks
Clean post meta data
Clean comment meta data
Clean orphaned relationship data

參考:

12+ Best WordPress Plugins to Cleanup and Optimize Database and Improve Performance

Fix High CPU Load In WordPress

wordpress:修改the_excerpt()函式的預設長度

要修改wordpress裡的the_excerpt()的預設長度,可以在functions.php裡面加入以下:

參考:

5 Easy Ways To Limit Post Excerpt Length In WordPress