wp-optimize logo

Download WP-OptimizeLatest version hosted at WordPress Official Plugin Directory

Read the Major Update Review


I use WordPress solutions in a day to day basis. WordPress comes with a very extensible framework that allows you to add comprehensive and powerful functionality to your Blog system. WP-Optimize plugin is written to simplify your daily WordPress works simpler. WP-Optimize is a WordPress 3.5x database cleanup and optimization tool. It doesn’t need PhpMyAdmin to optimize your database tables. It allows you to remove post revisions, comments in the spam queue, un-approved comments, and many other junk within few clicks.

How this could help you?

  • Every time you save a new post or pages, WordPress creates a revision of that post or page. If you edit a post 6 times you might have 5 copy of that post as revisions. Imagine if your post or pages are long and big. It’s a huge number of bytes that is on your MySQL overhead. Now WP-Optimize allows you to optimize and shrink your posts table by removing not necessary post revisions from the database. As example, if you have a post which is approximately 100KB data and you have 5 revisions of that post, the total space wasted is about 500KB. And if you have 100 posts similar to it, you might have 50MB database space wasted.
  • Similar to the scenario described above, there might be thousands of spams and un-approved comments in your comments table, WP-Optimize can clean and remove those in a single click
  • WP-Optimize reports which database tables have overhead and wasted spaces also it allows you to shrink and get rid of those wasted spaces


  • Automatic optimization every week, bi-week or month
  • Settings selection for what to be optimize and clean automatically
  • Ability to preserve last X number of week’s data. Sometimes you might need to use recent post revisions but you might not need to use revisions before X number of weeks.
  • Remove the existing WordPress post revisions
  • Remove all the comments in the spam queue
  • Remove all the un-approved comments
  • Remove all junk  transient options from options table
  • Remove tracksbacks and pingbacks (if you really need them)
  • Remove items in trash, both for comments and posts.
  • Apply MySQL optimize commands on your database tables without phpMyAdmin.
  • Display Database table statistics.


  • Requires PHP 5.1.xx and MySQL 5.1.xxx
  • It Requires WordPress version 3.x and higher. Tested with 3.8beta
  • InnoDB Table formats not supported yet thus it would not optimize those table types


  • Unzip the archive into your hard drive.
  • Upload the folder to your wp-content/plugins folder on your web host.
  • Login to your dashboard and activate the plugin via activate option.
  • The menu item is – WP-Optimize ; can be found on your left side bar.


  • Select the WP-Optimize item under WP Admin.
  • Select the actions you want to perform.
  • Click on Process button.
  • Click on Settings to setup some options like what would you like to clean automatically on a period of time.

Screen Shots:

WP-Optimize - Optimizer Screen

WP-Optimize - Settings

WP-Optimize - table reports



Can you help me restore my database?

No I can’t. Please make a backup of your entire database before using this Plugin for the first time. Also backup your database when you upgrade to a MAJOR NEW version (for example – v0.9.8 to 1.5.5 ).

Everytime I clear transient options, it comes back automatically

WordPress automatically creates transient options. It is pretty difficult to completley get rid of it. This is why everytime you clean transient options, you will notice new transient options has been created. My best advice would be clear the transient options on a schedule. So, for example it may create 50 transient option in a week and you clear it weekly so the next 50 transient option comes in. Rather than having 100 transient option, you will have 50 per week.

Optimization does not have any effect on database / it is not optimizing the database

Some of the shared web hosting company does not allow scripts to run OPTIMIZE command via SQL statements. If you are hosted with these web hosts, the optimize action will not be able to optimize your database. Please consult your web hosting company regarding this matter.

I am having error – Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource …  

  • Upgrade/Update your WordPress to at least 3.5
  • Upgrade/Update your WP-Optimize plugin
  • Upgrade your PHP to at least 5.1.xx
  • Upgrade your MySql to at least MySql 5.1.xx
  • Remember: PHP 4.xx and MySql 4.xx not supported

Related Resources:

This is a primary version of the plugin so any feedback here would be highly appreciated. In addition to that you can post your feature/bugs or suggestions at WP Forum.

Did this plugin helped you out?

Would you like to donate an amount or just buy me a coffee?
WP-Optimize Donation