Title: Dynamic Asset Versioning
Author: Steve Grunwell
Published: <strong>December 12, 2016</strong>
Last modified: December 14, 2016

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/dynamic-asset-versioning.svg)

# Dynamic Asset Versioning

 By [Steve Grunwell](https://profiles.wordpress.org/stevegrunwell/)

[Download](https://downloads.wordpress.org/plugin/dynamic-asset-versioning.0.2.0.zip)

 * [Details](https://wordpress.org/plugins/dynamic-asset-versioning/#description)
 * [Reviews](https://wordpress.org/plugins/dynamic-asset-versioning/#reviews)
 *  [Installation](https://wordpress.org/plugins/dynamic-asset-versioning/#installation)
 * [Development](https://wordpress.org/plugins/dynamic-asset-versioning/#developers)

 [Support](https://wordpress.org/support/plugin/dynamic-asset-versioning/)

## Description

WordPress asset versioning can be a double-edged sword: on one-hand, it’s extremely
effective for cache-busting, ensuring you aren’t sharing stale scripts or styles
to your visitors. On the other hand, having to manually increment a version number
is a pain (even [as a constant](https://10up.github.io/Engineering-Best-Practices/php/#asset-versioning)),
often resulting in a version control history full of “bumping the version number”
commits.

Dynamic Asset Versioning aims to simplify this process: if an enqueued asset doesn’t
have an explicit version number, the plugin will get the timestamp of the last time
the file was changed and use that as the version number. It’s easy: you touch the
file, the version number is updated automatically.

#### Usage

Once Dynamic Asset Versioning is active, it will automatically determine version
numbers based on file modification time for any [non-core] files that have been 
enqueued using [`wp_enqueue_style()`](https://developer.wordpress.org/reference/functions/wp_enqueue_style/)
or [`wp_enqueue_script()`](https://developer.wordpress.org/reference/functions/wp_enqueue_style/).

**Example**

    ```
    wp_enqueue_style(
        'my-theme-styles',
        get_template_directory_uri() . '/assets/css/my-styles.css',
        array( 'some-other-styles' ),
        false, // Don't worry about it, Dynamic Asset Versioning has you covered!
        'screen'
    );
    ```

#### Special thanks

A special thanks goes out to [10up](http://10up.com), who helped inspire the original
concept of this plugin.

## Installation

There are two ways to install Dynamic Asset Versioning in your WordPress site: as
a must-use (MU) or a standard plugin.

#### As a must-use (MU) plugin (recommended)

 1. Download or clone the repository into `wp-content/mu-plugins`.
 2. As MU plugins cannot run in a sub-directory, move dynamic-asset-versioning.php 
    directly into the `wp-content/mu-plugins` directory.
 3.  * Alternately, [you may prefer to create a symbolic link (“symlink”) in wp-content/mu-plugins](https://stevegrunwell.com/blog/symlink-wordpress-mu-plugin/)
       that points to dynamic-asset-versioning.php.

#### As a standard WordPress plugin

 1. Download or clone the repository into `wp-content/plugins`.
 2. Activate the plugin through the WordPress plugins screen.

## Reviews

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

### 󠀁[Amazing](https://wordpress.org/support/topic/amazing-1568/)󠁿

 [Deepak Khokhar](https://profiles.wordpress.org/deepakkite/) September 26, 2017

Exactly what I was looking for. Great stuff. Thanks guys

 [ Read all 1 review ](https://wordpress.org/support/plugin/dynamic-asset-versioning/reviews/)

## Contributors & Developers

“Dynamic Asset Versioning” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Steve Grunwell ](https://profiles.wordpress.org/stevegrunwell/)
 *   [ Growella ](https://profiles.wordpress.org/growella/)

[Translate “Dynamic Asset Versioning” into your language.](https://translate.wordpress.org/projects/wp-plugins/dynamic-asset-versioning)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/dynamic-asset-versioning/),
check out the [SVN repository](https://plugins.svn.wordpress.org/dynamic-asset-versioning/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/dynamic-asset-versioning/)
by [RSS](https://plugins.trac.wordpress.org/log/dynamic-asset-versioning/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.1.0

Initial public release.

## Meta

 *  Version **0.1.0**
 *  Last updated **9 years ago**
 *  Active installations **30+**
 *  WordPress version ** 4.7 or higher **
 *  Tested up to **4.7.33**
 * Tags
 * [assets](https://wordpress.org/plugins/tags/assets/)[cache](https://wordpress.org/plugins/tags/cache/)
   [versioning](https://wordpress.org/plugins/tags/versioning/)
 *  [Advanced View](https://wordpress.org/plugins/dynamic-asset-versioning/advanced/)

## Ratings

 5 out of 5 stars.

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

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

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

## Contributors

 *   [ Steve Grunwell ](https://profiles.wordpress.org/stevegrunwell/)
 *   [ Growella ](https://profiles.wordpress.org/growella/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/dynamic-asset-versioning/)