Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Official Plugin Repository for WP-Optimize
Failed to load latest commit information.
css adding updated files
languages language files updates
LICENSE.txt Updated Readme File - Removed extra lines
elegantthemes_sm.png Translation Updates
embedplus.png Preparation for release - phase 1
index.htm Fixed Problems related to wpMail, wpAdmin menubar. Fixed Permission i…
readme.txt compatibility update1
screenshot-1.jpg Major update to the plugin - raised to 1.8.x. A whole lot more code o…
screenshot-2.jpg Major update to the plugin - raised to 1.8.x. A whole lot more code o…
screenshot-3.jpg Major update to the plugin - raised to 1.8.x. A whole lot more code o…
screenshot-4.jpg adding updated files
screenshot-5.jpg adding updated files
translate.txt Version bump and delete stale language files
wp-optimize-admin.php A lot of code optimization. Added function to detect innoDB (was adde…
wp-optimize-common.php version update - email notifications, daily schedules
wp-optimize-credits.php language files updates
wp-optimize-main.php compatibility update 2
wp-optimize-settings.php compatibility update 2
wp-optimize-tables.php Fix typo problem all the occurrences supposed to be InnoDB
wp-optimize.php compatibility update1
wp-optimize.png Update on Logo - Optimized
wpo.png 1.1.0 Trunk Release


=== WP-Optimize ===
Contributors: ruhanirabin
Donate link:
Tags: comments, spam, optimize, database, revisions, users, posts, trash, schedule, automatic, clean, phpmyadmin, meta, postmeta, responsive, mobile
Requires at least: 4
Tested up to: 4.2
Stable tag:
License: GPLv2+
License URI:

Simple but effective plugin allows you to extensively clean up your WordPress database and optimize it without doing manual queries.

== Description ==

WP-Optimize is an extensive WordPress database cleanup and optimization tool. It doesn't require PhpMyAdmin to clean and optimize your database tables.

Please show your support for this plugin by giving it [a rating]( :)

Now hosted at [GitHub]( 

**I do not monitor wp forums, so use plugins(at) for support questions.**

Please join GitHub and collaborate.


*   Enable/Disable trackbacks for all published post
*   Enable/Disable comments for all published post
*   Removal of stale post revisions
*   Removal of stale unapproved and spam comments
*   Removal of trashed comments
*   Removal of akismet metadata from comments
*   Removal of other stale metadata from comments
*   Mobile device friendly, now you can optimize your site on the go
*   Removal of all trackbacks and pingbacks
*   Cleaning up auto draft posts
*   Removal of transient options
*   Clear out the post trash
*   Automatic cleanup of all the integrated options (also uses retention if enabled)
*   Ability to keep selected number of weeks data when cleaning up
*   Option to add or remove link on wp admin bar.
*   Enable/Disable weekly schedules of optimization
*   Apply native WordPress MySql optimize commands on your database tables without phpMyAdmin or any manual query.
*   Display Database table statistics. Shows how much space can be optimized and how much space has been cleared.
*   Enabled for Administrators only.
*   E-mail notifications on automatic cleanup

**All the potentially dangerous clean up options are marked RED.**

**When you use this plugin for the first time or just updated to major version, make a backup of your database. It is always the best practice to make a database backup before using this program first time.**

**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 is a huge number of bytes that's 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 have 50MB database space wasted.
*   Similar to the scenario described above, there might be thousands of spam 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
*   Automatically cleans database every week and respects the "Keeps selected number of weeks data" option.

**Are you interested to be a contributed developer of this plugin, join with me at GitHub. Or email plugins(at)**

You will be credited inside the plugin screen and the plugin listing at WordPress.


*   WordPress 3.8+
*   PHP 5.1.xx
*   MySql 5.1.xx

**Translators are welcome to send their Translated Files to be included.**
Existing translators should join [Translation Utility]( to submit their translations.

You must have an account in order to edit translation - [Get the free account here](

Once you get your account password in your email [Log in here to edit language](

**WP-Optimize Translators:**

*   Language de_DE: Rene Wolf -
*   Language fr_FR: Stéphane Benoit. -
*   Language sl_SI: Tomi Sambrailo -
*   Language ka_GE: Givi Tabatadze -
*   Language zh_CN: Maie -
*   Language es_ES: Navone Juan -
*   Language sk_SK: Martin Šturcel-
*   Language nl_NL: Mathias Bosman -
*   Language hu_HU: László Viktor -
*   Language lt_LT: Bronisav Ciuzelis -

** Some languages are removed from the above list, because translators did not update the languages for current version **
[See a list of currently editable available languages at](

== Installation ==

There are 3 different ways to install WP-Optimize.

= Using The WordPress Dashboard =

1. Navigate to the 'Add New' in the plugins dashboard
2. Search for 'WP-Optimize'
3. Click 'Install Now'
4. Activate the plugin on the Plugin dashboard

= Uploading in WordPress Dashboard =

1. Navigate to the 'Add New' in the plugins dashboard
2. Navigate to the 'Upload' area
3. Select `` from your computer
4. Click 'Install Now'
5. Activate the plugin in the Plugin dashboard

= Using FTP =

1. Download ``
2. Extract the `WP-Optimize` directory to your computer
3. Upload the `WP-Optimize` directory to the `/wp-content/plugins/` directory
4. Activate the plugin in the Plugin dashboard

== Frequently Asked Questions ==

= Does WP-Optimize Supports InnoDB Format =
InnoDB Table formats not supported. WP-Optimize will disable some features if it detects InnoDB table format. Optimization of the database will not work but other clean up features would work.

= 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 ).

= Is there any bug in this plugin =
The plugin is a development on the go - that means there are unforeseen situations and bugs. So I would recommend you to test it out on your local system or make a backup of your database (just to be extra careful).

= Every time I clear transient options, it comes back automatically =
WordPress automatically creates transient options. It is pretty difficult to completely 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.8
*   Upgrade/Update your WP-Optimize plugin
*   Upgrade your PHP to at least 5.5.xx
*   Upgrade your MySql to at least MySql 5.1.xx

= Table size shows wrong / Not optimizing  =
Please check your database for corrupted tables. That can happen, usually your web hosting company can run the repair command on the db.

== Screenshots ==

1. Optimizer Screen
2. Settings Screen
3. Table Report
4. Mobile View Top (Actual screen from Galaxy Note 3)
5. Mobile View Bottom (Actual screen from Galaxy Note 3)

== Changelog ==

= =
* Compatibility update.
* Language files update.

= =
* Security Patch - Update your plugin.
* Security Patch provided by Dion at and Security report provided by .
* Language files update

= =
* Daily Schedule Option Added
* Email notification on automatic optimization, default email is admin email address. You can change this in settings

= =
* BUGFIX for Settings screen
* Enable/Disable trackbacks / comments buttons removal and use select box instead. Extra button caused the Auto Scheduler to get into reset mode.

= =
* There were few number formatting problem and detection of InnoDB table format. Charles Dee Rice solved the problems that I missed out. Thank you!
* Duplicate msg fixed
* Enable/Disable trackbacks for all published post
* Enable/Disable comments for all published post

= 1.8.9 =
* Language updates platform - see readme file for details.
* Mixed type tables optimization supported and in BETA
* Removal of akismet metadata from comments
* Removal of other stale metadata from comments
* InnoDB tables won't be optimized.
* Main screen user selection will be saved. Red items selection will not be saved
* Scheduled time display will be shown according to WordPress blog local time

= 1.8.6 =
* Language updates
* Fix issues with total gain number problem
* InnoDB tables detected and features disabled automatically, tables view will not show Overhead. Main view will not show space saved, or total gain.

= 1.8.5 =
* Version bump + modified translator names

= 1.8.4 =
* Problem with readme file changes

= 1.8.3 =
* Minor fixes

= 1.8.1 =
* A whole lot more code optimization
* Slick new interface
* Responsive mobile interface, supports running from iPhone/Android/Tablets
* Tables moved to independent tab
* Optimize faster
* GitHub updater support
* All translations updates will come in soon
* I do not monitor WP forums, support email at plugins(at)

= 1.7.4 =
* More Translation compatibility.
* Added MYSQL and PHP versions beside the Optimizer tab.

= 1.7.3 =
* Fixed Problems with wpMail.
* Fixed Problems with wpAdmin menubar.
* Fixed Permission issues on some site.
* wp-optimize.pot file is added to language directory, for the translators. That file is also linked at the info tab of the plugin.
* Russian and German translation updated.

= 1.7.2 =
* All MySQL statements re-factored into native WP database calls - necessary for future versions of MySQL and WordPress.
* Upgrade to match WordPress 3.9 changes.
* Additional 2 languages.
* Now postmeta cleanup is disabled from code - it will be updated soon with native WordPress postmeta cleaning options.

= 1.6.2 =
* 3 Translation update.

= 1.6.1 =
* Fixed - trashed Comments was not clearing out.
* 1 Translation update.

= 1.5.7 =
* 2 new Translations updates and 2 new languages added.

= 1.5.6 =
* "Unused Tags cleanup" option made a problem on some WordPress sites that it deletes empty categories. Since I am unable to replicate this problem. I am making this option disabled.
* Translations updates and 3 new languages added.
* Minor maintenance and fixes.

= 1.5.5 =
* Safe clean up options are selected by default, defaults are not by user preference for now (Optimizer Page).
* All the potentially dangerous clean up options are MARKED RED.
* Translations update for language - lv, de_DE, zh_TW, pt_BR, fa_IR, es_ES.
* New features explained - (read the blog post).

= 1.5.4 =
* More path related fixes for various warnings. Maintenance

= 1.5.2 =
* Fatar error fix, if it disabled your wp admin, please remove the wp-optimize directory and reinstall again.

= 1.5.1 =
* Option to add or remove link on wp admin bar (even enabled - it is visible to admin only).
* New admin interface.
* Settings to select items for automatic optimization.
* Removal of WordPress transient options.
* Removal of orphaned post meta tags.
* Removal of unused tags.
* 3 different schedule times added (weekly, bi-weekly and monthly).
* 3 language added - ru_RU, zh_CN, fr_FR (zh_TW and nl_NL coming soon).
* Code optimization and translation strings updated.
* Updated .PO file for translators.
* Integrated development log from TRAC

= 1.1.2 =
* removed persistent admin bar menu item
* Language ru_RU and zh_TW updated.

= 1.1.1 =
* Fix Fatal Error.

= 1.1.0 =
* Added WP-Optimize to admin menu bar on top. Always accessible.
* Added wp-optimize.pot file for translators (inside ./languages/ folder).
* Last auto optimization timestamp / display
* Fix possible scheduler bug as requested at support forum
* Fix some other codes regarding SQL query parameters
* Ability to keep last X weeks of data, any junk data before that period will be deleted - this option affects both Auto and Manual process. Appreciate time and help from Mikel King ( about this matter.

= 1.0.1 =
* Removed auto cleanup of trackbacks or pingbacks.. it's better for people to do it manually.

= 0.9.8-beta =
* added beta tag

= 0.9.8 =
* Remove all trackbacks and pingbacks (can significantly reduce db size)
* Remove all Trash Comments and Posts
* Enable/Disable weekly schedules of optimization. This is an EXPERIMENTAL feature. It may or may not work on all servers.

= 0.9.4 =
* Non Initialized variables fixes as of

= 0.9.3 =
* Removed security tools.
* Full database size displayed

= 0.9.2 =
* Now the plugin is visible to site administrators only. Authors, Contributors, Editors won't be able to see it.

= 0.9.1 =
* Fixed problem with database names containing "-" .
* NEW Main Level Menu Item added for WP-Optimize, You might need to scroll down to see it
* Compatibilty with WordPress 3.1
* Added few translations
* Added auto draft post removal feature

= 0.8.0 =
* Added Multilanguage capability
* Added translation WP-OPTIMIZE.POT file
* Farsi Translation included now (Thanks to Ali irani)

= 0.7.1 =
* POST META Table cleanup code removed cause it is making problems with many hosts

= 0.7 =
* Added cleanup of POST META Table along with the revisions
* Fixed some minor PHP tags which causes the total numbers to disappear
* Now requires MySQL 5.1.x and PHP 5.1.x

= =
* Fix Interface
Something went wrong with that request. Please try again.