PHPackages                             wpupdatephp/wp-update-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wpupdatephp/wp-update-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wpupdatephp/wp-update-php
=========================

Library to be bundled with WordPress plugins to enforce users to upgrade to PHP 5.4 hosting

1.1.1(9y ago)7827.6k8[2 issues](https://github.com/WPupdatePHP/wp-update-php/issues)[1 PRs](https://github.com/WPupdatePHP/wp-update-php/pulls)1GPL-2.0+PHP

Since Feb 13Pushed 8y ago2 watchersCompare

[ Source](https://github.com/WPupdatePHP/wp-update-php)[ Packagist](https://packagist.org/packages/wpupdatephp/wp-update-php)[ RSS](/packages/wpupdatephp-wp-update-php/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (1)

WPupdatePHP library
===================

[](#wpupdatephp-library)

Library to be bundled with WordPress plugins to enforce users to upgrade their PHP versions *or* switch to a decent host.

Installation
------------

[](#installation)

We recommend installing the library using [Composer](https://getcomposer.org/), as follows.

```
composer require wpupdatephp/wp-update-php

```

Another option is to download the [class file](https://github.com/WPupdatePHP/wp-update-php/blob/master/src/WPUpdatePhp.php) manually.

Usage
-----

[](#usage)

Usage of this library depends on how you start your plugin. The core `does_it_meet_required_php_version` method does all the checking for you and adds an admin notice in case the version requirement is not met.

For example, when you start your plugin by instantiating a new object, you should wrap a conditional check around it.

*Example:*

```
$updatePhp = new WPUpdatePhp( '5.6.0' );

if ( $updatePhp->does_it_meet_required_php_version() ) {
    // Instantiate new object here
}

// The version check has failed, an admin notice has been thrown
```

Including the library file
--------------------------

[](#including-the-library-file)

Adding the library via Composer has preference. The Composer autoloader will automatically take care of preventing including two classes with the same name.

In case you want to include the file manually, please wrap the include or require call in a [`class_exists`](http://php.net/class_exists) conditional, like so:

```
if ( ! class_exists( 'WPUpdatePhp' ) ) {
	// do the file include or require here
}
```

Setting the name of the plugin
------------------------------

[](#setting-the-name-of-the-plugin)

The notice that will be thrown can also contain the name of the plugin. Use the `set_plugin_name( $name )` method on the `WPUpdatePhp` object to provide the name. This call needs to be made before the `does_it_meet_required_php_version()` method is called to check versions.

License
-------

[](#license)

(GPLv2 license or later)

WP Update PHP Library Copyright (C) 2015 Coen Jacobs

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see .

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 80.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~377 days

Total

3

Last Release

3404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61cff62e2e49a20dff92e43b7caeb50b2cfd6dc2b761f9d897ea8c2e6fc3bcbf?d=identicon)[wpupdatephp](/maintainers/wpupdatephp)

---

Top Contributors

[![coenjacobs](https://avatars.githubusercontent.com/u/245703?v=4)](https://github.com/coenjacobs "coenjacobs (49 commits)")[![afragen](https://avatars.githubusercontent.com/u/1296790?v=4)](https://github.com/afragen "afragen (7 commits)")[![dannyvankooten](https://avatars.githubusercontent.com/u/885856?v=4)](https://github.com/dannyvankooten "dannyvankooten (2 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (2 commits)")[![michaelbeil](https://avatars.githubusercontent.com/u/4752949?v=4)](https://github.com/michaelbeil "michaelbeil (1 commits)")

### Embed Badge

![Health badge](/badges/wpupdatephp-wp-update-php/health.svg)

```
[![Health](https://phpackages.com/badges/wpupdatephp-wp-update-php/health.svg)](https://phpackages.com/packages/wpupdatephp-wp-update-php)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
