How to use WP Stagecoach to test PHP versions on your website
You might have heard that you need to update your version of PHP. Maybe you see a notice in the WordPress dashboard about it, or maybe you’ve read the news that WordPress is increasing the minimum required version to 5.6. This can be mystifying if you aren’t a web host expert, but fortunately, WP Stagecoach now makes it easier than ever to test your website on different versions of PHP.
What is PHP and why does it matter to me?
PHP is the programming language that WordPress is written in. To use WordPress, you have to use a web server that has PHP installed on it. PHP is the most common programming language for thee web, so all web hosts offer it, but some web hosts run old versions of PHP. Old versions are bad for you because they have known security vulnerabilities, and they are missing out on a lot of new features and performance enhancements. So it’s important to use a recent version of PHP.
What version of PHP should I use?
WordPress recommends that you use PHP version 7.3 or greater. You might need to check with your web host to make sure they offer 7.3, and if they don’t, you should probably consider moving to a different web host.
Will changing PHP versions break my site?
Maybe! It depends on how recently all of your themes and plugins have been updated. Anything that has been updated in the past 6 months or so should run just fine on PHP 7.3 or greater, but you should always test before you switch to a new version of PHP.
How can I test my site with a new version of PHP?
Funny you should ask, because we happen to have a handy tool that lets you easily do just that. 😉 The most reliable way to test is to install your site on a server that uses PHP version 7.3 or later, but of course you don’t want to do that with your live site in case it breaks! This is a great reason to use a staging site: a copy of your site where you can experiment without worrying about breaking your live site.
When you use WP Stagecoach to create a staging site, WP Stagecoach will automatically detect what version of PHP your live site uses. By default, WP Stagecoach uses the same version of PHP on your staging site as it detects on your live site. However, if it is version 7.0 or earlier, WP Stagecoach will ask if you want to create a staging site with a different version of PHP. All you have to do is select your desired version when you create the staging site.
If WP Stagecoach doesn’t automatically offer you this option when you create your staging site, you can go to the WP Stagecoach settings page and turn on the Advanced settings menu, and then you will be able to select a PHP version.
Once you have tested that the new version of PHP works on your staging site, you can contact your web host to request that they update your live site to the new version, too. Then you’ll have all of the latest security and performance enhancements, with no worries that your site won’t be compatible with the new version of PHP.