WordPress proposes standardizing PHP file extensions to only allow .php files in their coding standards. The change addresses portability and security concerns, as different web server configurations (Apache on Debian vs Fedora) handle alternative extensions like .phtml and .php3 inconsistently. Using only .php ensures universal compatibility across server environments and guarantees that code analysis tools like PHPCS will properly check all PHP files.

2m read timeFrom make.wordpress.org
Post cover image
Table of contents
MotivationProposed change to the handbookReferences
4 Comments

Sort: