Title: wp_cache_incr
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_cache_incr( int|string $key, int $offset = 1, string $group ): int|false

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#wp--skip-link--target)

Increments numeric cache item’s value.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#see-also)󠁿

 * [WP_Object_Cache::incr()](https://developer.wordpress.org/reference/classes/WP_Object_Cache/incr/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#parameters)󠁿

 `$key`int|stringrequired

The key for the cache contents that should be incremented.

`$offset`intoptional

The amount by which to increment the item’s value.

Default:`1`

`$group`stringoptional

The group the key is in. Default empty.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#return)󠁿

 int|false The item’s new value on success, false on failure.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#source)󠁿

    ```php
    function wp_cache_incr( $key, $offset = 1, $group = '' ) {
    	global $wp_object_cache;

    	return $wp_object_cache->incr( $key, $offset, $group );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/cache.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/cache.php#L229)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/cache.php#L229-L233)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Object_Cache::incr()](https://developer.wordpress.org/reference/classes/wp_object_cache/incr/)`wp-includes/class-wp-object-cache.php` |

Increments numeric cache item’s value.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_cache_incr/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.3.0](https://developer.wordpress.org/reference/since/3.3.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_cache_incr%2F)
before being able to contribute a note or feedback.