Title: Upgrade error message
Last modified: August 19, 2016

---

# Upgrade error message

 *  Resolved [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * (@andrew-chapman)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/)
 * Hi, I am trying to upgrade to 2.6.5
 * When I go to mysite.com/wp-admin I get
 * Fatal error: Call to undefined function: get_option() in /home/username/mysite-
   www/wp-admin/admin.php on line 9
 * Would much appreciate any help,
 * Andrew

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

 *  [kwbridge](https://wordpress.org/support/users/kwbridge/)
 * (@kwbridge)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915809)
 * Hi Andrew
 * I located this thread which might help.
 * [http://wordpress.org/support/topic/153814?replies=9](http://wordpress.org/support/topic/153814?replies=9)
 *  [bernardborealis](https://wordpress.org/support/users/bernardborealis/)
 * (@bernardborealis)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915810)
 * Hmm, see if there is an empty space in your wp-config.php file either before 
   the opening <?php tag, or after the closing ?> php tag. Could be a plugin problem,
   too. Make sure you deactivate your plugins before upgrading.
 *  Thread Starter [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * (@andrew-chapman)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915821)
 * I first of all got an error message saying there was a syntax error in wp-config.
   php line 2. I hit return after <?php to start //**MySQL Settings on a new line,
   and tried again, and that’s when I got the admin.php error.
 * I deleted the new files, and uploaded the backup files, and have exactly the 
   same problem, first the config.php error message, and then if I make the above
   adjustment, the same admin.php message.
 * Andrew
 *  Thread Starter [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * (@andrew-chapman)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915823)
 * Here’s the original error message:
 * Parse error: syntax error, unexpected T_STRING in /home/username/mysite-www/wp-
   config.php on line 2
 * And here are the first lines of that file:
 * <?php// ** MySQL settings ** //define(‘DB_NAME’, ‘mydatabasename’); // The name
   of the database
 *  [ikester](https://wordpress.org/support/users/ikester/)
 * (@ikester)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915837)
 * Greetings Andrew,
 * On some hosts, it is necessary to use the upgrade.php to update the db connections.
   If this is an upgrade, make sure you deactivated all of your plugins
    >overwrite
   the indicated files and folders >once finished type domain/wp-admin/upgrade.php
 * You should get some indication that your db was either upgraded or that it is
   okay.
 * I had the same problen and the above solved it for me.
 * I hope this helps.
    Ike [http://surfinjaco.com](http://surfinjaco.com)
 *  Thread Starter [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * (@andrew-chapman)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915941)
 * Thanks everybody for your help. I downloaded WordPress again and edited the config
   file by hand rather than copying and pasting from the existing one. Now it works–
   don’t understand why it didn’t before especially with the original one which 
   I uploaded again – I don’t think I had touched it apart from selecting and copying
   a few lines. Anyway, all’s well that ends well.

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

The topic ‘Upgrade error message’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 6 replies
 * 4 participants
 * Last reply from: [Andrew Chapman](https://wordpress.org/support/users/andrew-chapman/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/upgrade-error-message-1/#post-915941)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
