| 1 |
=== Optimize Database after Deleting Revisions === |
| 2 |
Contributors: CAGE Web Design | Rolf van Gelder |
| 3 |
Donate link: http://cagewebdev.com/index.php/donations-odb/ |
| 4 |
Plugin Name: Optimize Database after Deleting Revisions |
| 5 |
Plugin URI: http://cagewebdev.com/index.php/optimize-database-after-deleting-revisions-wordpress-plugin |
| 6 |
Tags: database, delete, revisions, optimize, post, posts, page, pages, clean, clean up, trash, spam, trashed, spammed, database size, scheduler, transients, unused tags, pingback, trackback |
| 7 |
Author URI: http://cagewebdev.com |
| 8 |
Author: CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands |
| 9 |
Requires at least: 2.8 |
| 10 |
Tested up to: 4.4 |
| 11 |
Stable tag: 4.0.1 |
| 12 |
Version: 4.0.1 |
| 13 |
License: GPLv2 or later |
| 14 |
|
| 15 |
== Description == |
| 16 |
|
| 17 |
This plugin is a 'One Click' WordPress Database Cleaner / Optimizer. |
| 18 |
|
| 19 |
= Main Features = |
| 20 |
* Deletes redundant revisions of posts and pages (you optionally can keep an 'x'-amount of the most recent revisions) |
| 21 |
* Deletes trashed posts, pages and comments (optional) |
| 22 |
* Deletes spammed comments (optional) |
| 23 |
* Deletes unused tags (optional) |
| 24 |
* Deletes 'expired transients' (optional) |
| 25 |
* Deletes 'pingbacks' and 'trackbacks' (optional) |
| 26 |
* Deletes 'orphan postmeta items' |
| 27 |
* Optimizes the database tables (optionally you can exclude certain tables from optimization) |
| 28 |
* Creates a log file of the optimizations (optional) |
| 29 |
* Optimization can be scheduled to automatically run once hourly, twice daily, once daily or once weekly at a specific time (optional) |
| 30 |
* 'Optimize DB (1 click)' link in the admin bar (optional) |
| 31 |
* 'Optimize Database' Icon in the admin menu (optional) |
| 32 |
* MULTISITE compatible: optimizes all sites in the network with one click |
| 33 |
|
| 34 |
= Settings = |
| 35 |
You can find the settings page in the WP Admin Panel » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings) |
| 36 |
|
| 37 |
= Starting the Optimization = |
| 38 |
You can start the Optimization in the WP Admin Panel » Optimize Database.<br /> |
| 39 |
Note: if you use the Scheduler the Optimization will run automatically!<br /> |
| 40 |
Note: you also can click the 'Optimize DB (1 click)' link in the admin bar (if enabled) |
| 41 |
|
| 42 |
= Multisite Support = |
| 43 |
* Install the plugin as Network Administrator (Network Admin » Plugins) |
| 44 |
* 'Network Activate' the plugin |
| 45 |
* The settings are the same for ALL sites in the network, so if you change a setting for one site, it will be used for all other sites. |
| 46 |
* If you run the plugin from any of the sites, it will cleanup ALL the sites in the network! |
| 47 |
|
| 48 |
= Supported languages = |
| 49 |
* Danish [da_DK] - translated by Alexander Leo-Hansen - http://alexanderleohansen.dk |
| 50 |
* Dutch [nl_NL] - translated by Rolf van Gelder, CAGE Web Design - http://cagewebdev.com |
| 51 |
* English [en_US] - translated by Rolf van Gelder, CAGE Web Design - http://cagewebdev.com |
| 52 |
* German [de_DE] - translated by the.mnbvcx |
| 53 |
* Italian [it_IT] - translated by Fabio Marzocca |
| 54 |
* Russian [ru_RU] - translated by Vadim Sokhin, PluginZone - http://pluginzone.ru |
| 55 |
* Serbian [sr_RS] - translated by Ogi Djuraskovic, FirstSiteGuide - http://firstsiteguide.com |
| 56 |
* Swedish [sv_SE] - translated by P.E. |
| 57 |
* Ukranian [uk_UA] - translated by Anna Goriacha, Coupofy - http://coupofy.com |
| 58 |
|
| 59 |
= Author = |
| 60 |
CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands - http://cagewebdev.com - http://rvg.cage.nl |
| 61 |
|
| 62 |
= Plugin URL = |
| 63 |
http://cagewebdev.com/index.php/optimize-database-after-deleting-revisions-wordpress-plugin |
| 64 |
|
| 65 |
= Download URL = |
| 66 |
http://wordpress.org/plugins/rvg-optimize-database/ |
| 67 |
|
| 68 |
= Disclaimer = |
| 69 |
NO WARRANTY, USE IT AT YOUR OWN RISK! |
| 70 |
|
| 71 |
= Plugins by CAGE Web Design | Rolf van Gelder = |
| 72 |
WordPress plugins created by CAGE Web Design | Rolf van Gelder<br /> |
| 73 |
http://cagewebdev.com/index.php/wordpress-plugins/ |
| 74 |
|
| 75 |
== Installation == |
| 76 |
|
| 77 |
= Single site = |
| 78 |
* Upload the Plugin to the `/wp-content/plugins/` directory |
| 79 |
* Activate the plugin in the WP Admin Panel » Plugins |
| 80 |
* Change the settings (if needed) in the WP Admin Panel » Settings » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings) |
| 81 |
|
| 82 |
= Multisite = |
| 83 |
* Install the plugin as Network Administrator (Network Admin » Plugins) |
| 84 |
* 'Network Activate' the plugin |
| 85 |
* The settings are the same for ALL sites in the network, so if you change a setting for one site, it will be used for all other sites. |
| 86 |
* If you run the plugin from any of the sites, it will cleanup ALL the sites in the network! |
| 87 |
|
| 88 |
== Changelog == |
| 89 |
= 4.0.1 [11/27/2015] = |
| 90 |
* NEW: New option: optimize InnoDB tables too |
| 91 |
* BUG FIX: Localization fixed for extra cron schedules |
| 92 |
* BUG FIX: De-activation issue on update fixed |
| 93 |
|
| 94 |
= 4.0 [11/22/2015] = |
| 95 |
* NEW: Total rewrite of the code (OO code) |
| 96 |
* CHANGE: Many changes and bug fixes |
| 97 |
|
| 98 |
= 3.5.1 [11/01/2015] = |
| 99 |
* BUG FIX: Views are skipped from the optimization |
| 100 |
|
| 101 |
= 3.5 [10/24/2015] = |
| 102 |
* CHANGE: Stylesheet is only loaded on required admin pages |
| 103 |
|
| 104 |
= 3.4.9 [10/23/2015] = |
| 105 |
* BUG FIX: Bug fixed for deleting unused tags |
| 106 |
|
| 107 |
= 3.4.8 [09/14/2015] = |
| 108 |
* BUG FIX: Bug fixed for deleting transients |
| 109 |
|
| 110 |
= 3.4.7 [08/30/2015] = |
| 111 |
* BUG FIX: Transients are now deleted using the delete_transient() / delete_site_transient() functions |
| 112 |
|
| 113 |
= 3.4.6 [06/21/2015] = |
| 114 |
* NEW: Danish translation (da_DK) added |
| 115 |
|
| 116 |
= 3.4.5 [06/07/2015] = |
| 117 |
* NEW: Russian translation (ru_RU) added |
| 118 |
|
| 119 |
= 3.4.4 [06/03/2015] = |
| 120 |
* NEW: German translation (de_DE) added |
| 121 |
|
| 122 |
= 3.4.3 [06/01/2015] = |
| 123 |
* NEW: Swedish translation (sv_SE) added |
| 124 |
|
| 125 |
= 3.4.2 [05/10/2015] = |
| 126 |
* BUG FIX: fixed a bug (options didn't get saved in old multisite installs) |
| 127 |
|
| 128 |
= 3.4.1 [04/26/2015] = |
| 129 |
* BUG FIX: fixed a bug for the excluded tables (didn't work anymore) |
| 130 |
|
| 131 |
= 3.4 [04/24/2015] = |
| 132 |
* NEW: Ukrainian translation (uk_UA) added |
| 133 |
* CHANGE: updates for Dutch and Italian translations |
| 134 |
* CHANGE: a new, fresh look! |
| 135 |
* CHANGE: a better way to show the EXCLUDED tables on the settings page |
| 136 |
|
| 137 |
= 3.3.1 [04/08/2015] = |
| 138 |
* BUG FIX: fixed a bug with the scheduler (it didn't clean everything) |
| 139 |
|
| 140 |
= 3.3 [03/27/2015] = |
| 141 |
* NEW: MULTISITE support added (second try ;-)) |
| 142 |
* CHANGE: various minor improvements |
| 143 |
* BUG FIX: sub-sites are accessible again (in the admin panel) |
| 144 |
|
| 145 |
= 3.2.1 [03/18/2015] = |
| 146 |
* CHANGE: due to problems, I removed the MULTISITE support again for now... Sorry about that! |
| 147 |
|
| 148 |
= 3.2 [03/18/2015] = |
| 149 |
* NEW: MULTISITE support added |
| 150 |
* CHANGE: various minor improvements |
| 151 |
|
| 152 |
= 3.1.4 [03/01/2015] = |
| 153 |
* NEW: italian language support [it_IT] added (thanks Fabio Marzocca!) |
| 154 |
* NEW: optimization timer |
| 155 |
* CHANGE: from now on InnoDB tables are skipped from optimization |
| 156 |
* CHANGE: various minor improvements |
| 157 |
* BUG FIX: removed strtolower while fetching database properties |
| 158 |
|
| 159 |
= 3.1.3 [02/21/2015] = |
| 160 |
* NEW: showing the icon in the admin menu is now configurable via the settings page |
| 161 |
|
| 162 |
= 3.1.2 [02/20/2015] = |
| 163 |
* BUG FIX: fixed the link to the settings page |
| 164 |
|
| 165 |
= 3.1.1 [02/20/2015] = |
| 166 |
* NEW: added plugin banners and icons |
| 167 |
* NEW: added a new admin menu item with icon ('Optimize Database') |
| 168 |
* CHANGE: moved the language files to the '/language' directory |
| 169 |
* CHANGE: moved the styles to the '/css' directory |
| 170 |
* CHANGE: credit removed from the front-end pages |
| 171 |
|
| 172 |
= 3.1 [01/29/2015] = |
| 173 |
* NEW: deletion of pingbacks and trackbacks (optional) |
| 174 |
* CHANGE: link to settings page in the main plugins page |
| 175 |
|
| 176 |
= 3.0 [12/28/2014] = |
| 177 |
* BUG FIX: tags only used in scheduled posts won't be deleted anymore (thanks Michael!) |
| 178 |
|
| 179 |
= 2.9 [10/22/2014] = |
| 180 |
* NEW: plugin has been fully localized |
| 181 |
* NEW: dutch language support [nl_NL] added |
| 182 |
* NEW: serbian language support [sr_RS] added |
| 183 |
|
| 184 |
= 2.8.3 [09/10/2014] = |
| 185 |
* CHANGE: using the WP jQuery libs now (not from googleapis anymore) |
| 186 |
* BUG FIX: check_admin_referer() fixed (gave a debug warning) |
| 187 |
|
| 188 |
= 2.8.2 [08/01/2014] = |
| 189 |
* BUG FIX: all problems with getting the table names should be fixed now! |
| 190 |
|
| 191 |
= 2.8.1 [07/31/2014] = |
| 192 |
* CHANGE: changed the 'edit_themes' capability back to 'administrator'-role |
| 193 |
* BUG FIX: no table names beside checkboxes (rewrote it, so it should work for every site now) |
| 194 |
|
| 195 |
= 2.8 [07/30/2014] = |
| 196 |
* CHANGE: 'administrator'-role changed to 'edit_themes'-capability |
| 197 |
* BUG FIX: no table names beside checkboxes |
| 198 |
|
| 199 |
= 2.7.9 [05/02/2014] = |
| 200 |
* BUG FIX: some minor bug fixes (thanks Mike!) |
| 201 |
|
| 202 |
= 2.7.8 [05/01/2014] = |
| 203 |
* CHANGE: replaced depreciated MySQL queries (from WP 3.9 / PHP 5.5) |
| 204 |
|
| 205 |
= 2.7.7 [02/16/2014] = |
| 206 |
* BUG FIX: made jQuery also https compatible |
| 207 |
|
| 208 |
= 2.7.6 [01/16/2014] = |
| 209 |
* BUG FIX: empty lines removed from output (gave problems with some RSS feeds) |
| 210 |
|
| 211 |
= 2.7.5 [12/13/2013] = |
| 212 |
* CHANGE: two queries optimized for better performance |
| 213 |
|
| 214 |
= 2.7.4 [12/11/2013] = |
| 215 |
* BUG FIX: added 'backticks' around the database name in a few queries |
| 216 |
|
| 217 |
= 2.7.3 [12/09/2013] = |
| 218 |
* BUG FIX: deleted some CR/LF's from the end of the plugin *sigh* |
| 219 |
|
| 220 |
= 2.7.2 [12/09/2013] = |
| 221 |
* BUG FIX: forgot to delete a debug item... oops! sorry! |
| 222 |
|
| 223 |
= 2.7.1 [12/09/2013] = |
| 224 |
* BUG FIX: query and depreciated item (mysql_list_tables) fixed |
| 225 |
|
| 226 |
= 2.7 [12/06/2013] = |
| 227 |
* NEW: deletion of expired transients (optional) |
| 228 |
|
| 229 |
= 2.6 [07/22/2013] = |
| 230 |
* NEW: deletion of unused tags (optional) |
| 231 |
|
| 232 |
= 2.5.1 [05/24/2013] = |
| 233 |
* BUG FIX: some short tags removed |
| 234 |
* CHANGE: schedule time is only relevant and therefore only shown for 'daily' and 'weekly' schedules |
| 235 |
* NEW: option to turn the '1-click' button in the admin bar on/off |
| 236 |
|
| 237 |
= 2.5 [05/24/2013] = |
| 238 |
* NEW: you can set a time (hour) for the scheduler to run (thanks to frekel) |
| 239 |
* NEW: '1-click run button' in the admin bar (thanks to JB ORSI) |
| 240 |
|
| 241 |
= 2.3.1 [05/03/2013] = |
| 242 |
* BUG FIX: fixed a problem with 'invalid header' (during installation) |
| 243 |
|
| 244 |
= 2.3 [04/26/2013] = |
| 245 |
* BUG FIX: fixed the 'Stealing Cron Schedules' issue |
| 246 |
|
| 247 |
= 2.2.9 [04/10/2013] = |
| 248 |
* BUG FIX: bug fix for the 'check all NON-WordPress tables' link |
| 249 |
|
| 250 |
= 2.2.8 [03/19/2013] = |
| 251 |
* BUG FIX: bug fix for deleting Post Orphans |
| 252 |
|
| 253 |
= 2.2.7 [03/18/2013] = |
| 254 |
* NEW: 'Orphan Post items' (like 'Auto Drafts') will be automatically deleted too now (thanks to: 0izys) |
| 255 |
|
| 256 |
= 2.2.6 [03/05/2013] = |
| 257 |
* Text change: 'logging on' changed to 'keep a log' (thanks to: Neil Parks) |
| 258 |
* NEW: number of orphans deleted now also shown in the log file |
| 259 |
* NEW: 'Go To Optimizer' button on settings page (thanks to: RonDsy) |
| 260 |
|
| 261 |
= 2.2.5 [02/20/2013] = |
| 262 |
* Bug fix: fixed an (innocent) PHP warning (in error.log) |
| 263 |
|
| 264 |
= 2.2.4 [02/12/2013] = |
| 265 |
* Bug fix: error corrected in readme.txt file |
| 266 |
|
| 267 |
= 2.2.3 [02/09/2013] = |
| 268 |
* Bug fix: fixed an (innocent) PHP warning (in error.log) |
| 269 |
|
| 270 |
= 2.2.2 [01/20/2013] = |
| 271 |
* Bug fix: deleting of postmeta orphans didn't work correctly |
| 272 |
|
| 273 |
= 2.2.1 [01/17/2013] = |
| 274 |
* Bug fix: fixed some debug warnings |
| 275 |
|
| 276 |
= 2.2 [01/11/2013] = |
| 277 |
* NEW: 'Orphan Postmeta items' will be automatically deleted |
| 278 |
* NEW: the possibility to exclude tables from Optimization (for instance for 'heavy traffic' tables) |
| 279 |
|
| 280 |
= 2.1 [01/04/2013] = |
| 281 |
* Bug fix: keeping a maximum number of revisions didn't work correctly |
| 282 |
|
| 283 |
= 2.0 [12/18/2012] = |
| 284 |
* NEW: Logging of the Optimizations (optional) |
| 285 |
* NEW: Scheduling Optimizations for Automatic Execution (optional) |
| 286 |
* Many other (technical and cosmetical) changes and improvements |
| 287 |
|
| 288 |
= 1.3.4 [12/14/2012] = |
| 289 |
* Changed the buttons for WP 3.5 |
| 290 |
|
| 291 |
= 1.3.3 [12/01/2012] = |
| 292 |
* Some layout changes |
| 293 |
|
| 294 |
= 1.3.2 [11/14/2012] = |
| 295 |
* Shows more information about the optimized tables + other minor changes |
| 296 |
|
| 297 |
= 1.3.1 [10/07/2012] = |
| 298 |
* Minor changes |
| 299 |
|
| 300 |
= 1.3 [10/06/2012] = |
| 301 |
* Extra button for starting optimization, shows savings (in bytes) now |
| 302 |
|
| 303 |
= 1.2 [10/03/2012] = |
| 304 |
* Major update: new options 'delete trash', 'delete spam', 'only optimize WordPress tables' |
| 305 |
|
| 306 |
= 1.1.9 [09/27/2012] = |
| 307 |
* Using a different method for retrieving database table names |
| 308 |
|
| 309 |
= 1.1.8 [09/08/2012] = |
| 310 |
* Another link fix |
| 311 |
|
| 312 |
= 1.1.7 [09/03/2012] = |
| 313 |
* Some textual and link fixes |
| 314 |
|
| 315 |
= 1.1.6 [09/01/2012] = |
| 316 |
* Fixed the link to the settings page |
| 317 |
|
| 318 |
= 1.1.3 [09/01/2012] = |
| 319 |
* Moved the 'Optimize DB Settings' item to Dashboard 'Settings' Menu and the 'Optimize Database' item to the Dashboard 'Tools' Menu. That makes more sense! |
| 320 |
|
| 321 |
= 1.1.2 [08/30/2012] = |
| 322 |
* Minor bug fix for the new option page |
| 323 |
|
| 324 |
= 1.1 [08/29/2012] = |
| 325 |
* Added: a new option page, in de plugins section, where you can define the maximum number of - most recent - revisions you want to keep per post or page |
| 326 |
|
| 327 |
= 1.0.5 [08/21/2012] = |
| 328 |
* Depreciated item ('has_cap') replaced, abandoned line of code removed |
| 329 |
|
| 330 |
= 1.0.4 [06/06/2012] = |
| 331 |
* Now also works with non short_open_tag's |
| 332 |
|
| 333 |
= 1.0.3 [12/15/2011] = |
| 334 |
* Some minor layout updates |
| 335 |
|
| 336 |
= 1.0.2 [12/02/2011] = |
| 337 |
* Some minor updates |
| 338 |
|
| 339 |
= 1.0.1 [11/24/2011] = |
| 340 |
* A few updates for the readme.txt file |
| 341 |
|
| 342 |
= 1.0 [11/22/2011] = |
| 343 |
* Initial release |
| 344 |
|
| 345 |
== Frequently Asked Questions == |
| 346 |
|
| 347 |
= How can I change the settings of this plugin? = |
| 348 |
* Change the settings in the WP Admin Panel » Settings » Optimize Database -or- via the WP Admin Panel » Optimize Database icon (depends on settings) |
| 349 |
|
| 350 |
= How do I run this plugin? = |
| 351 |
* WP Admin Panel » Optimize Database. Then click the 'Start Optimization'-button -or- via the WP Admin Panel » Optimize Database icon (depends on settings) |
| 352 |
* Click the 'Optimize DB (1 click)' link in the Admin Bar (if enabled) |
| 353 |
|
| 354 |
= Why do I see 'InnoDB table: skipped...'? = |
| 355 |
* That's because optimizing InnoDB tables is not really efficient, so change the table type to MyISAM to have them being optimized. |
| 356 |
* Update: if you want to optimize your InnoDB tables too, just check the 'Optimize InnoDB tables too' option on the settings page |
| 357 |
|
| 358 |
= I scheduled the optimization for 8pm but it runs at 6pm (my local time) = |
| 359 |
* The scheduler uses the local time of the web server which can differ from your own local time |
| 360 |
|