Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify for maximum performance.
MORE THAN A CACHING PLUGIN
WP-Optimize is trusted by more than 1 million WordPress website owners to boost performance and reduce page load times to improve your site’s user experiences and SERP rankings in Google.
It does this in four clever ways:
1. It caches your site
Caching is the process of storing a temporary HTML version of your site on the server so it can be retrieved more quickly for the user.
It’s a sure-fire way to ensure web pages load at lightning-fast speed. Turn it on in just one click.
2. It compresses images
Large images can really impact page speed load times. WP-Optimize makes it easy to identify and compress images to your preferred lossy / lossless settings in a couple of clicks.
3. It cleans the database
Your WordPress database stores everything that you need, plus some things that you don’t. WP-Optimize cleans and optimizes the database to speed up your site and save server resources.
4. It minifies
On top of its three main features, WP-Optimize Cache also has the more advanced minification feature.
Together with caching, minification dramatically improves performance and page speed load time.
Turn on caching in just one click:
WP-Optimize automatically and optimally configures itself for your WordPress site. Turn it on in one-click or refine its settings if you prefer.
More cache features:
Cache preloading: This feature emulates a visit to your site, meaning cached files are served straight away, speeding up your site from the very first visit.
GZIP Compression: When the server isn’t configured to do so, WP-Optimize delivers HTML, CSS and JS files to the user’s browser as smaller, compressed files, reducing the size of pages and style sheets by up to 90%!
Preload key requests: Recommended by Google to improve page speed times. Critical resources (things like font files) get loaded first, so the page loads much faster [Premium].
Use cache settings to:
Serve cached content to logged in users: Turn this on if content stays the same for logged in users (or turn on and exclude URLs where content does change e.g. my account areas).
Exclude content from cache: Exclude by URL, conditional tags, browser agent strings or list cookies that should prevent caching when set (advanced user settings).
Deliver device-specific cache: Serve separate cache files to desktop and mobile devices . This ensures that responsive features e.g. desktop and mobile menus are cached separately and served correctly.
User per role cache: Useful if your website delivers different content to different user roles. e.g. an e-commerce site that displays different content to resellers or consumers [Premium].
User specific cache: Serves separate cache files to individual users. Useful for websites with personalised content e.g. Learning management systems [Premium].
Cache purging permissions: Select which user roles are allowed to purge the cache e.g. admin only or perhaps a ‘teacher’ role in an LMS setting only [Premium].
Lossy or lossless compression options: Choose between maximum space saving, best image quality or somewhere in-between.
WebP conversion: Recommended by Google, WebP can achieve up to 34% smaller file sizes compared to JPEG and up to 26% compared to PNG.
Auto-compress: Check a box and every new image you upload will automatically be compressed to your preferred lossy / lossless settings.
Bulk compression: Compress every existing image on your site with the press of a button.
Restore original: Gone too far? Revert images back to their original in one click.
Retain EXIF image data: Check a box to retain EXIF image data during compression.
Lazy Load: Webpages load much faster by loading web parts gradually, when they’re needed vs simultaneous loading of everything, all at once [Premium].
Delete orphaned images: Identify and delete unused images from your WordPress website, saving disk space [Premium].
Delete unused image sizes: WordPress creates multiple sizes for every uploaded image causing the uploads folder to become bloated. Scan for image sizes not in use and remove them to save further disk space [Premium].
Cleans-up database tables, post revisions, auto draft posts, trashed posts, spam, trashed comments and more. Choose what to optimize or it’s one click to clean out the lot.
Schedule clean-ups: So you can set and forget. Choose from daily, weekly, fortnightly or monthly.
Flexible clean-up schedules: You may wish to optimize database tables more frequently than you remove unapproved comments (for example). Choose the specific time and day when tasks should run [Premium].
Retain a set number of weeks’ data during clean-ups: Just in case you need to retrieve something.
Back up before clean-ups: If you delete something you shouldn’t, restore it in a couple of clicks with UpdraftPlus.
Power tweak – Turbo boost for WooCommerce: Unique to WP-Optimize, this power tweak boosts performance by replacing a slow query in WooCommerce with two much more efficient queries. E-commerce sites transacting high numbers of orders stand to gain here [Premium].
Power tweak – Boost performance by indexing the postmeta table: This unique power tweak works by allowing the WordPress postmeta table to be indexed, improving performance [Premium].
Minify in just one click: Minifies HTML, JavaScript and CSS. Toggle on or off or customise each one under ‘settings’.
Customise minification: Minify only (removing unnecessary code e.g line breaks and white spacing) or minify and merge. Apply the same or different settings to HTML, CSS and JavaScript.
Asynchronous loading: Choose non-critical CSS and JavaScript files to load in the background and independently of other resources e.g. analytics or pixel scripts. Loading asynchronously eliminates render blocking and improves page speed.
Exclude files from being minified: Specify CSS and JavaScript files to exclude from minification.
Optimize fonts: Optimize Font Awesome and Google Fonts. Inline the font files, inherit from CSS settings or load CSS / Javascript asynchronously instead.
Preload assets: WP-Optimize visits each web page on your site so the code is minified and preloaded for real life users, right from their very first visit.
Preload key requests: Recommended by Google to improve page speed times. Critical resources (things like font files) get loaded first, so the page loads much faster.
WP-Optimize brings the best cache and optimization technology together into one single, seamless plugin to make your WordPress site fast, lean and efficient.
Our free version of WP-Optimize Cache is great, but we also have an even more powerful Premium version with extra features that offer the ultimate in freedom and flexibility:
Translators are welcome to contribute to the plugin. Please use the WordPress translation website.
There are 3 different ways to install WP-Optimize Cache, as with any other wordpress.org plugin.
We’ve built WP-Optimize Cache around the most advanced and powerful caching technology. Our caching tests and feedback from real-world users show that the caching feature alone can make your site faster than any other cache plugin or optimization. See these speed test results.
Yes; optimizing does not involve any “tricks” or poking around in dangerous ways. It involves running routine clean-up operations using well-defined, common MySQL commands. Nevertheless, we always recommend backups, which cover every possibility; not just database malfunctions, but hackers, human errors, etc. We recommend UpdraftPlus.
This is a “how long is string?” sort of question. It depends completely on your site – how big it is, how many users interact on it, how long it has been running, and when you last optimised it. However, the savings and speed-ups can be substantial; it is always worth making sure that your database is optimised.
In our support forum, here: https://wordpress.org/support/plugin/wp-optimize/
This is rare; it’s probably because you’re with a shared web hosting company that doesn’t allow scripts to run an optimize command via SQL statements (SQL “OPTIMIZE” instruction). Please consult your web hosting company on this matter.
Yes – WP-Optimize Cache is WordPress’s #1 most-installed optimisation plugin, with over 800,000 users and a pedigree going back over 8 years.
WP-Optimize will disable some features if it detects InnoDB tables. Optimization of the database tables on-disk is not available, but other clean up features would work.
Not unless you have an existing backup. Please ensure that you make a backup of your entire database before using WP-Optimize for the first time, and when you upgrade to a major new version of it. We recommend UpdraftPlus.
The plugin is an ongoing work; that means that it is impossible to rule out 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).
When WordPress uses a particular transient, that specific transient is re-created automatically. So, it’s normally for ones which are in active use to gradually re-appear. The best way to keep things optimal is to clear the transient options on a scheduled basis. For example, WordPress may create 50 transient option in a week. If you schedule WP-Optimize Cache to clear these options on a weekly basis, you’ll have far fewer building up.
Please check your database for corrupted tables. That can happen, usually your web hosting company can run the repair command on the db.
To use all features in the plugin, a minimum of version WordPress 4 with PHP 5.3 are required. But we do recommend to use the latest version of WordPress. Using PHP 7+ is also highly recommended, as our caching feature will work even faster.
This depends on your setup (theme, number and quality of plugins used, etc…), but generally, caching will make the biggest visible difference to your website’s performance. Indeed, the cache functionality bypasses most of WordPress code to serve your pre-optimised cached pages directly to your visitor, significantly increasing the speed.
“Caching”, from Wikipedia: “In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. A cache hit occurs when the requested data can be found in a cache, while a cache miss occurs when it cannot.” — WP-Optimize cache does this by saving the page computed by WordPress on the disk. When a user visits a page, WP-Optimize will serve the cached page before WordPress is loaded. If the page wasn’t cached before, it will be computed by WordPress, and WP-Optimize will then save the result to the cache.
You think your site is fast without caching? A caching plugin will make your website even faster. A faster cached website will increase SEO, it will improve your visitors experience. Caching will also save your server’s resources.
Yes, your Gutenberg pages will be cached, as well as those created with page builder plugins such as Elementor.
If cache is enabled, and in order to see if your page is cached, use the “View Source” function in your web browser to view the page source. To find caching information, scroll down to the bottom, and you should see a line added by the cache: <!-- Cached by WP Optimize - https://getwpo.com - Last modified: Sat, 20 Jul 2019 21:17:19 GMT ->
However, note that if you are using a further service that minifies HTML (e.g. Cloudflare), then this line may have been removed. Another method is to inspect the contents of the directory wpo-cache inside your wp-content directory. <a href=”https://getwpo.com/faqs/how-do-i-know-my-webpage-is-being-cached/>Further information can be read here
Also note that if you do not preload the cache, a page or post will have to be visited once for the cache file to be generated.
Go to WP-Optimize -> Cache and enable caching. For most people, that will be enough. If you run an e-commerce, have a custom login page or any page that has dynamic content, you might want to exclude certain urls from the cache. See Advanced caching options in our cache documentation to know more on excluding an URL from the cache.
Yes, caching with WP-Optimize Cache allows you to safely cache your products, with plugins like WooCommerce or Easy Digital Downloads, or any e-commerce that uses DONOTCACHEPAGE
to exclude sensitive pages from caching (e.g. my account, cart or checkout pages).
Yes, WP-Optimize works with popular multilingual plugins like WPML or Polylang. However, it’s important to note that when using WP-Optimize with multilingual plugins, the URL format for different languages should not include any query parameters, for example https://example.com/?lang=en
. Instead, it should be in a pretty permalink format, such as https://example.com/en
.
No, if WordPress works properly, WP-Optimize will be able to cache your pages and posts.
No, because both cache plugins would need to use the drop-in plugin advanced-cache.php
. If you turn off caching on WP-Optimize Cache, you can use any other caching plugin and still use the other features of WP-Optimize. But we do recommend using our caching solution.
Yes! No special cache configuration is needed. Page caching on the WP site (that done by WP-Optimize Cache) is independent of proxy caching (e.g. Cloudflare) – you can use both, or neither, and they will complement each other and not interfere.
Just one thing to note – Cloudflare will strip out the special HTML comment at the bottom of the source of a page that is helpful to confirm that page caching is working, so, don’t be confused by that – it’s absence doesn’t indicate the cache is not working.
Yes, you can trigger a cache purge action using WP-Optimize Cache public functions. If you want to clear the whole cache, use the function wpo_cache_flush()
. If you want to clear the cache files for a specific page or post, use WPO_Page_Cache::delete_single_post_cache($post_id);
. Those cache options are available after WP action plugins_loaded
.
Yes, when using WordPress’ commenting system, your users will still be able to post comments. Every time a comment is approved, the cache for that page or post will be cleared, allowing the next visitor to see an up to date list of comments.
Usually, a page is cached when a user visits it. So the first user visiting won’t be served a cached version of the page, and will wait longer than the next users. The cache preloading functionality will go through all your pages and posts, and simulate a visit by a user, allowing WP-Optimize to cache the pages before anyone visits them. Your first visitor will thus be served a cached version of the page, increasing its performance.
Choosing a frequency for the cache preloading schedule will depend on factors such as the frequency at which the website content is updated, the number of pages in the cache, the resources of the server and more.
For example a site with hundreds of pages will require more resources to preload its cache. So choosing a high frequency will mean that the cache will be recreated often, and the resource usage will be higher.
On a website where updates aren’t as frequent, you can even disable the cache preloading schedule, or set a high cache lifespan and set the cache preloading schedule to follow it.
Add /.+ to the cache option “URLs to exclude from cache” on the advanced settings tab.
To prevent a page from being cached, you can add the URL to the field “URLs to exclude from cache” in the cache “Advanced settings” tab. If you are developing a plugin and want to prevent a page from being cached, you can define the “DONOTCACHEPAGE” constant on the pages you need. Any request where “DONOTCACHEPAGE” is defined will not be cached.
Yes the caching feature is free. You will always be able to cache your website for free using WP-Optimize and we are constantly working on improving the existing cache feature. We will add more caching options to the free version and develop more specific caching options in the premium version to enable you to taylor the caching functionality to your needs.
The cached files are stored in the common “wp-content/cache” folder, inside a “wpo-cache” folder. Removing the “cache” folder will delete all of WP-Optimize’s cache, as well as those from other plugins.
Deleting the “cache” folder is generally safe, as those cached files will be regenerated.
Go to WP-Optimize settings > Cache and toggle the “Enable page caching” option to on/off.
No, caching will actually reduce the load on your server, by reducing the amount of PHP and mysql used. You might see a peak in resource usage when using the cache preloader, as this functionality will create the cache files for all your pages in a short amount of time. But once this is done, performance should increase and the load on your server will decrease. Every single major site uses caching to serve cached pages faster by using fewer resources.
The cached page is sent to the user before most of WordPress was loaded. The plugins aren’t loaded yet, making it impossible for them to change the cached content at every request.
So at the moment if you want to keep parts of your page dynamic (e.g. adverts, widgets, shopping cart…) AND keep it cached, you will have to use custom solutions using javascript and AJAX to fetch those dynamic parts from the server.
WP-Optimize Cache will remove the “WP_CACHE” constant from wp-config.php when you disable page caching, or when you deactivate the cache plugin. If you need to remove it manually, you can use FTP to edit wp-config.php and delete the line define (‘WP_CACHE’, true );
If page caching is still enabled in the settings, WP-Optimize Cache will attempt to add the line again, as it is required for the caching functionality to work.
WP-Optimize caching feature needs write access to the ‘wp-content/cache’ folder, as this is where the cache files will be stored. It also needs to define the constant ‘WP_CACHE’ in ‘wp-config.php’, it will need access once to ‘wp-content/advanced-cache.php’, as well as to the folder ‘wp-content/wpo-cache’ to write the cache settings.
If you need to change file permissions to enable caching, you can follow the instructions on this page https://wordpress.org/support/article/changing-file-permissions/
There is no limit to the number of pages you can cache. The only limit is the space on your server and the maximum number of subdirectories allowed by your server, as caching will write files in subdirectories following the permalink structure.
If you were to reach a caching limit, it probably means that your server is not fit for the size of your website and caching needs.
You can generate a separate cache by selecting “Generate separate files for mobile devices” in the page cache settings. This cache setting is only necessary if you use a specific theme for mobile devices, or for certain AMP plugins.
Yes, the cache feature works with Nginx. Should you want to enable browser caching or GZIP compression, you will have to do this yourself directly on the server settings.
Yes, the cache feature works with IIS. As with Nginx, if you need to enable browser caching or GZIP compression, you will have to do this yourself on the server.
No. It’s necessary to have pretty permalinks of the type http://xxxxx.com/my-post/ rather than http://xxxxx.com/?p=1234 for cache to work. Pretty permalinks are the WordPress default setting, and there is no good reason to turn them off, so you should not have a problem with this.
Note that cache will work with permalinks including /index.php/. It is only those based upon query parameters (?…) where cache won’t work.
No, WP dashboard pages are not cached. The cache functionality is only meant to cache frontend pages.
The cache lifespan is the time a cached file will be kept before being regenerated.
One of the main reason for setting a lifespan to your cache is that some plugins and themes use nonces, which are printed in the source code of the page (Read more about nonces here). These nonces cannot be reused and are valid for 12 hours by default (developers can change that value). The cache plugin will store the nonce in the page, and this one will become invalid after that perdiod of time, which can affect certain functionalities of your plugins and themes. Setting a cache lifespan to under 10 hours ensures the cache is flushed automatically before the nonce expires. This way you can use WP-Optimize’s cache feature on sites which use nonces.
An other reason is that you may want your pages to reflect some changes without having to clear the whole cache. Indeed if you have many pages and posts, you might not want to clear every cache file with every change, but rather set an interval at which they will expire and be regenerated.
A lower cache lifespan value will result in more frequent cache update activity on your server, and thus more preload processes, if activated.
If your site does not use nonces, and your site’s cache doesn’t need to be updated often, you can set the cache lifespan to a high value or to 0 to give it an infinite lifespan.
The cache lifespan option is set to 10 hours by default, but you may go down to 8 or even less.
If you notice any issues due to high server load, set a higher interval for the preloader.
Yes, the newly added Minify enables you to minify JavaScript and CSS. It also enables you to minify HTML.
WP-Optimize Cache’s Minify feature is all about increasing the speed of your WordPress site for your users.
One way Minify does this is by reducing the size of your HTML, CSS and JavaScript files by removing unnecessary spaces and lines from the files and shortening long names internally within the code.
Another way is that your files are merged into as few files as possible. This reduces the amount of load on your web server and can be quicker to load fewer files.
You can also defer the loading of any CSS or JavaScript file. This means any large or extraneous CSS or JavaScript file can be loaded independently from the core of your WordPress site; giving your users quicker access to your site.
Pressing the “Reset the minified files” does:
* delete the temporary files used when generating the minified assets
* delete old minified files (more than 30 days old)
* add a folder for the new minified files, which will be generated when visiting a page
The previously minified CSS files will remain on the server until they expire, or until they’re deleted using the button “Delete all the files generated by minify”.
Yes, the newly added minification feature (a.k.a. Minify) allows you to defer parsing of JavaScript and CSS.
Leveraging the font-display CSS feature is currently possible when using Google Fonts. The default parameter is “swap”, but can be changed using the WordPress filter “wpo_minify_gfont_display_type”.
This usually means one or more of your CSS files are incompatible with the minification or merging process. It can also be caused by errors in the CSS’s syntax.
You can check the CSS’s syntax by using an online CSS syntax checker such as csslint.net.
If your syntax is not causing the issue, or you cannot change the file with an issue, you can either exclude the problematic CSS files from the minification and merging process.
To exclude individual CSS files from the minification and merging process, you can go to WP-Optimize > Minify > CSS and go to the “Exclude the following CSS files from processing” section.
This usually means one or more of your JavaScript files are incompatible with the minification or merging process. It can also be caused by errors in the JavaScript’s syntax.
The first thing to try is to enable the setting “Contain each included file in its own block” in the JavaScript options (WP-Optimize > Minify > Javascript > JavaScript options). This could “catch” an error, and prevent the rest of the code to be broken.
If the first option didn’t work, try disabling merging of JavaScript files.
If none of the above works, disable processing of JavaScript files in the minify settings, and open a support thread with details about your issue. We’ll do our best to help you troubleshoot the issue.
wpo_force_webp_serve_using_altered_html
) for changing WebP serving methodlitespeed_finish_request()
function when attempting to close browser connection on LiteSpeed serversrobots.txt
matthiasmullie/minify
repository after confirming resolution of previous issuesVariation Swatches for WooCommerce
plugin settings get updatedPurge cache permissions
select2 boxuploads/.htaccess
file and remaining cron eventswp
prefixhtaccess-capability-tester
dependencyuploads/wpo
title
tag added by AIOSEOYITH Point of Sale for WooCommerce
pluginCustom Permalinks
pluginTypeError
when using CloudFlareinherit
Google fonts method is not working.htaccess
files don’t have write permissionmailin
plugin compatibilitycached-file-log.php
templateReset WebP serving method
button when there are no webp conversion toolsRestrict Content Pro
plugin slug to plugin.json
user meta
data upon run optimizationno-cache
headers when minify is enabled and page caching is not.htaccess
rules when gzip compression is not availablewebp-convert
librarywp_optimize
for smush scriptswpo_weekly_cron_tasks
cron job upon uninstallationinherit
in google fonts async loadingwp_update_nav_menu
is removed from wpo_purge_cache_hooks
arrayjson_decode
resultwp-optimize
entry in tables optimization listrepeater
and nested fieldsactionscheduler_
tablesgz
file generationcalc
function in single property valueinherit
and inline
settings work with Google fontstask
tables upon activation, if needed.wpo-plugins-tables-list.json
in robots.txtselect none
is clickeddomain.com/index.php/a-post-name
by creating a folder without the extensiondisplay=swap
parameter from the UI.