JDM Digital

Parse error: syntax error, unexpected T_FUNCTION

Have you ever gotten a weird Parse error like this when trying to activate a WordPress plugin? Don't worry. You just need to upgrade your version of PHP.

Just because a plugin is installed, doesn’t mean it’s actually being used.  When you activate a plugin in WordPress, that code is being added to a string of includes.  At that point, it might generate an error and WordPress may refuse to activate the plugin because of it.

If you see something like:

Parse error: syntax error, unexpected T_FUNCTION in...

This is likely due to the version of PHP you’re running being too far out of date.  The fix is simply to update PHP.

Update PHP in cPanel

Go to your web host admin panel (cPanel, for example).

Under “Settings” you should see an icon for something like “Programming Languages.”  Click that icon.

Once you’re there, select a newer version of PHP and click “Save Changes” or “Continue.”

It can take up to an hour for the upgrade to take place, but everything should return to normal after that time.

Just remember, don’t panic.  Should you panic anyway, don’t hesitate to reach out to our support team.

Get the Email

Join 1000+ other subscribers. Only 1 digest email per month. We'll never share your address. Unsubscribe anytime. It won't hurt our feelings (much).

Subscribe

Exit mobile version