If you are unable to optimize WordPress or do do not have the time then you can use a useful plugin called WP-Optimize That does it for you.
- Removes all unnecessary data (e.g. trashed/unapproved/spam comments, stale data) plus pingbacks, trackbacks and expired transient options
- Compact/de-fragment MySQL tables with a button-press
- Detailed control of which optimizations you wish to carry out
- Carries out automatic weekly (or otherwise) clean-ups
- Retains a set number of weeks’ data during clean-ups
- Performs optimizations without the need for running manual queries
- Show database statistics and potential savings
- Mobile friendly and easy-to-use
- Translated into several languages
- More planned!
WP-Optimize helps you to:
- Make space: When you edit a post or page on your website, WordPress automatically saves the new revision to the database. If you edit things a few times (and particularly if the post is long), your database soon gets clogged up with old revisions that just sit there, taking up valuable space. WP-Optimize removes these unnecessary post revisions, freeing up valuable Megabytes of data and increasing speed and efficiency. It also cleans up your comments table, removing all the spam and un-approved comments that have built up with a single click.
- Take control: WP-Optimize reports on exactly which of your database tables have overhead and wasted space, giving you the insight, control and power to keep your website neat, fast and efficient.
- Keep it clean: Once enabled, WP-Optimize can run an automatic clean-up on a schedule, keeping a selected number of weeks’ data, according to your specification.
When you use this plugin for the first time or just updated to major version, make a backup of your database (we recommend UpdraftPlus). Though none of the queries used are dangerous, it is always the best practice to make a database backup before altering your database.