A question we regularly receive from our clients is ‘What version of WordPress do you have?’ That’s because finding out your WordPress version is essential when you want to keep your WordPress site secure or when installing new themes or plugins.
Of course, there are those who simply want to find out whether they have the latest version of WordPress installed. In any case, finding out your WordPress version is rather simple. In this tutorial, we will show you 3 methods of checking which version of WordPress you are using.
Before we get started, a recommendation: do try to update WordPress from time to time to the latest version available. It not only opens up the opportunities to try out new themes and/or plugins, but also ensures that your WordPress security is on the latest standard. To learn how to update WordPress, check out this tutorial. Also, WordPress deliberately tries to hide version information as it can be used to exploit security loopholes by cyber attackers. So, if you can’t find out your WordPress version easily, there is a good reason for it.
So, with that out of the way, let’s get started with checking out which version of WordPress you have installed.
What you’ll need
Before starting this tutorial, you’ll need the following:
- Access to WordPress admin area or access to your hosting control panel
Option 1 – Checking WordPress Version in Admin area
First and most convenient method of checking out your WordPress version is through the admin dashboard. Simply log in to your WordPress dashboard, and go to the Updates section located in the left bar. Here, you will clearly see which version of WordPress you are rocking, and also the latest available WordPress version. If you find that you don’t have the latest version, make sure to back-up your site, before moving on with upgrading to the latest version.
Apart from the Updates page, you can also find out your WordPress version by scrolling down to any page of the admin area until you get to the footer. You should be able to see the text Thank you for creating with WordPress, and directly in front of it, the current version of WordPress. Note that this information is only available for WordPress version 4.1.5 and upwards. Mobile views are also not supported as of yet.
Option 2 – Checking WordPress version in Page Source
There is a possibility that you either can’t login to the admin area of WordPress or lack the necessary credentials for doing so. This means that you won’t be able to find out version information of WordPress using Option 1. But don’t worry – there is another method, albeit a less reliable one.
Usually, sites created using WordPress carry version information in an HTML meta tag. This tag is inserted by default into the site by the WordPress theme but can be disabled by site admin who is security-conscious. Still, it’s worth giving a shot if you don’t have access to the admin area.
To find WordPress version through the meta tag, simply open the website in your web browser. Now, right click anywhere on the site, and select the View Page Source option. This will open a new tab in your browser, containing the source HTML code of the page.
Now simply type CTRL + F or COMMAND + F if using a Mac. This will open the browser’s search tool. Type generator in the search field, and see if anything comes up. If the site admin hasn’t disabled the generator meta tag, you will see the tag like this:
As stated earlier, displaying your WordPress version for everyone to see like this is a grave security concern. If this is your own site, you should promptly disable this tag from showing up. If you can’t see this tag, it means that the theme you are using is already hiding it, which is a good thing in terms of keeping your site safe.
You can follow these steps to disable generator meta tag from showing up in your page source:
- Access your WordPress admin dashboard.
- Navigate to Appearance -> Editor.
- Select your current theme and choose functions.php file for editing.
- Paste the following code at the very bottom of the file:
- Save changes by pressing Update File button.
Option 3 – Checking version in version.php file
An alternative to the two methods discussed above involves diving into the source files of your WordPress site. This is the most reliable method, but also requires the most amount of time. First, you need to connect to your hosting account using file manager of your web hosting provider, or using FTP client.
Once connected, navigate over to the WordPress installation directory (usually it’s public_html) and open wp-includes folder. Here, look for a file named version.php and open it. This file contains the version of your WordPress installation on line 7, which should look like this:
$wp_version = '4.4.2';
This is how the file containing WP version looks in Hostinger File Manager:
You might be wondering whether this file is safe or not. After all, if it is located in the same place on every WordPress distribution, therefore, couldn’t hackers simply type its path in the browser and view it? Well, it is because the information about the version is in a PHP variable and not in the part of the page’s HTML, nothing gets displayed when this page is opened in a web browser or when the page source is viewed.
Checking on your WordPress version may be important if you’re planning to update to the latest available version, or wish to get a plugin/theme that works on specific versions of WordPress.
In this tutorial, we showed you 3 easy methods of finding out which version of WordPress you currently have installed. If you wish to prevent your WordPress version from being displayed to everyone, we recommend checking our tutorial on how to secure WordPress and using plugins like Sucuri and Wordfence.
We hope you were able to find this tutorial useful. For more WordPress-related tutorials, visit hostinger.com/tutorials/wordpress.