A great number of my potential (and hopefully future) customers use WordPress and ALL of my beta customers use Wordpress. The field I'm in requires that my clients have some type of web presence, basically a 'brochure' website and of course that's a field WordPress seems to cover quite well.
My question is regarding writing a plugin for my customer's website that integrates with the services I offer. I have roughly 12 years of PHP experience (last touched 5.3 or so somewhere around 2009) and I know it's changed but coding it shouldn't be an issue for me. I do have questions:
What version of Wordpress should I aim for? 4.9 (which requires PHP 5.2...)
What version of PHP should I target? I know this relates directly to the question above, but 5.4.x is dead and no longer supported, right?
How hard is it for a customer to upgrade Wordpress versions? I seem to remember that upgrading Drupal 6.x websites was a nightmare and you'd better have your backup ready to go.
Is PHP 7.3 compatible with Wordpress 4.9?
Basically, if someone could do a greenfield Wordpress Plugin write up in 2019 I'd be thrilled.
Top comments (2)
The only decision between picking Wordpress 4.x or 5.x is about the editor. If your customers are not afraid the new Gutenberg block editor, go for it. You can always go back to the classic editor by using a plugin (I believe this approach was supported for a few years).
Upgrading Wordpress is really a one-click operation but you should establish an environment with proper data backup and rollback in case something goes wrong. Some commercial plugins should do this nicely if you don't care setting it up yourself.
As for the PHP version, just pick the PHP 7.3. There are no breaking changes comparing to PHP 7 as the updates have been minor. You will also get all the speed benefits of PHP 7.
What version of Wordpress should I aim for? 4.9 (which requires PHP 5.2...)
You can still get away with using PHP7 with v4.9, it's other plugins being used that you'll have to worry about. Most hosting install WP on PHP7 by default unless its custom setup or the option is there during install.
What version of PHP should I target? I know this relates directly to the question above, but 5.4.x is dead and no longer supported, right?
I'd target PHP7 as most hosting providers are upgrading to it for Managed WP hosting even if WP is v4.8.x.
How hard is it for a customer to upgrade Wordpress versions? I seem to remember that upgrading Drupal 6.x websites was a nightmare and you'd better have your backup ready to go.
v4 to v5 would be chaotic if the theme or major plugins are not v5 ready. While you can still upgrade to v5 and disable Gutenberg to revert back to Classic Editor it's not something you'd want your clients ever doing if they're not more advanced with WP Administration.
Is PHP 7.3 compatible with Wordpress 4.9?
It should work, anything PHPv7+ should work on WP v4.9 and up.