如何找出正在运行的 WordPress 版本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1390255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:31:54  来源:igfitidea点击:

How do I find out what version of WordPress is running?

wordpress

提问by leora

I have just taken over someone's hosted WordPress site. How do I find out what version he is running?

我刚刚接管了某人托管的 WordPress 网站。我如何找出他正在运行的版本?

回答by Paul Dixon

Look in wp-includes/version.php

查看 wp-includes/version.php

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '2.8.4';

回答by Michelle

Unless he edited some code to delete this, you should be able to view source on the site and look for this meta tag:

除非他编辑了一些代码来删除它,否则您应该能够在站点上查看源代码并查找此元标记:

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

That will give you the version.

那会给你版本。

回答by Gunaseelan

On the Admin Panel Dashboard, you can find a box called "Right Now". There you can see the version of the WordPress installation. I have seen this result in WordPress 3.2.1. You can also see this in version 3.7.1

管理面板仪表板上,您可以找到一个名为“现在”的框。在那里您可以看到 WordPress 安装的版本。我已经在 WordPress 中看到了这个结果3.2.1。你也可以在版本中看到这个3.7.1

WordPress Version 3.7.1

WordPress 版本 3.7.1

UPDATE:

更新:

In WP Version 3.8.3

在 WP 版本 3.8.3

WordPress Version 3.8.3

WordPress Version 3.8.3

In WP Version 3.9.1Admin Side, You can see the version by clicking the WP logo which is located at the left-top position.

WP Version 3.9.1Admin Side中,您可以通过单击位于左上角位置的WP徽标来查看版本。

WordPress Version 3.9.1

WordPress Version 3.9.1

You can use yoursitename/readme.html

您可以使用 yoursitename/readme.html

In the WordPress Admin Footer at the Right side, you will see the version info(Version 3.9.1).

在右侧的 WordPress 管理页脚中,您将看到版本信息(版本 3.9.1)。

In WP 4

In WP 4

You can get the WordPress version using the following code:

您可以使用以下代码获取 WordPress 版本:

<?php bloginfo('version'); ?>

The below file is having all version details

以下文件包含所有版本详细信息

wp-includes/version.php   

Update for WP 4.1.5

WP 4.1.5 更新

In WP 4.1.5, If it was the latest WP version in the footer right part, it will show the version as it is. If not, it will show the latest WP version with the link to update.

在 WP 4.1.5 中,如果页脚右侧部分是最新的 WP 版本,它将按原样显示版本。如果没有,它将显示最新的 WP 版本以及更新链接。

Check the below screenshot.

检查下面的屏幕截图。

WP 4.1.5

WP 4.1.5

回答by sufinawaz

For any wordpress site, you can go to http://example.com/feedand check the following tag in the xml file to see the version number:

对于任何 wordpress 站点,您可以访问http://example.com/feed并检查 xml 文件中的以下标记以查看版本号:

<generator>http://wordpress.org/?v=3.7</generator>

Here, 3.7 is the version installed.

这里,3.7 是安装的版本。

回答by MistaPrime

Every WP install has a readme.html file.

每个 WP 安装都有一个 readme.html 文件。

So just type www.yourdomain.com/readme.html

所以只需输入 www.yourdomain.com/readme.html

回答by Ahmad Awais

If you came here to find out about how to check WordPress version programmatically, then you can do it with the following code.

如果您来这里是为了了解如何以编程方式检查 WordPress 版本,那么您可以使用以下代码来完成。

// Get the WP Version global.
global $wp_version;

// Now use $wp_version which will return a string value.
echo '<pre>' . var_dump( $wp_version ) . '</pre>';
// Output: string '4.6.1' (length=5)

Cheers!

干杯!

回答by Md Mazedul Islam Khan

The easiest way would be to see the readme file that ships with every WordPress version itself.

最简单的方法是查看每个 WordPress 版本本身附带的自述文件。

http://example.com/readme.html

http://example.com/readme.html

回答by Jamie Rumbelow

On the Admin panel in the footer you should see the words "Wordpress x.x" where x.x is your version number :)

在页脚的管理面板上,您应该看到“Wordpress xx”字样,其中 xx 是您的版本号 :)

Alternatively you can echo out the WP_VERSION constant in your script, it's up to you. The former is a lot quicker and easier.

或者,您可以在脚本中回显 WP_VERSION 常量,这取决于您。前者更快更容易。

回答by transang

Because I can not comment to @Michelle 's answer, I post my trick here.

因为我无法对@Michelle 的回答发表评论,所以我在这里发布了我的技巧。

Instead of checking version on meta tag that usually is removed by customized theme.

而不是检查通常由自定义主题删除的元标记上的版本。

Check the rss feedby append /feedto almost of any link from that site, then search for some keywords (wordpress, generator), you will have better chance.

检查rss feed附加/feed到该站点的几乎所有链接,然后搜索一些关键字(wordpressgenerator),您将有更好的机会。

<lastBuildDate>Fri, 29 May 2015 10:08:40 +0000</lastBuildDate>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>http://wordpress.org/?v=4.2.2</generator>

回答by bhv

can find in Dashboard At a Glancebox

可以在仪表板At a Glance框中找到

if that box is hidden - click on screen optionsat top-right corner and check on At a Glance

如果该框被隐藏 - 单击screen options右上角并检查At a Glance

enter image description here

enter image description here