Is requiring PHP version 5.3 allowed in themes?

Hi guys,

I was wondering, are we allowed to require PHP 5.3 version in our themes? Would very much like to use namespaces but sadly they are now supported by the PHP 5.2.x which WordPress lists as a minimum requirement.

Any info on the topic is appreciated.


Depends on WP version

WordPress server requirements for Version 3.2+:
PHP version 5.2.4 or greater.

I’d like to kwow it as well since 5.2.x is long time dead and recommends 7.0

5.6 as minimum but not 7.0, not at least now.

7.0 is what recommends:

i’m only interested in dropping compatibility with 5.2.X which reached end of life more than 6 years ago.
Code would work on 5.3.0 and above.

No issues as far as Envato is concerned. You may receive a few complaints from customers still using 5.2, but they’re less than ever now (<10%).

Just do a version check first thing and quit gracefully with a message to prevent fatal errors / white page of death.


It’s suggested but not all of the hosting providers updated the PHP version ( as default ) to 7
That’s why I suggested that you could use 5.6 as the minimum requirements

What i’m really concerned here is being rejected by a reviewer with “wp runs on it so should your theme” kind of reason because that would require a major rewrite.

It (at least) allowed in plugins. I saw many plugins with 5.3 requirements.

I’m requiring PHP 5.4 in our themes with no problem. Autoloading FTW! I was afraid to do that at first, but I’ve had 0 complaints so far, so I’m guessing that hosting providers have finally abandoned PHP 5.2, and it’s active only on legacy servers now.

In the lastest version of Wordpress you can view tha lastest version of PHP that you have installed in your server and if this version is secure for your website.

I recommend have installed allways the lastest version of PHP for haven’t security problem in your CMS.

This topic was automatically closed after 2 days. New replies are no longer allowed.