Getting HTTP ERROR 500 after upgrading PHP version from 5.6.4 to 7.x

I tried renaming the plugins folder via FTP to deactivate them, and same error. Deactivating the themes and leaving only Twenty Nineteen active did not help either.

Enabling WP_DEBUG returned no relevant error.

  • Ash
    • WordPress Hacker

    Hello Bevan

    According to the error log attached in chat, the error is:

    PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /home/sites/********/public_html/wp-content/themes/super-skeleton/option-tree/ot-loader.php on line 389

    Also, as you are saying you are getting the error even with default theme, then the error is:

    Fatal error: Call to undefined function get_header() in /home/sites/******/public_html/wp-includes/theme-compat/embed.php on line 13

    The first error is theme issue, means the theme is not compatible with php 7+ as they are using a format which is not available in php 7+.

    The second error seems, you have missing files. So, please do the following:
    1. Download wordpress from https://wordpress.org/download/
    2. Extract to your desktop
    3. Upload wp-admin and wp-includes folder to overwrite the current ones. DO NOT upload wp-content and other files in the root.

    Let us know how it goes. Have a nice day!

    Cheers,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.