current wordpress version code example

Example 1: get wsl version

wsl -l -v
# If version 2 is installed properly, you will see the version number. 
# If you don't see a version number, or if you see an error message 
# you have version 1

Example 2: find wordpress version in database

/* Make sure to consult the codex, as the db_version looks different from the wp version. */
/* https://codex.wordpress.org/WordPress_Versions */
SELECT * FROM `wp_options` where option_name = 'db_version'

Example 3: check wordpress version from file

Instead, search for “?ver=” and look under the “link rel=’stylesheet’” 
sections. You should see a line ending with “?ver=x.x.x”. The numbers are the 
WordPress version.

Example 4: How do I ge the version of wordpress?

echo bloginfo('version');