Speed & performance · Info
WP Optimize Plugin Settings Explained: What Each Option Does

Short answer
WP-Optimize settings cover database clean-up, page caching, CSS and JavaScript minification and image compression, each on its own screen. Back up first, run the low-risk database tasks, enable page caching and preload, then minify and defer scripts while testing pages after each change.
Key takeaways
- WP-Optimize combines database clean-up, caching, minify and image tools.
- Rows flagged in red can delete data you may want, so back up first.
- Keep a few weeks of recent data when cleaning revisions and comments.
- Use only one page cache plugin on a site.
- Defer scripts before trying to merge them.
- Purge caches and test key pages after each change.
What do WP-Optimize plugin settings control?
WP-Optimize settings control four jobs: cleaning the database, caching pages, minifying CSS and JavaScript, and compressing images, each on its own tab in the plugin dashboard.
After you install the free plugin from the WP-Optimize page on WordPress.org, a WP-Optimize menu appears in the admin sidebar. Each item in that menu opens a screen with its own sub-tabs.
The main screens are Database, Images, Cache, Minify and Settings. Some options, such as unused image detection and more advanced scheduling, are marked as Premium inside the plugin.
If you are not sure the plugin suits your site, read our review of whether WP-Optimize works first. The official WP-Optimize documentation also lists features by version.
What do the Database optimization options do?
The Database tab lists clean-up tasks, such as removing revisions, trashed posts, spam comments and expired transients, plus a task that optimizes or defragments your database tables.
Each row has a checkbox and a Run optimization button. You can run tasks one by one or tick several and press Run all selected optimizations.
| Option | What it removes or does | Risk level |
|---|---|---|
| Optimize database tables | Reclaims unused space in tables | Low |
| Clean all post revisions | Deletes saved revision copies | Medium, you lose undo history |
| Clean all auto-draft posts | Deletes automatic drafts | Low |
| Clean all trashed posts | Empties the post trash | Medium |
| Remove spam and trashed comments | Deletes junk comments | Low |
| Remove unapproved comments | Deletes pending comments | Medium |
| Remove expired transient options | Deletes stale cached values | Low |
| Remove pingbacks and trackbacks | Deletes old link notifications | Low |
| Clean post meta and comment meta | Removes orphaned meta rows | Medium |
| Clean orphaned relationship data | Removes term links to deleted items | Low |
Rows that need care are flagged in red inside the plugin. Always take a backup before running them, because database deletions cannot be undone.
Revisions are how WordPress lets you roll back a post. The WordPress documentation on revisions explains what you give up when you delete them.
Transients are temporary cached values that plugins store. The Transients API documentation explains why expired ones are usually safe to remove.
What does the Tables sub-tab show?
The Tables sub-tab lists every table in your database with its size, row count, overhead and the plugin that probably created it, so you can spot bloated or leftover tables.
Leftover tables from deleted plugins are a common source of waste. WP-Optimize may let you remove a table that it believes is no longer used, but check carefully before deleting anything.
If a table belongs to an active plugin, leave it alone. Deleting the wrong table can break that plugin or lose its data.
For a broader walkthrough, see our guide on how to optimize the WordPress database.
What are the database Settings options?
The database Settings sub-tab decides how much recent data to keep during clean-ups and whether clean-ups run on a schedule instead of only when you click the button.
Keep last X weeks of data protects recent revisions, comments and similar items. Setting it to two to four weeks is a sensible balance for most blogs.
Schedule clean-up runs your chosen tasks automatically. The free version offers basic schedules, while more detailed scheduling sits behind Premium, so check what your plan includes.
Scheduled tasks rely on WP-Cron, which only runs when the site gets visits. If clean-ups never seem to run, our guide to fixing WP-Cron explains the usual cause.
What do the Cache settings do?
The Cache screen turns on page caching, sets how long cached pages last, preloads the cache, and adds browser caching and compression headers for static files.
Enable page caching stores ready-made HTML pages so PHP and the database do less work. This is the setting with the biggest speed effect for most sites.
Generate separate files for mobile devices creates a mobile version of each cached page. Only use it if your theme serves different HTML to phones.
Serve cached pages to logged in users is usually off. Logged-in users often see personal content, so caching for them can show the wrong data.
Cache lifespan sets how long a cached page lives before it is rebuilt. A day is common for blogs; shops with changing stock may want less.
Preload builds cached pages in advance instead of waiting for a visitor. It can run on a schedule or after the cache is purged.
The Advanced settings area lets you exclude URLs, cookies and user agents from caching. Exclude cart, checkout and account pages on stores.
The Gzip compression and Static file headers sub-tabs add rules to your server so files are compressed and cached by browsers. If your host already handles this, the plugin will usually say so.
Do not run two page cache plugins together. If you already use a host cache or another caching plugin, keep only one.
What do the Minify settings do?
The Minify screen shrinks and combines CSS, JavaScript and HTML, can defer scripts, and offers font loading options to cut render-blocking requests.
The Status sub-tab has the main switch and a Purge the minified files button. Purge after every change.
On the JavaScript sub-tab, you can minify files, merge them, exclude troublesome scripts and choose how non-merged scripts load. Deferring scripts is usually safer than merging everything.
The CSS sub-tab offers similar options for stylesheets, plus inlining and exclusion lists. The Fonts sub-tab can combine Google Fonts and change the font-display behaviour.
The Settings sub-tab includes options such as minifying HTML and showing information about processed files. The Advanced sub-tab lets you exclude pages or files.
MDN's explanation of minification covers what these options do to your files. Our guide on how to defer JavaScript in WordPress explains loading choices in more depth.
What do the Images settings do?
The Images screen compresses images on your server or through a remote service, can convert them to WebP, and keeps backups of originals if you allow it.
Compression level usually offers lossless, lossy and custom choices. Lossy saves more space with a small quality loss.
Automatically compress newly-added images handles new uploads without manual work.
Backup original images keeps the uncompressed file so you can restore it. It uses extra disk space, so turn it off if storage is tight and you have full backups.
Create WebP versions of images produces modern format copies and serves them to supporting browsers.
Unused image detection and lazy loading may be listed as Premium features. For more detail on file formats, see our guide to optimising images for WordPress.
What is in the general Settings tab?
The general Settings tab covers plugin-wide options such as which user roles can use WP-Optimize, logging and reporting, and importing or exporting your configuration.
Logging lets you record clean-up results to a file, email or other destinations. It helps when you want proof that scheduled tasks ran.
Export your settings before major changes. That way you can restore the same setup on this site or copy it to another.
Which WP-Optimize settings should you start with?
Start with a backup, then enable page caching, run the low-risk database tasks, minify CSS and HTML, and defer JavaScript, testing your site after each step.
A cautious order:
- Back up files and database.
- Run optimize tables, auto-drafts, spam comments and expired transients.
- Turn on page caching with a sensible lifespan and preload.
- Turn on CSS and HTML minification, then defer JavaScript.
- Purge caches and test forms, menus, checkout and logged-out views.
If a page breaks, undo the last change first. Excluding one script is better than turning the whole Minify feature off.
You can ask questions on the WP-Optimize support forum if a setting behaves oddly on your host.
Frequently asked questions
Is it safe to clean post revisions with WP-Optimize?
It is safe for your live content, but you lose the ability to roll back older versions of posts and pages. Take a backup first and use the keep last weeks setting so recent revisions stay available in case you need to undo a recent edit.
Can I use WP-Optimize with another cache plugin?
You can use its database and image tools alongside another plugin, but do not run two page caches at once. Turn off WP-Optimize page caching if you already use a host cache or a different caching plugin, and avoid double minification.
Why are some WP-Optimize options locked?
Some features, such as unused image detection, more advanced scheduling and certain image options, belong to the Premium version. The free plugin still includes the core database clean-up, page cache, minify and image compression features.
How often should I run database optimization?
For most small and medium sites, a weekly or monthly clean-up is plenty. Busy stores and sites with heavy comment activity may benefit from weekly runs. Very frequent runs add little because there is not much new clutter to remove.
What should I do if minify breaks my site?
Purge the minified files, then undo the last option you changed. Check the browser console for the script that fails, add it to the exclusion list, and test again. Deferring scripts without merging them is usually the most stable setup.
Sources
- WP-Optimize WordPress.org Plugin Directory
- WP-Optimize documentation WP-Optimize
- Revisions WordPress.org Documentation
- Transients API WordPress Developer Resources
- Minification MDN Web Docs
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


