Title: Page Optimize
Author: Automattic
Published: <strong>27. februar 2020</strong>
Last modified: 12. februar 2026

---

Søk gjennom innstikk

![](https://s.w.org/plugins/geopattern-icon/page-optimize.svg)

# Page Optimize

 Av [Automattic](https://profiles.wordpress.org/automattic/)

[Last ned](https://downloads.wordpress.org/plugin/page-optimize.0.6.2.zip)

 * [Detaljar](https://nn.wordpress.org/plugins/page-optimize/#description)
 * [Omtalar](https://nn.wordpress.org/plugins/page-optimize/#reviews)
 *  [Installasjon](https://nn.wordpress.org/plugins/page-optimize/#installation)
 * [Utvikling](https://nn.wordpress.org/plugins/page-optimize/#developers)

 [Hjelp](https://wordpress.org/support/plugin/page-optimize/)

## Skildring

This plugin supports a few features that may improve the performance of page loading
and rendering in the browser:

 * Concatenate CSS
 * Concatenate JavaScript
 * Execution timing of non-critical scripts
    - Note: Changing script execution timing can be risky and will not work well
      for all sites.

### Testing

To test features without enabling them for the entire site, you may append query
params to a WordPress post or page URL. For example, to test enabling JavaScript
concatenation for `https://example.com/blog/`, you can use the URL `https://example.
com/blog/?concat-js=1`.

Supported query params:

 * `concat-css` controls CSS concatenation. Values: `1` for ON and `0` for OFF.
 * `concat-js` controls JavaScript concatenation. Values: `1` for ON and `0` for
   OFF.
 * `load-mode-js` controls how non-critical JavaScript are loaded. Values: «defer»
   for [deferred](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer),«
   async» for [async loading](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-async),
   any other value indicates the feature should be disabled.

#### PHPUnit (Docker)

You can run the PHPUnit tests locally using Docker (no local MySQL required).

First time (or after changing DB credentials):

    ```
    docker compose down -v
    ```

Run tests:

    ```
    docker compose up --build --abort-on-container-exit --exit-code-from tests
    ```

Optional overrides (examples):

 * `WP_VERSION=6.5 docker compose up --build --abort-on-container-exit --exit-code-
   from tests`
 * `PHP_VERSION=7.4 docker compose up --build --abort-on-container-exit --exit-code-
   from tests`
 * `PHPUNIT_VERSION=9.6.20 docker compose up --build --abort-on-container-exit --
   exit-code-from tests`

## Installasjon

This plugin uses sensible defaults so it can operate without configuration, but 
there are a number of constants you may use for a custom configuration.

#### PAGE_OPTIMIZE_CACHE_DIR

Page Optimize caches concatenated scripts and styles by default, and this constant
controls where the cache files are stored. The default directory is `cache/page_optimize`
under your site’s `wp-content` folder.

To change the cache location, set this constant to the absolute filesystem path 
of that location.

To disable caching, set this constant to `false`. Please note that disabling Page
Optimize caching may negatively impact performance unless you are caching elsewhere.

#### PAGE_OPTIMIZE_CSS_MINIFY

Page Optimize has CSS Minification capabilities which are off by default.

If you’re using caching, and not minifying CSS elsewhere, it is recommended to enable
it by setting it to `true`.

## Omtalar

![](https://secure.gravatar.com/avatar/b69742623f906c1c4be0e003b168f189b9c5e87b201c36c058ed01f80090de36?
s=60&d=retro&r=g)

### 󠀁[Plugin’s Concatenate JavaScript Function Interferes with WP Visual Editor](https://wordpress.org/support/topic/plugins-concatenate-javascript-function-interferes-with-wp-visual-editor/)󠁿

 [wptester765467](https://profiles.wordpress.org/wptester765467/) 6. april 2024

When the plugin’s Concatenate JavaScript function is checked, it will interfere 
with WP’s visual editor. Rendering the visual editor invisible. Disabling this function
will enable you to use the WP Visual Editor again.

![](https://secure.gravatar.com/avatar/be7b55bbe8add3a195803d0ee663f15427ac67a7cf1709c2058210d2a762da9f?
s=60&d=retro&r=g)

### 󠀁[broke my js](https://wordpress.org/support/topic/broke-my-js/)󠁿

 [toomanyphils](https://profiles.wordpress.org/toomanyphils/) 22. februar 2024

self explanatory

![](https://secure.gravatar.com/avatar/c9448413d619904e44fda60614f4f206afc4e1574fee5146f174ed43cdc947c0?
s=60&d=retro&r=g)

### 󠀁[Simple and effective](https://wordpress.org/support/topic/simple-and-effective-1488/)󠁿

 [Mohamad Al Karbi](https://profiles.wordpress.org/mohamadkarbi/) 6. mai 2023

Without mentioning the need for CDN, Cache, …, Page Optimize (for aggregating CSS)
with Jetpack Boost (for deferring JS) gave me the best results for free. It does
the job in simple way. I summarize my experience with this plugin and similars on:
https://mohamadkarbi.com/why-i-host-with-wordpress/

![](https://secure.gravatar.com/avatar/fc03375e5385d5be76cc563439223b07a79765ff42da1479db05d06ab8c8d811?
s=60&d=retro&r=g)

### 󠀁[Not updated, don’t waste your time](https://wordpress.org/support/topic/not-updated-dont-waste-your-time/)󠁿

 [samsam57](https://profiles.wordpress.org/samsam57/) 11. august 2022 1 reply

Integrated w/ native wp installation, just unistall & go look for something else.

![](https://secure.gravatar.com/avatar/5c84b2c52bafbd12115fde25e13085f242b5ba1b563b6879ee7a2d6e2879b5e5?
s=60&d=retro&r=g)

### 󠀁[Bugs](https://wordpress.org/support/topic/bugs-113/)󠁿

 [mhogas](https://profiles.wordpress.org/mhogas/) 14. april 2021

Please add the code below in page_optimize_bail() . if( is_admin() ){ return true;}
if( class_exists('\Elementor\Plugin') && ( ( isset($_REQUEST['action']) && $_REQUEST['
action'] === 'elementor' ) || isset( $_REQUEST['elementor-preview'] ) ) ){ return
true; }

 [ Les alle 5 omtalar ](https://wordpress.org/support/plugin/page-optimize/reviews/)

## Bidragsytarar og utviklarar

“Page Optimize” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ Automattic ](https://profiles.wordpress.org/automattic/)
 *   [ Andrija Vučinić ](https://profiles.wordpress.org/aidvu/)
 *   [ Brad Jorsch ](https://profiles.wordpress.org/bjorsch/)
 *   [ Brandon Payton ](https://profiles.wordpress.org/bpayton/)
 *   [ mreishus ](https://profiles.wordpress.org/mreishus/)
 *   [ rcrdortiz ](https://profiles.wordpress.org/rcrdortiz/)

“Page Optimize” er omsett til 15 språk. Takk til [omsetjarane](https://translate.wordpress.org/projects/wp-plugins/page-optimize/contributors)
for bidraga deira.

[Omset “Page Optimize” til ditt eige språk.](https://translate.wordpress.org/projects/wp-plugins/page-optimize)

### Interested in development?

[Les kjeldekoden](https://plugins.trac.wordpress.org/browser/page-optimize/), sjekk
[SVN-lageret](https://plugins.svn.wordpress.org/page-optimize/) eller abonner på
[utviklingsloggen](https://plugins.trac.wordpress.org/log/page-optimize/) med [RSS](https://plugins.trac.wordpress.org/log/page-optimize/?limit=100&mode=stop_on_copy&format=rss).

## Endringslogg

#### 0.6.2

 * Fix: Harden CSS concat `@import` hoisting to preserve long Google Fonts-style
   URLs with semicolons and avoid false positives from `@import`-like substrings
   in rule bodies/URL paths.

#### 0.6.1

 * Fix: Skip JavaScript concatenation for scripts that request defer or async loading
   to preserve core loading behavior.
 * Fix: Skip JavaScript concatenation for module scripts (type=»module») and scripts
   whose tag is modified via the script_loader_tag filter (for example, plugins 
   that add module attributes), improving compatibility.

#### 0.6.0

 * Fix: Preserve stylesheet enqueue/document order when concatenating CSS. Concat-
   eligible styles are now emitted as sequential runs and split around non-concatenated
   items (e.g. external/excluded/dynamic URLs), media changes, RTL handling, and
   other boundaries.
 * Fix: Inline styles (wp_add_inline_style) now print immediately after their parent
   stylesheet, including when styles are concatenated.
 * Fix: Apply core’s style_loader_tag filter when a concatenation run contains only
   a single stylesheet (matching core behavior and the JS-side fix from 0.5.0).
 * Fix: The css_do_concat filter is now evaluated once per handle.
 * Fix: The concat service no longer drops @import directives due to a closure scoping
   bug. (@charset/@import handling now runs against the intended pre-output buffer.)
 * Fix: Stylesheets containing @import now start a new concat run so service-side
   @import hoisting cannot reorder imports ahead of earlier stylesheets.
 * Fix: Treat @import and @charset as case‑insensitive when building concatenated
   CSS, preventing missed rules in some stylesheets.

#### 0.5.8

 * Update Tested Up To Version to 6.9.

#### 0.5.7

 * Update Tested Up To Version to 6.8.

#### 0.5.6

 * Update Tested Up To version to 6.7.

#### 0.5.5

 * Fix: Stop skipping inline scripts when src is empty.

#### 0.5.4

 * Bail when editing pages or posts in the Editor. Increased the max concatenated
   file limit.

#### 0.5.1

 * Bail when editing pages in Brizy Editor (it errors when JavaScript load mode 
   is `async`).

#### 0.5.0

 * Apply the `script_loader_tag` filter for scripts that are concatenate-able but
   have no neighbors to concatenate with. This fixes a case where the TwentyTwenty
   theme wanted to apply a `defer` attribute to its script but was never given the
   opportunity.

#### 0.4.5, 0.4.6

 * Force absolute paths for CSS replacements.
 * Lower required PHP version to 7.0.

#### 0.4.4

 * Don’t queue the cache cleaning WP Cron job if we aren’t caching.
 * Cleanup cache if we turned caching off or directory changed.

#### 0.4.3

 * gzip in PHP slows stuff down a bit. Simply don’t do this. Any web server can 
   handle this better.
 * also remove the output buffering, no need for that anymore
 * CSS Minification can sometimes slow things down significantly. Add constant to
   enable/disable.

#### 0.4.2

 * Initial release. No changes yet. 🙂

## Om

 *  Version **0.6.2**
 *  Last updated **2 månader sidan**
 *  Active installations **200 000+**
 *  WordPress version ** 5.3 eller nyare **
 *  Tested up to **6.9.4**
 *  PHP version ** 7.4 eller nyare **
 *  Languages
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/page-optimize/), [Dutch](https://nl.wordpress.org/plugins/page-optimize/),
   [Dutch (Belgium)](https://nl-be.wordpress.org/plugins/page-optimize/), [English (US)](https://wordpress.org/plugins/page-optimize/),
   [Galician](https://gl.wordpress.org/plugins/page-optimize/), [Italian](https://it.wordpress.org/plugins/page-optimize/),
   [Japanese](https://ja.wordpress.org/plugins/page-optimize/), [Korean](https://ko.wordpress.org/plugins/page-optimize/),
   [Russian](https://ru.wordpress.org/plugins/page-optimize/), [Spanish (Chile)](https://cl.wordpress.org/plugins/page-optimize/),
   [Spanish (Colombia)](https://es-co.wordpress.org/plugins/page-optimize/), [Spanish (Ecuador)](https://es-ec.wordpress.org/plugins/page-optimize/),
   [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/page-optimize/), [Spanish (Spain)](https://es.wordpress.org/plugins/page-optimize/),
   [Spanish (Venezuela)](https://ve.wordpress.org/plugins/page-optimize/) og [Swedish](https://sv.wordpress.org/plugins/page-optimize/).
 *  [Omset til språket ditt](https://translate.wordpress.org/projects/wp-plugins/page-optimize)
 * Tag
 * [performance](https://nn.wordpress.org/plugins/tags/performance/)
 *  [Avansert vising](https://nn.wordpress.org/plugins/page-optimize/advanced/)

## Vurderingar

 3 out of 5 stars.

 *  [  2 5-star reviews     ](https://wordpress.org/support/plugin/page-optimize/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/page-optimize/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/page-optimize/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/page-optimize/reviews/?filter=2)
 *  [  2 1-star reviews     ](https://wordpress.org/support/plugin/page-optimize/reviews/?filter=1)

[Legg til vurderinga mi](https://wordpress.org/support/plugin/page-optimize/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/page-optimize/reviews/)

## Contributors

 *   [ Automattic ](https://profiles.wordpress.org/automattic/)
 *   [ Andrija Vučinić ](https://profiles.wordpress.org/aidvu/)
 *   [ Brad Jorsch ](https://profiles.wordpress.org/bjorsch/)
 *   [ Brandon Payton ](https://profiles.wordpress.org/bpayton/)
 *   [ mreishus ](https://profiles.wordpress.org/mreishus/)
 *   [ rcrdortiz ](https://profiles.wordpress.org/rcrdortiz/)

## Hjelp

Har du noko å seia? Treng du hjelp?

 [Sjå hjelpeforumet](https://wordpress.org/support/plugin/page-optimize/)