Is WordPress compatible with PHP 8?

Note: TL;DR. If you are using WordPress 6.2, you should at least use PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response.PHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web serverServer A server is a piece of computer hardware or software that provides functionality for other programs or devices. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers. by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTPHTTP The Hypertext Transfer Protocol (HTTP) is protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser. response. 8.1. If you keep your WordPress, plugins and themes up to date, everything should work fine.

If you are not yet using WordPress 6.2, we strongly recommend that you use this version of WordPress for maximum PHP compatibility.

PHP 8.x has been with us for a while now, so much so that even PHP 8.0 has only security support, and we should mainly use PHP 8.1 and PHP 8.2.

It mainly depends on which versions of WordPress and PHP we are talking about. There are many places to get information about WordPress and PHP compatibility:

A lot of information, plenty of versions.

The official version

WordPressPHP compatiblePHP beta compatible
WordPress 6.25.6 – 7.48.0* / 8.1* / 8.2*
WordPress 6.15.6 – 7.48.0* / 8.1* / 8.2*
WordPress 6.05.6 – 7.48.0* / 8.1*
WordPress 5.95.6 – 7.48.0* / 8.1*
WordPress 5.85.6 – 7.48.0*
WordPress 5.75.6 – 7.48.0*
WordPress 5.65.6 – 7.48.0*

What does beta mean?

Nothing. Yes, really, nothing. Forget about that!

When PHP 8.0 was released, WordPress gave some warning messages (not error messages). Most of those messages are fixed in all versions of WordPress and for all versions of PHP. Yes, there are outstanding tickets and messages, but they are few and should not affect WordPress performance.

Why put the beta label, then?

Not because of WordPress, but because of the ecosystem, i.e., plugins and themes. When PHP 8.0 appeared, block themes were not yet widespread and the Site Editor was not yet finished, which it is now. And since WordPress did not make its compatibility clear, many plugins were not adapted to PHP 8.x… because what’s the point if WordPress is non-compatible? (yes, this last question is pure sarcasm).

And, the fish that bites its tail: WordPress says it’s beta-compatible, and plugins and themes don’t adapt because WordPress isn’t… but, it’s not true. You have to read the fine print.

It’s all a matter of timing

In some cases, the release of WordPress coincides with a new major version of PHP, and that complicates everything. On the one hand, there is no time to adapt, on the other hand, everything works. And between one and the other, things are left the same.

The fact of marking WordPress as beta-compatible had a reason to be: WordPress works, but in general nobody uses WordPress without plugins. And the plugins, most of them, were not adapted to PHP 8.x.

It has been 6 months since the release of PHP 8.2 and many plugins are still not supported… although there has been time for PHP 8.0 and 8.1 to be supported.

Again, it’s a timing issue. PHP started a few years ago a cycle of annual releases of major versions that are not fully compatible with each other or generate many warnings, and reviewing all the WordPress code is complex, let alone the more than 60,000 plugins and 10,000 themes.

The Hosting vision

Security is a critical factor for hosting companies, and keeping PHP versions up to date is part of that.

That is why, every year, as the old PHP versions are no longer officially supported, the providers are activating the new ones and deactivating the old ones.

While it’s true that there are no PHP 7.4.1+ vulnerabilities reported yet (it’s a matter of time), it’s about time to use at least PHP 8.0. And, almost already, for the remaining half year of support, you should consider using at least PHP 8.1.

WordPress vs. PHP vs. Hosting companies

Undoubtedly, the decision to use one or another version of PHP for each project should be up to the users, although the hosting companies should clearly inform about the risks or not of using one or another version.

For example, someone with WordPress 5.8 cannot be recommended to activate PHP 8.1 because it probably won’t work. Nor can you push to make the change as soon as a new version of PHP is released.

What should I do?

First: the decision must always be yours. It is your project, and you have to decide what is best for it with all the information.

Second: have all the information. And this is where we can help you, a little.

Third: everything has to work. The goal is to make your site work, so you have to check, with a staging version, that everything is working properly. Ask your hosting provider for help with this.

I have WordPress 6.2

Presently, in May 2023, our recommendation is that you have at least PHP 8.1. It is a stable version, it is a secure version, and most themes and plugins work with this version.

WordPress 6.2 is compatible with 5.6.20+, PHP 7.0.x, PHP 7.1.x, PHP 7.2.x, PHP 7.3.x, PHP 7.4.x, PHP 8.0.x, PHP 8.1.x and PHP 8.2.x. BUT, older than PHP 8.0 are nor maintained, PHP 8.0 has only security maintenance and PHP 8.1 and PHP 8.2 are maintained versions. This is why PHP 8.1 is a good choice because, in general, everything should work.

What do I do if something doesn’t work? Upgrade everything to the latest versions. The latest version of WordPress 6.2 (right now WordPress 6.2.0), the latest versions of all your plugins and all your themes. If you have premium plugins, make sure you have the latest versions. Ask your hosting to help you figure out what’s wrong.

I have WordPress 6.1

When we published Server Environment for WordPress 6.1, we knew that WordPress 6.1 worked correctly with PHP 8.0 and PHP 8.1. PHP 8.2 did not, for one simple reason: it had not yet been released.

We also knew one thing: most plugins, even though PHP 8.1 had been on the market for a year, were not fully compatible. It was after PHP 7.4 stopped receiving updates that many developers started to support all available PHP 8.x versions, which are PHP 8.0, PHP 8.1 and PHP 8.2.

It has been long enough for WordPress 6.1, its plugins and themes to work properly with PHP 8.0 and PHP 8.1.

And, just as with WordPress 6.2, if you still have WordPress 6.1 everything should work correctly with PHP 8.1.

I have WordPress 5.9–6.0

You can read the same as in the two previous cases. In short, you should now be able to upgrade everything to PHP 8.1.

I have WordPress 5.6–5.9

You can read the same as in the two previous cases. In short, you should now be able to upgrade everything to PHP 8.0.

I have a version before WordPress 5.6

Surely, the best thing to do is to check out our article Upgrading (very old) WordPress.

Summary

The Core, Test, and Hosting teams actively care about the full compatibility of WordPress with all its technologies. This includes Apache HTTPD, nginx, PHP, MySQL, MariaDB, memcached or Redis.

While it is true that PHP is a critical technology, we have a project in which many hosting companies test their systems with future versions of WordPress so that, once released, its compatibility is as high as possible.

You can see the results of Host Test Results and learn how well it works and what the bugs are. Errors are good because it means that a possible incompatibility has been detected and will be corrected in the future so that WordPress remains compatible with the widest number of systems.

And if you are a hosting company, you can help WordPress stay up-to-date by testing alpha versions on your systems.

#core, #php

Server Environment for WordPress 6.1

Since the release of WordPress 6.1 the HostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. Team has received quite a few inquiries about some of the configurations related to the ServerServer A server is a piece of computer hardware or software that provides functionality for other programs or devices. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers. Environment.

Within the Handbook Hosting there is a page that is updated with each new major version of WordPress, or significant change, the information of the optimal and recommended configuration from the computer, in coordination with the rest of the teams.

Since last 2022-11-16 a new update of the page is available. As always, we recommend keeping the latest versions of the various services, especially for security. For example, using the latest versions of the web serverServer A server is a piece of computer hardware or software that provides functionality for other programs or devices. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers. does not usually affect WordPress at all. In general, the same thing happens with databases, it is best to use the latest versions of MySQLMySQL MySQL is an open-source relational database management system (RDBMS). MySQL is free and open-source software under the terms of the GNU General Public License. or MariaDBMariaDB MariaDB is a fork of the MySQL relational database management system (RDBMS), intended to remain free and open-source software under the GNU General Public License. MariaDB intended to maintain high compatibility with MySQL, ensuring a drop-in replacement capability with library binary parity and exact matching with MySQL APIs and commands., taking into account their connection with PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response..

And we come to PHP versions, which is usually the most delicate in each version of WordPress, whether in the coreCore Core is the set of software required to run WordPress. The Core Team builds WordPress., plugins or themes.

In this table you can find the list of available, stable versions that were at the time of the release of each WordPress version.

WordPress PHP MySQL MariaDB Date
WordPress 6.1 7.4 – 8.1 5.7 – 8.0 10.3 – 10.9 2022-11-01
WordPress 6.0 7.4 – 8.1 5.7 – 8.0 10.3 – 10.7 2022-05-24
WordPress 5.9 7.4 – 8.1 5.7 – 8.0 10.2 – 10.6 2022-01-25
WordPress 5.8 7.3 – 8.0 5.7 – 8.0 10.2 – 10.6 2021-07-20
WordPress 5.7 7.3 – 8.0 5.7 – 8.0 10.2 – 10.5 2021-03-09

But, to this table, we must add the compatibility of the WordPress Core in each version.

WordPress PHP compatible PHP betaBeta Beta is the software development phase following alpha. A Beta phase generally begins when the software is feature complete but likely to contain a number of known or unknown bugs. Software in the beta phase will generally have many more bugs in it than completed software, speed or performance issues, and may still cause crashes or data loss. The focus of beta testing is reducing impacts to users, often incorporating usability testing. compatible
WordPress 6.1 5.6 – 7.4 8.0* / 8.1* / 8.2*
WordPress 6.0 5.6 – 7.4 8.0* / 8.1*
WordPress 5.9 5.6 – 7.4 8.0* / 8.1*
WordPress 5.8 5.6 – 7.4 8.0*
WordPress 5.7 5.6 – 7.4 8.0*

Versions with * are those with beta compatibility. To learn more about beta compatibility, you can check out WordPress and PHP 8.0 and WordPress 5.9 and PHP 8.0-8.1. WordPress 6.1’s compatibility with PHP 8.2 is pending, although it should be noted that PHP 8.2 is not yet publicly available (it is scheduled to do so in early December 2022).

How to know which is the best stable version for each version of WordPress? Use the ServeHappy API. This APIAPI An Application Programming Interface (API) is a computing interface that defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc. returns the best compatibility information of WordPress with PHP.

WordPress Minimum PHP Recommended PHP API JSONJSON JavaScript Object Notation (JSON) is an open standard file format, and data interchange format, that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and array data types. It is a very common data format, with a diverse range of applications, such as serving as a replacement for XML in AJAX systems.
WordPress 6.1 5.6.20 7.4 JSON
WordPress 6.0 5.6.20 7.4 JSON
WordPress 5.9 5.6.20 7.4 JSON
WordPress 5.8 5.6.20 7.4 JSON
WordPress 5.7 5.6.20 7.4 JSON

These values may vary depending on the different teams consider the change.

Although official support for PHP 7.4 will soon end, currently only with security support, several open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. projects have requested the PHP Foundation to extend the support of this version until all of them are updated on their new compatibility, including WordPress, which could give that compatibility in WordPress 6.2 (taking into account the current tickets).

What is the Hosting team’s recommendation to Hosting companies? Maintain, for now, PHP 7.4 as the default version for all WordPress, and test and report compatibility with PHP 8.0, 8.1 and 8.2, when available.

If you want to help the Hosting, Core, and Test teams, test new versions and future WordPress, PHP and SQL compatibility, you can use the tool WordPress Distributed Hosting Tests (Test Runner).

Props to @Crixu for review the information.

#handbook, #make-wordpress-org-core, #make-wordpress-org-updates, #php

Proposal: Updating WP_MEMORY_LIMIT

During the Contributor Day at the WordCamp Europe 2022, the HostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. Team found that WP_MEMORY_LIMIT is set as 40 MB (single site) and 64 MB (multisiteMultisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core.https://codex.wordpress.org/Create_A_Network.). Furthermore, the WP_MAX_MEMORY_LIMIT is set as 256 MB.

WP_MEMORY_LIMIT is the value for the WordPress Memory Limit, usually referred to the frontend memory, and WP_MAX_MEMORY_LIMIT is the value for the PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response. Memory Limit, usually referred to the backend memory.

History

Around September 2013, the WP_MEMORY_LIMIT value changed from 32 MB to 40 MB (32+8). Some tests done by the Hosting Team suggest that the memory used on WordPress is around 16 MB.

The PHP memory_limit sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a serverServer A server is a piece of computer hardware or software that provides functionality for other programs or devices. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers.. Note that to have no memory limit, set this directive to -1. Check the PHP page for more information.

PHP values

The first part gets the value from PHP, and if not exists, sets a default value. Thereafter, if the value is incorrect (in bytes) sets the memory limit from the constant.

This PHP value has evolved:

Some questions

Why change the WP_MEMORY_LIMIT value?

To level it to the PHP standard.

If the hoster has some kind of limitation, misconfiguration, an incorrect value or does not allow changing it, the value used is the lesser, of 40 MB, which usually produces memory errors, when it should use the PHP default value, which is generally acceptable in new installations. At this time, 20 latest versions of WordPress (since WordPress 4.1 / 2014-12-17) can use PHP 5.6.40+ so it would meet the minimums set by PHP.

Can, actually, the value be greater than the PHP value?

Yes. That’s why there is an intent to include something like:

WP_MEMORY_LIMIT <= WP_MAX_MEMORY_LIMIT <= memory_limit

Premises

We should keep in mind some basic assumptions when incorporating PHP memory limits based on what users can do.

The memory limit set by computer systems are set for a reason. And that reason should be enforced; therefore, PHP’s memory limit should not be exceeded, and in case it needs to be exceeded, it should be changed by the system administration.

Users can set the values they want from the wp-config.phpwp-config.php One of the most important files in a WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database connection information. configuration file. Often, extremely high values are set to hide a memory consumption problem due to bad programming. With a few visits it usually works, but it is a short-term fix.

We must be realistic about the memory limits of the WordPress CoreCore Core is the set of software required to run WordPress. The Core Team builds WordPress. and the normal use of a WordPress, whether it is a simple WordPress or a WordPress Multisite. Most WordPress sites install plugins and themes that make memory spikes higher.

PHP has its baseline memory limits that should serve as a reference for its use and application.

Proposal

Considering that since 2008, and PHP >5.2.0 the memory_limit value is equal to 128 MB, should we consider an update of this value in the WordPress base configuration, or at least an update of the values?

The proposal from the WordPress Hosting team is for WP_MEMORY_LIMIT:

  • WordPress Single: define('WP_MEMORY_LIMIT', '128M');
  • WordPress Multisite: define('WP_MEMORY_LIMIT', '192M');

Another patch should be:

WP_MEMORY_LIMIT <= WP_MAX_MEMORY_LIMIT <= memory_limit

Users can modify the WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT at wp-config.php and should have some limitations in values, as far as WordPress cannot overflow PHP.

Getting the values

When doing some calls to PHP functions and values, got this:

  • php.iniphp.ini The main configuration file of PHP.: memory_limit -> value: 256M
  • function: memory_get_usage -> value: 2097152
  • updating the ini_set memory_limit to 512M -> value: memory_limit = 256M
  • function: ini_get_all[memory_limit]
Array (
  [global_value] => 256M
  [local_value] => 512M
  [access] => 7
)

So, the real values are, always, in the ini_get_all[memory_limit].

After doing some tests, maybe hard-coding the values is a bad idea, but having some “limits” is cool (like now) but reading the real values.

Ticket: 56390 Updating WP_MEMORY_LIMIT

Props: @javiercasares, @crixu, @bernardzijlstra, @mikeschroder.

#core, #performance, #php

WordPress 5.9 and PHP 8.0-8.1

#php

Why hosters should install the PHP-intl extension

Although there are many types of hostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web., most WordPress users use shared hosting, and some use VPSVPS A virtual private server (VPS) is a virtual machine sold as a service by an Internet hosting service. A VPS runs its own copy of an operating system (OS), and customers may have superuser-level access to that operating system instance, so they can install almost any software that runs on that OS. or Cloud hosting. Those who use VPS or Cloud usually manage their own servers and therefore decide the use of PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response. extensions, but those who use shared hosting usually do not have that option.

A few weeks ago came to the Hosting Team a request to analyze the suitability of using the Internationalization PHP extension because, although the WordPress CoreCore Core is the set of software required to run WordPress. The Core Team builds WordPress. does not need it just now, partly because it is known that it is not recommended or mandatory, development teams do not use it because it is not there, and hosters do not install it because WordPress does not use it. It’s the fish that bites its own tail.

Deciding which ApacheApache Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation. Apache is an Open Source software available for free. modules, which PHP extensions, which databaseDatabase A database is an organized collection of data. Access to this data is usually provided by a "database management system" (DBMS) consisting of an integrated set of computer software that allows users to interact with one or more databases and provides access to all of the data contained in the database. Because of the close relationship between them, the term "database" is often used casually to refer to both a database and the DBMS used to manipulate it. configuration or choice of cacheCache A cache is a component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. is not something to be taken lightly.

Why is the PHP Intl extension important?

WordPress is a global, international software, with support for a multitude of languages and with infinite combinations. Approximately half of the installations are in a language that is not the default (English) and this leads us to think about localisms, transliteration, encoding conversions, calendar operations, collation … in short, everything you have with the different languages and formats that are around the planet. And this is what the PHP Intl extension provides.

What do we as a WordPress Community gain from this extension?

Above all, we gain the possibility to use a lot of functions that can make our life easier than developers and that would improve the way we develop to improve WordPress.

Functions like collator_compare will allow us to compare Unicode text strings; with numfmt_format we will be able to format a number according to the selected locale; the normalization of characters; the formatting of messages; to know which is the first day of the week according to the locale, without needing to ask the user for it.

And not only in functionality or ease, also to improve security, with functions such as Spoofchecker that can tell you if ‘google.com’, ‘goog1e.com’ can confuse the user, or functions related to Internet domains, both to convert an IDN domain to text and text to IDN.

Yes, you may well think that WordPress already does many of these things, but in many cases it does them using hacks that could now be deprecated and used natively.

Hosting Team Recommendation

Taking into account that WordPress continues to grow, the Hosting Team has considered a good recommendation, but not an obligation, for all hostings that work with WordPress the possibility of offering this extension, by default, to all users.

Also, we open discussion to all hosters and also the Core Team and Plugins Team.

+make.wordpress.org/core/
+make.wordpress.org/plugins/
+make.wordpress.org/updates/

#core, #php, #plugins

re: PHP Extensions

Thank you to everybody who has contributed to the conversation regarding PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response. extension requirements!

This post is meant to summarize the feedback had so far, and not to make recommendations at this stage.

Background

Following the release of WordPress 5.2 and Site HealthSite Health This WordPress functionality will perform a number of checks on your installation to detect common configuration errors and known issues, and also allows plugins and themes to add their own checks. Check, the hostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. team started working on documentation to help bring clarity about requirements and recommendations to users and hosts.

The official requirements do not yet list PHP extension details. There is a meta ticket discussing how to handle this.

Site Health Check, however, lists both PHP extension requirements and recommendations via WP_Site_Health::get_test_php_extensions() in the new Site Health functionality in 5.2.

The recommendations included are extensions that are not required by coreCore Core is the set of software required to run WordPress. The Core Team builds WordPress., but are used when available to make WordPress function better.

Discussion on changing these was started in this trac ticket. While discussion is in progress, feedback was requested from hosts.

Following that, @dd32 helped with a first pass on requirements and recommended something like phpcompatinfo to check in an automated fashion. @amykamala ran phpcompatinfo as recommended, and you can check out the results in this doc.

Host Feedback

Based on feedback received in @mikeschroder‘s post regarding PHP requirements:

• 75% of feedback indicated that the handbook should make recommendations beyond the required PHP extensions.

• There was a 50/50 split on whether Site Health Check should also recommend PHP extensions beyond requirements.

• However, more than half of responses indicate that core requirements and recommendations (if provided) should both be available via Site Health.

The following extensions were suggested as additional recommendations to be made:

  • opcache
  • bcmath
  • memcache
  • memcachedMemcached Memcached is a general-purpose distributed memory-caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source must be read. Memcached is free and open-source software.
  • Intl

@peterwilsoncc recommended here that the following parameters be in place for determining what extensions are recommended:

“1. it’s used in WordPress Core
2. it’s included in the default PHP build for each version WordPress Core supports, currently the default builds for PHP 5.6+”

About Intl

There is an existing feature request for recommending the intl extension, found here.

@zodiac1978 brought up the idea of recommending intl in this github issue:

“It is necessary to use the Normalizer function which would solve many problems with internationalization issues for special characters: https://www.php.net/manual/en/intl.requirements.php

@fierevere  Pointed out that “intl has hard dependency on icu system libraries, which will consume over 30 Mb diskspace on smaller (VPSVPS A virtual private server (VPS) is a virtual machine sold as a service by an Internet hosting service. A VPS runs its own copy of an operating system (OS), and customers may have superuser-level access to that operating system instance, so they can install almost any software that runs on that OS./embedded) systems. Each loaded library claims some memory and initialization time overhead. Bigger distributions can link libicu to libxml2 library and therefore it can be loaded by libxml2 linked extensions, but this dependency is optional”

This trac ticket was re-opened and is related, in that Normalizer::normalize requires the intl and icu extensions.

@bronsonquick mentioned here that they “… had to created a new Chassis extension for PHP intl when I was working on a clients site in another language as it wasn’t bundled!”

@swissspidy brought up an important point here, stating that “an available extension does not necessarily mean that it’s working. For example, we’ve often ran into issues where hosts disable functions like curl_multi_init or even curl_init. Or, in the case of the INTL extension, when a serverServer A server is a piece of computer hardware or software that provides functionality for other programs or devices. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers. is running PHP 7.2 but uses a super outdated version of the extension which doesn’t include the functions and constants one would expect. So any site health check for extensions should also check against these things.”

Thank you

Thank you again to everyone who contributed to the conversation regarding PHP extensions. Please feel free to add additional comments here or bring it up in the #hosting-community SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel. Your feedback is important!

#php

What should the next PHP version recommendation be?

Hi All,

It’s been 8 weeks since the minimum required PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response. version for WordPress was increased from PHP 5.2 to PHP 5.6.

Before we increase the minimum required PHP version again, we would like to trigger the servehappy warning banner to sites running on one of the end of life (EOL) copies of PHP. Before we can do that, we need to understand the impact the next PHP version recommendation would have on the users.

This is where the HostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. Team guidance would be awesome! Any feedback on the following three questions would be great.

  1. How has the PHP minimum requirement bump affected you?
  2. What should the next PHP minimum recommendation be and why?
  3. What common issues do you foresee having with the sites that you host with the next PHP bump?


Edit:

Adding a 4th question:
What versions of PHP should we target with a servehappy warning banner?

These are not minimum requirements but encouragements to get people to be proactive and bump their PHP version before the minimum requirement bump happens.

#site-health

#php

PHP Requirements Check-in

Hey everyone!

There’s been some conversation around the PHPPHP PHP (PHP: Hypertext Preprocessor) is a general-purpose scripting language especially suited to web development. PHP code is usually processed on a web server by a PHP interpreter. On a web server, the result of the interpreted and executed PHP code would form the whole or part of an HTTP response. extension requirements and recommendations posted by the hostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. team following the release of WordPress 5.2 and Site HealthSite Health This WordPress functionality will perform a number of checks on your installation to detect common configuration errors and known issues, and also allows plugins and themes to add their own checks. Check.

I’m super excited that folks are digging into this documentation to ensure the recommendations are the best they can be for WordPress users!

This post is meant to introduce the background of the list and gain further feedback on the best way forward.

Background

There wasn’t an official set of PHP extension requirements from the WordPress project at all, and the hosting team decided to create documentation so that this would be more clear for both users and hosts. The team hoped this documentation could eventually be used to update the official requirements, since they are not currently complete.

The team did an initial pass with various contributors, including an audit of coreCore Core is the set of software required to run WordPress. The Core Team builds WordPress. to find references to extensions.

This page on the handbook was the result of those folks’ work, and was used as a reference during the addition of Site Health Check in 5.2.

Site Health Check both lists strict requirements and makes recommendations when extensions aren’t strictly required, but WordPress works better with those extensions present.

Feedback

Following the release, there have been tickets about changing the Site Health Check requirements and recommendations, and #47454 is the tracTrac Trac is an open-source, web-based project management and bug tracking system. Trac integrates with major version control systems including ("out of the box") Subversion and Git. ticket where the most recent conversation has been happening.

Following that ticket, there was some chat in #hosting-community, and @dd32 did a first pass on the requirements based on his knowledge of the code base (thanks!). He also gave the idea of using an automated checker to get more detail on requirements. There’s also been some conversation about them in the two hosting meetings since.

There are varying opinions on what should be in Site Health Check, including whether it should be only what Core requires and uses, or whether it should include some things that are helpful to users, but are not absolutely necessary for WordPress to have all of its functionality.

I’m also interested if the Hosting Team Handbook is the best source-of-truth for these requirements and recommendations to be, since the requirements are defined by core itself.

Do you have any thoughts on the above? Please leave comments on this post!

Interested in feedback in general, but as a bit of recap, here are a few conversation points to start things off:

  1. Should the Hosting Handbook recommend extensions beyond what core requires?
  2. Should Site Health Check recommend extensions beyond what core requires?
  3. Where should requirements and recommendations for core be located?
  4. What changes would you recommend making to the current list?

Thanks everyone — looking forward to the discussion!

+make.wordpress.org/core

#php

Announcing Beta Period for Distributed Host Testing

Just over a year ago, Aaron Jorbin suggested a simple idea:

If WordPress really wants to do quality automated testing, we need to rely on the people hostingHosting A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web. sites to test vs their stack. To do that, CoreCore Core is the set of software required to run WordPress. The Core Team builds WordPress. needs to provide an infrastructure that both encourages and enables easy automated testing.

Today, we’re happy to announce the beginning of a betaBeta Beta is the software development phase following alpha. A Beta phase generally begins when the software is feature complete but likely to contain a number of known or unknown bugs. Software in the beta phase will generally have many more bugs in it than completed software, speed or performance issues, and may still cause crashes or data loss. The focus of beta testing is reducing impacts to users, often incorporating usability testing. period for exactly this: a framework for any hosting company to run the WordPress PHPUnit test suite on their infrastructure and report the results back to WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/.

At a high level, this framework is two parts:

  1. The phpunit-test-runner, which prepares the environment, runs the test suite, and reports the results back to WordPress.org.
  2. The phpunit-test-reporter, which receives the results, stores them in the databaseDatabase A database is an organized collection of data. Access to this data is usually provided by a "database management system" (DBMS) consisting of an integrated set of computer software that allows users to interact with one or more databases and provides access to all of the data contained in the database. Because of the close relationship between them, the term "database" is often used casually to refer to both a database and the DBMS used to manipulate it., and displays them in an accessible manner.

We’d love to see dozens of hosting companies participate in this program. Check out Getting Started for an overview on how you can set it up. Then, stop by the #hosting-community channel in WordPress.org Slack with any questions you might have.

Thanks to DreamHost and WP Engine for volunteering the engineering effort to make this project possible.

#hosting-community, #php, #testing

Dive Into Distributed Unit Tests

Recently, I have spent some time looking into using pre-built tools for distributed unit tests. What I found was that all of them were built to fetch the test results. What we need, for this project, is to have the results sent to us. At this point it seems like a custom WordPress solution will be the best route.

There was some discussion in #hosting-community about how the tests would be triggered. Some hosts have scripts that run nightly, so slipping tests into that process would make implementation easy. However, using a nightly solution would make it more difficult to determine exactly which commit caused an issue.

If we move forward with running tests on a per-commit basis, do hosts watch for commits and then report the results? Or do we pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” hosts? It seems like pinging hosts would be ideal, but it might not be an option for all hosts. It would be really nice to get some feedback here, so your thoughts would be appreciated.

The first step is to start on the method used to report results. This will be a WordPress based application, with a REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.. Hosts will submit the results with the commit SHA to be aggregated. I’m going to dig into this over the next several weeks and will share a GitHubGitHub GitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. link when I have something up and running.

#php, #testing