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.

WordPressPHPMySQLMariaDBDate
WordPress 6.17.4 – 8.15.7 – 8.010.3 – 10.92022-11-01
WordPress 6.07.4 – 8.15.7 – 8.010.3 – 10.72022-05-24
WordPress 5.97.4 – 8.15.7 – 8.010.2 – 10.62022-01-25
WordPress 5.87.3 – 8.05.7 – 8.010.2 – 10.62021-07-20
WordPress 5.77.3 – 8.05.7 – 8.010.2 – 10.52021-03-09

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

WordPressPHP compatiblePHP 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.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*

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.

WordPressMinimum PHPRecommended PHPAPI 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.15.6.207.4JSON
WordPress 6.05.6.207.4JSON
WordPress 5.95.6.207.4JSON
WordPress 5.85.6.207.4JSON
WordPress 5.75.6.207.4JSON

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