Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Given that I can't access the dashboard/admin pages on my blog (that's a future question), and that I have shell access to my hosting server, can I find out the current version of WordPress from the command line?

I tried grepping for the string '@since' in all the php files in the top level directory for the blog, and the latest I can see is 2.5...

share|improve this question
Perhaps someone with enough reputation could re-tag this question? Thanks. –  dr-jan Sep 2 '10 at 10:55

3 Answers 3

up vote 13 down vote accepted

grep wp_version wp-includes/version.php

share|improve this answer
Thanks for your extremely speedy (and correct) answer :-) –  dr-jan Sep 2 '10 at 10:54

You can also just go to http://site.url/readme.html in a web browser. The readme file ships with every version of WordPress and displays the installed version number prominently at the top of the page.

Also, if you can view your site's front-end (I know you said you can't access the dashboard, so I'm just assuming your blog is public), you can "view source" to see the installed version number. There's a meta tag called generator that displays the current WordPress version:

<meta name="generator" content="WordPress 3.0.1" />

No need to use grep at all ...

share|improve this answer

I just want to add the batch version of this script, as I've spent quite a bit of time till I found this:

Use it to print all the versions of all your wordpress install within a folder.

find . -name 'version.php' -path '*wp-includes/*' -print -exec grep '$wp_version =' {} \; -exec echo '' \;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.