Title: Parse error: syntax error, unexpected $end&#8230;
Last modified: August 18, 2016

---

# Parse error: syntax error, unexpected $end…

 *  [tcervo](https://wordpress.org/support/users/tcervo/)
 * (@tcervo)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end/)
 * I followed the instructions for upgrading 1.2.1 to 1.5 (I backed everything up
   locally, deleted everything except wp-config.php, then uploaded the new files…)
 * When I try to run upgrade.php, I get the following error:
 * Parse error: syntax error, unexpected $end in E:\webs\tcervo.com\wwwroot\wp-includes\
   wp-db.php on line 309
 * Any ideas?

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

 *  Thread Starter [tcervo](https://wordpress.org/support/users/tcervo/)
 * (@tcervo)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end/#post-149873)
 * Got it…I delted everything (again) and re-uploaded. Worked fine this time. I 
   guess something got jacked up when I FTP’s the first time…
 *  [1massing](https://wordpress.org/support/users/1massing/)
 * (@1massing)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end/#post-150271)
 * “Parse error: syntax error, unexpected $end in /home/.bangle/jzd3/blog.server.
   com/outbasket/wp-includes/wp-db.php on line 304”
    is the error I get when I either–
   try to access my intended new location for a previously working blog (theme modified
   In-Business) – try to login or administer either the old or new location.
 * The old location is still functional and I have local copies of it and of the
   default setup for the new location (both locations are directories on the same
   server, the original had been set up with the wrong name).
 * I was using Safari to follow the instructions at [http://codex.wordpress.org/Moving_WordPress](http://codex.wordpress.org/Moving_WordPress)–
   the first option, moving WordPress within your site (changing the URI).
 * at “6. Click Update Options” Safari got stuck bouncing back and forth between
   the old and new directories (repeated and irresoluble redirects), so I was not
   really able to do “7. Logout of your blog.”, and in effect may have violated “
   i. (Do not try to open/view your blog now!).”
 * I then moved forward with “9. WordPress 2.0 only: Delete the folder wp-content/
   cache.” and “10. Move your WordPress core files to the new location. This includes
   the files found within the original directory, such as [http://example.com/wordpress](http://example.com/wordpress),
   and all the sub-directories, to the new location.”
 * I moved everything – and I do mean everything – via FTP’ing my local copies from
   the old directory up to the new one. I’ve done this twice now, with the same 
   result.
 * Any suggestions?
 * Thanks,
    M.
 *  [1massing](https://wordpress.org/support/users/1massing/)
 * (@1massing)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end/#post-150272)
 * The eventual resolution was resetting wp_options>siteurl to the target directory
   through phpMyAdmin. I then locally backed up (again) the previously working files
   from the old directory, emptied the target directory (not entirely sure that 
   was the thing to do), and this time moved the files directly over from one peer
   directory to the other on the server, using ftp (but not complicating things 
   with a download and upload as I’d done before, which might have corrupted some
   files or the directory structure).
 * After that there was a fair amount of reconfiguring and/or reinstallation of 
   plug-ins, but I was no longer looping when trying to administer the site, or 
   running into a wall of fairly generic error messages. Thanks to the forum for
   pointing me (in another thread) to the solution.
 * Best to all,
    M.

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

The topic ‘Parse error: syntax error, unexpected $end…’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 3 replies
 * 2 participants
 * Last reply from: [1massing](https://wordpress.org/support/users/1massing/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-end/#post-150272)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
