Question

Upgrading to PHP 8.0 ?

Hi,

Is it a good idea to upgrade my live website to PHP 8.0?

Also, 8.0.7 is the latest stable release. How can I check which version of php I’m actually using?

Thanks


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @Chris0303

It is considered a good practice to use the newest available (stable) version. You can also make sure that your code is compatible with the newer version in order to prevent any issues.

You can check which is the current version via ssh or by creating a phpinfo file and load it to your browser.

You can ssh to your droplet and run the following command:

  1. php -v

This will list the installed system version. However, you might have multiple PHP versions installed on your droplet. You can also create a phpinfo.php file in your public directory and then add the following content to the file:

  1. <?php
  2. phpinfo();
  3. ?>

You can then access the file in the browser, e.g - yourdomain.com/phpinfo.php or whatever you named the file.

You can check the following question on how to upgrade the PHP version -

https://www.digitalocean.com/community/questions/how-to-upgrate-php-7-4-3-to-php-8-on-wordpress

Hope that this helps! Regards, Alex