升级主机PHP版本前如何确定你的wordpress网站兼容要升级的PHP版本?
来源:互联网 发布:excel剪切板数据 编辑:程序博客网 时间:2024/05/22 08:15
原文:https://wpbuffs.com/wordpress-php-version-check/
If you notice that your WordPress hosting provider is not running PHP 7, but has it available to its users, you may want to consider making a WordPress PHP version change so you can benefit from all of PHP 7’s features. However, in order to avoid breaking your site, you should make sure all of your site’s themes and plugins are compatible.
To check for WordPress PHP version compatibility, you can use another simple plugin called PHP Compatibility Checker.
An Overview of PHP Compatibility Checker
The popular hosting company WP Engine created PHP Compatibility Checker in an effort to help the WordPress community adapt to major PHP shifts. Designed to work on all WordPress websites, regardless of which hosting provider is being used, PHP Compatibility Checker checks your website’s theme and plugin code and presents any compatibility issues to you.
Any issues the plugin detects are categorized into errors and warnings. The list of WordPress PHP version errors and warnings will include the file and code line number that is causing issues so you know exactly where the problem is.
In addition, you will notice suggestions for why the code is incompatible with the current PHP version, as well as which themes and plugins may benefit from an upgrade in order to become compatible with higher PHP versions.
Using the PHP Compatibility Checker Plugin
Just like Display PHP Version, navigate to Plugins > Add New and search for PHP Compatibility Checker.
From there, simply click on Install Now and then Activate. You will then notice a new menu item in your WordPress dashboard labeled PHP Compatibility under the Tools section. Click on that to configure the plugin to scan your website for compatibility issues.
Once you click on PHP Compatibility, you will have the option to scan your website for compatibility with the PHP versions 5.3, 5.4, 5.5, 5.6, and 7.0. You also have the option to scan all themes and plugins installed on your website, or restrict your scan to only those themes and plugins that are active on your site.
In this case, I will scan my website for compatibility issues with PHP 7, and will narrow the scan to active theme and plugins.
After clicking on Scan site, the plugin presents me with scan results:
Luckily for me, my active theme, and all active plugins are compatible with PHP 7. This means that I can make the switch from PHP 5.5.38 to PHP 7 with no problems. And the truth is, so long as you use high quality themes and plugins, and keep everything up-to-date, this should be the case for most WordPress users.
False Positives
WP Engine does want to make sure that you know that their plugin is not foolproof. In fact, they provide a list of plugins that are likely to provide false positives (meaning these plugins may come up as having WordPress PHP compatibility issues, when in fact there are no actual issues):
If you find the PHP Compatibility Checker reporting issues related to any of the above-mentioned plugins, check out the details and see if the error or warning is a result of an issue with the compatibility plugin, rather than the plugin being scanned.
- 升级主机PHP版本前如何确定你的wordpress网站兼容要升级的PHP版本?
- 用yum 安装的php版本升级
- PHPNow升级PHP版本
- ubuntu升级php版本
- OSX 升级PHP版本
- 升级php版本
- liunx php版本升级
- yum 升级php版本
- 如何升级esxi的版本
- wamp中升级php版本
- PHP版本升级5.4手记
- PHPNow升级PHP版本为5.3.5的方法
- Mac OS X 下升级 PHP 版本的简单方法
- PHP 升级5.6版本后遇到的问题
- linux版本的升级
- 应用程序的版本升级
- 升级CentOS的版本
- Coredata的版本升级
- Django问题
- 【Python基础】1.4.2 温度转换程序及其关联颜色升级版
- 深度学习笔记(1)
- Tornado学习
- 疯狂啃的C
- 升级主机PHP版本前如何确定你的wordpress网站兼容要升级的PHP版本?
- iOS 本地通知
- c++ AbstractFactory模式实现
- 单链表逆序算法
- 函数模板概念及实现原理
- fiddler抓包HTTPS请求
- 学习笔记-batch normalization
- 蓝桥杯训练:基础训练——时间转化
- nyoj307 宝物(最短路+贪心)