Title: Resource Versioning
Author: Viktor Szépe
Published: <strong>Agẹmọ  15, 2015</strong>
Last modified: Agẹmọ  21, 2018

---

Ṣàwárí àwọn plugin

![](https://ps.w.org/resource-versioning/assets/banner-772x250.png?rev=1199655)

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://ps.w.org/resource-versioning/assets/icon-256x256.png?rev=1199655)

# Resource Versioning

 Láti ọwọ́ [Viktor Szépe](https://profiles.wordpress.org/szepeviktor/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/resource-versioning.0.3.0.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/resource-versioning/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/resource-versioning/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/resource-versioning/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/resource-versioning/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/resource-versioning/)

## Àpèjúwe

“It’s important to make resources (images, scripts, stylesheets, etc.) cacheable.”

[Steve Souders](http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/)

It is much easier to use a CDN without Query String Parameters.
 This plugins alters
only local resources’ URL-s. The `ver` Query String Parameter will be inserted into
the filename.

For example `jquery.min.js?ver=1.10` becomes `jquery.min.110.js`.

To reverse this in the web server add this line to your nginx config:

    ```
    server {
        location ~ ^(.+)\.\d\d+\.(js|css|png|jpg|jpeg|gif|ico)$ {
            #try_files $uri $1.$2 /index.php?$args;
            try_files $uri $1.$2 =404;
        }
    }
    ```

Or to your Apache configuration or `.htaccess` file.

    ```
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)\.\d\d+\.(js|css|png|jpg|jpeg|gif|ico)$ $1.$2 [NC,L]
    ```

#### Testing the plugin before live usage

You can test the plugin by replacing the two `add_filter()` calls with this

    ```
    require_once( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );
    wp();
    echo o1_revving_src( $argv[1] ) . PHP_EOL;
    ```

Then start it from CLI: `php revving.php <TEST-URL>`

#### Links

Development of this plugin goes on on [GitHub](https://github.com/szepeviktor/resource-versioning).

## Ìgbéwọlẹ̀

This section describes how to install the plugin and get it working.

 1. Upload `revving.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

  How to remove all Query String Parameters from resources?

Poorly written plugins and themes may add unwanted Query String Parameters.
 For
example `?rev=4.10`.

To drop all these parameters copy this into your `wp-config.php`:

    ```
    define( 'O1_REMOVE_ALL_QARGS', true );
    ```

## Àwọn àgbéyẹ̀wò

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

### 󠀁[Perfect Cache Busting Method](https://wordpress.org/support/topic/perfect-cache-busting-method/)󠁿

 [mwmcw](https://profiles.wordpress.org/mwmcw/) Ọwẹ́wẹ̀ 6, 2017

Simple to install, does what it should do. Integrates perfectly well! Thank you 
very much, Viktor!

 [ Ka gbogbo àgbéyẹ̀wò 1 ](https://wordpress.org/support/plugin/resource-versioning/reviews/)

## Àwọn Olùkópa & Olùgbéejáde

“Resource Versioning” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe
ìkópa sí plugin yìí.

Àwọn Olùkópa

 *   [ Viktor Szépe ](https://profiles.wordpress.org/szepeviktor/)

[Túmọ̀ “Resource Versioning” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/resource-versioning)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/resource-versioning/),
ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/resource-versioning/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/resource-versioning/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/resource-versioning/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 0.3.0

 * Support cdn-ified URL-s without protocol schema.
 * More structured code.

#### 0.2.0

 * Strengthen stability.
 * Support cdn-ified URL-s.

#### 0.1.3

 * FIX: Use proper WordPress function for content URL.

#### 0.1.2

 * FIX: DonÌtumọ̀ Yorùbá: ’t run on admin.

#### 0.1.1

 * FIX: External URL detection.

#### 0.1.0

 * Initial relase without multisite support.

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **0.3.0**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 8 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **10+**
 *  Ẹ̀yà WordPress ** 4.0 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **4.9.29**
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/resource-versioning/)
 * Àwọn àmì
 * [Apache](https://yor.wordpress.org/plugins/tags/apache/)[file](https://yor.wordpress.org/plugins/tags/file/)
   [nginx](https://yor.wordpress.org/plugins/tags/nginx/)[resource](https://yor.wordpress.org/plugins/tags/resource/)
   [varnish](https://yor.wordpress.org/plugins/tags/varnish/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/resource-versioning/advanced/)

## Àwọn ìbò

 5 lára àwọn ìràwọ̀ 5.

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

[Your review](https://wordpress.org/support/plugin/resource-versioning/reviews/#new-post)

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

## Àwọn Olùkópa

 *   [ Viktor Szépe ](https://profiles.wordpress.org/szepeviktor/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/resource-versioning/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](https://szepe.net/wp-donate/)