getButterfly Logo getButterfly code wrangling since 2005

Lighthouse Documentation


As you install Lighthouse for the first time, you get a dashboard section (Settings -> Lighthouse) showing you a summary of your options and your system settings. You also get a list of optimisation presets.

By selecting certain options you can save page requests (prevent unused styles and scripts from loading) and database queries (prevent unused database queries from being performed, thus saving precious loading time). The list continues to show the total number of options you have selected, the total number of recommended options and several cache values, if you decide to enable them (otherwise they stay at zero).

If you are a complete WordPress beginner, I advise using a preset, then navigating through the options and see what each one does. If you can find your way around WordPress or if you’ve read stuff online, I advise you to check each option in the list below, enable them gradually and check the site’s performance. Note that some options will be effective after 5 to 10 minutes.

Also note that the last two settings tabs (Sweeper and Help) are available for advanced users only.

Lighthouse - Introduction

Keep reading below to see an overview of the available options.

Performance Settings

Zen mode

Zen mode
This option removes most of WordPress-related information, notifications, dashboard meta boxes, widgets, WordPress logos and version details. You can use this option for a white-label site.

Theme setup

Remove version parameter from scripts and stylesheets
This option removes version parameter from scripts and stylesheets URLs in order to help with browser caching.

Disable emojis and smilies
This option disables replacing special characters with emojis and smilies and stops the emoji scripts/styles loading saving several requests and queries. This option also disables all content parsing (clickable links, smilie conversion, bbCode conversion and other WordPress-specific parsing).

Disable canonical URL redirection
This option disables URL redirection when page is not found. By default, WordPress redirects a non-existent page to the closest permalink it finds.

Disable author archive
This option disables author archives and helps with search engine indexation, duplicate content and security.

Scripts and styles setup

Move scripts to footer
This option tries to move all theme and plugin scripts to footer, provided they have been correctly enqueued using wp_enqueue_script(), helping with page speed and performance. Note that this option may break some themes and animation-heavy sites.

Remove jQuery Migrate
This option removes the jQuery Migrate script, which is only useful when using older themes and plugins, when depending on older scripts or when debugging.

Remove Jetpack devicepx script
This option removes the Jetpack devicepx script, which is only useful for Apple’s retina devices.

Remove script and style attributes, remove CSS classes from menus and page navigation
This option removes type="text/css", media="all", media="screen" and type="text/javascript" arguments, which are only required for obsolete, non-HTML5 code. This option helps minimise the source code and makes caching and compression more effective.

Normalize HTTP(S) scheme
This option forces the use of HTTP/HTTPS based on the active WordPress settings and is useful when switching from HTTP to HTTPS or to minimise mixed content warnings.

<head> setup

Clean up theme <head>
This option removes RSD, WLW references, WordPress generator tag and post shortlinks from the theme’s <head> section. It also removes WordPress-generated <rel> tags (search engines do not use them anymore). These details are not needed in 90% of the cases.

Hide RSS links
This option removes RSS links and prevents content copying and republishing.

System setup

Disable comment cookies
This option disables the user information – name, email and website – being saved in a browser cookie. This is usually done to have the details autocompleted in the comment form. Only check this option if you don’t have a comment-heavy site.

Disable core autoupdates
This option disables automatic WordPress updates (useful for managed and/or custom coded sites). Note that checking this option might leave your site vulnerable, as security updates should be applied automatically.

Disable plugin autoupdates
This option disables automatic plugin updates (useful for managed and/or custom coded sites).

Disable WordPress embeds
This option removes embed query vars, disables oEmbed discovery, completely removes the related scripts and disallows WordPress posts to be embedded on remote sites.

Database setup

Delete expired transients
This option regularly deletes expired transients (temporary data) from the database and improves performance on large sites.

Security Settings

Read the official WordPress guidelines for hardening and securing your site.

Basic security

Protect WordPress against malicious URL requests and bad HTTP(S) queries
This option blocks suspicious requests to your site (no referrer, no user agent or no physical browser).

Disable XML-RPC
This option disables remote access to your WordPress site (may cause issues with some plugins). Please reconsider the use of plugins which request XML-RPC access.

Advanced security (SSL only)

Enable HTTP Strict Transport Security (HSTS)
By adding the Strict Transport Security header to your site, you secure every visit from your visitors except for the initial visit. That still leaves your site vulnerable to MITM (man-in-the-middle) attacks for that initial visit, so there is a technique called “preloading” that will add your site to a pre-populated domain list. Once your site is on that list, the major browsers that support HSTS preloading will be notified that your site requires SSL, and every visit, even the very first one from a visitor, will automatically be forced through SSL. Read more.

Cache & Compression Settings

Browser caching and asset compression

Optimise HTTP(S) headers
This option activates cache control, ETag and 304 headers. It helps with browser caching and/or when there is no caching plugin available.

Merge and compress CSS/JS scripts
This option concatenates (combines) all correctly enqueued stylesheets and scripts (using wp_enqueue_script() or wp_enqueue_style()) and compresses them.

Cache Gravatars
This option caches Gravatars on your server instead of connecting to every page load. This option requires the file_get_contents() function available on your server.

Minify/compress HTML source code
This option removes all linefeeds and extra space characters from the HTML source code.

Theme Settings


Error reporting
This option displays PHP errors and warnings both on front-end and back-end for debugging purposes. Do not activate on live/production sites.

Scoring/ranking tweaks

Remove nofollow attribute value from comments
This option removes nofollow attribute from comment links and author link and allows search engines to follow and index them. Note that this might result in spam comments.

Theme tweaks

Disable HTML in WordPress comments
This option disables HTML code in WordPress comments. HTML is sometimes used for bold/italic text or links.

Remove Dashicons from front-end for non-administrators
This option removes the Dashicon font from front-end for non-administrators, if the theme doesn’t require Dashicons.

Remove comment reply script (if using a third-party comments plugin)
This option removes the reply script, usually enqueued in <head>, if the theme uses no comment replying or a third-party comments plugin (Disqus, Jetpack, etc).

Remove jQuery UI
This option removes the jQuery UI script from the front-end if, for any reason, the theme includes it and it’s not necessary.

Remove extra CSS that Recent Comments widget injects
This option removes some inline CSS added by the Recent Comments widget

Widget tweaks

Remove X widget (WP_Widget_X)
These options remove the respective widgets, making the Appearance -> Widgets section faster

Additional styles and additional scripts

These options add/enqueue the selected scripts and styles for development purposes or for easier access from inside the theme. They are updated with every version of the plugin and are always loaded from

Subscribe to getButterfly Blog

Once a week or so we send an email with our best content. We never bug you, we just send you our latest piece of content.