Require Minimum PHP Version to Activate a WordPress Theme

WordPress core only requires PHP 5.2 to run properly. This is great for compatibility with older hosts but this version of PHP was also released in 2006. Using a newer version of PHP provides more security, access to better development tools, and most of all: speed!

For this reason BigBox sets a minimum PHP version of 7.0 — which should be readily available on any reputable hosting company. Below is a quick snippet that blocks a theme from activating if it does not meet the defined PHP version and reverts the website back to the default theme.

(more…)