John Davidson

WordPress plugin automatic updating and minimum PHP version defined in README file

0 comments
Message:


I have a plugin that previously supported PHP 5.6. The new upcoming version supports 7.4 and higher.


Does WordPress automatic update take that into account when automatically updating plugins? Or will it just update and break the website that is on PHP version lower than 7.4.


Tried googling it but can not find an answer anywhere.



My Answer:
WordPress does not currently have a built-in feature that checks the minimum PHP version required by a plugin before automatically updating it. This means that if a plugin update requires a higher PHP version than what is currently installed on the website, it could potentially break the website.

To prevent this from happening, you can define the minimum PHP version required by your plugin in the README file. This way, users will be aware of the requirements before updating the plugin manually. Additionally, you can include a check in your plugin code to prevent it from being activated or updated on websites with a lower PHP version.

It's always a good practice to communicate any changes in PHP requirements to your users to avoid any compatibility issues.

Rate this post

3 of 5 based on 7601 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us