Use code NOVASHARE for an extra 10% off!
  1. Home
  2. Docs
  3. Troubleshooting
  4. How to fix the “PHP Parse error: syntax error, unexpected ‘?’” warning

How to fix the “PHP Parse error: syntax error, unexpected ‘?’” warning

When installing the Novashare plugin, it’s rare, but you might run into an error like this which prevents you from activating the plugin:

Plugin could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected '?' in /www/wp-content/plugins/novashare/inc/functions.php on line xxxx

The reason for this is usually because you’re using a very old version of PHP. We currently require PHP 7.0 (released in 2015) or higher for Novashare to work properly.

How to check your PHP version

Follow the steps below to check what version of PHP you’re running.

Step 1

Under “Tools” in your WordPress dashboard click on “Site Health.”

WordPress Site Health tool
WordPress Site Health tool

Step 2

Click on the “Info” tab.

WordPress site info
WordPress site info

Step 3

Scroll down and expand the “Server” section. You should see the PHP version you’re running.

WordPress PHP version
WordPress PHP version

While we only require PHP 7.0 or higher, WordPress officially recommends PHP 7.4 or higher. Any version below PHP 7.4 is actually a big security risk and bad for performance since it’s no longer updated, developed, or supported.

If you need to update your PHP version, the easiest thing to do is check with your hosting provider or their documentation. Some hosting providers, like Kinsta, even have a toggle where you can easily switch between PHP versions.

Change PHP version
Change PHP version
Was this article helpful?

Related Articles