newlogowp512

World of WP is for sale!
Interested? Please contact us here.

Coding Standard Proposal: Make it explicit that PHP files must use the .php extension

Date:

The current WordPress Coding Standard does not specify which file extensions should be used for PHP files. This proposal establishes that only the .php file extension should be allowed for PHP files.

Motivation

While web servers like Apache and Nginx can be configured to execute files with various extensions as PHP (e.g., .php3 and .phtml), the .php extension is the only one universally supported. If PHP files do not use the .php extension, there is a risk that scripts will not work on some web servers. For example, a default Debian installation using Apache and mod_php parses .php, .phtml, and

This is the first part of the article

Coding Standard Proposal: Make it explicit that PHP files must use the .php extension

wpforms banner