Support » Fixing WordPress » upgrade.php Parse Error after manually copying WP files (3.7.1)

  • Resolved neoikon


    I am trying to manually upgrade my WP from 3.6.1 to 3.7.1. I’ve followed the steps… de-activated all plugins, copied all files, etc.

    When I go to /wp-admin/upgrade.php in order to upgrade the database, I get this error:

    Parse error: syntax error, unexpected T_PRIVATE in <PATH>\wp-admin\includes\screen.php on line 154

    The site comes up (thankfully), but I cannot access the admin site (thus, I can’t reactivate my security plugins!)

    Please help!

Viewing 2 replies - 1 through 2 (of 2 total)

    I commented out this line in /wp-admin/includes/admin.php
    require_once(ABSPATH . 'wp-admin/includes/screen.php');

    screen.php is the page that was giving the error above.

    After doing this, I got the correct “update database” dialog, which succeeded! (maybe a bad thing, because now it’s harder to revert)

    I uncommented out that line after the database was updated.

    Now I get this error:

    Fatal error: Call to undefined function set_current_screen() in <path>\wp-admin\admin.php on line 181


    Ha, so apparently there were some files corrupted when copied over via http://FTP... just random, big chunks of code missing from the the middle of files.

    Yeah, that could cause problems…

    So, I set the DB version back to v3.6.1, re-copied over the entire /wp-admin folder, re-updated the DB, and now all is well!

    I used this link to set the DB version back:

    Mental note, after copying files, perform a “sync” to identify any problems of file sizes not matching local to remote.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘upgrade.php Parse Error after manually copying WP files (3.7.1)’ is closed to new replies.