Title: Query for WordPress Version Number/ What Variable?
Last modified: August 19, 2016

---

# Query for WordPress Version Number/ What Variable?

 *  [harknell](https://wordpress.org/support/users/harknell/)
 * (@harknell)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/query-for-wordpress-version-number-what-variable/)
 * Hi everyone. Since we are seeing many changes to paths and other elements of 
   the Plugin structure I’d like to make my Plugins backwardly compatible with previous
   versions of WordPress. What I’m not sure of is how to do a query within WordPress
   to determine what version is running. Is there a Global variable that holds this
   info that I can check? Or a DB location that holds this? I haven’t seen it anywhere
   listed.
 * If there isn’t any of the above has anyone ever released code to do this an alternate
   way?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/query-for-wordpress-version-number-what-variable/#post-921998)
 * `<?php echo 'version is ' . $wp_version; ?>`
    `<?php echo 'database version is'.
   $wp_db_version; ?>`
 * Variables are in wp-includes/version.php
 *  [moose123](https://wordpress.org/support/users/moose123/)
 * (@moose123)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/query-for-wordpress-version-number-what-variable/#post-922360)
 * Thanks for this great tip. Strange, tho, I got this to write out the version:
 * `<?php echo 'version is ' . $wp_version; ?>`
 * …but not this:
 * `<?php echo 'version is ' . $wpmu_version; ?>`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Query for WordPress Version Number/ What Variable?’ is closed to new 
replies.

## Tags

 * [wordpress version](https://wordpress.org/support/topic-tag/wordpress-version/)

 * 2 replies
 * 3 participants
 * Last reply from: [moose123](https://wordpress.org/support/users/moose123/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/query-for-wordpress-version-number-what-variable/#post-922360)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
