Title: Parse error: syntax error&#8230;
Last modified: August 20, 2016

---

# Parse error: syntax error…

 *  Resolved [moriahmac](https://wordpress.org/support/users/moriahmac/)
 * (@moriahmac)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/)
 * Hello!
 * I was just in trying to edit my “functions.php” file in my Magpress theme. I 
   copied in a code to change my excerpt character length.
 * When I tried to view my page afterwards, this error came up:
    Parse error: syntax
   error, unexpected ‘<‘ in /home/jere7827/public_html/wp-content/themes/magpress/
   functions.php on line 152
 * I get the same error whenever I try to load my domain name and now I am unable
   to log into my dashboard or anything! I used my webbrowsers back button and was
   able to get to the file I had edited, but even after deleting the code I inserted
   in and updating file, I still get the error.
 * Any advice on how to proceed would be much much appreciated.
 * I’ve read other forums about similar problems and I feel maybe I am supposed 
   to go to my cPanel and to something there…. I’m not exactly sure what to delete
   and if I do delete something, will that delete everything I have done to my site
   so far?
 * I have also contacted my theme provider as I’m unsure who I should be dealing
   with about this.
 * Thanks in advance for any help with my site I’m working on:
    [http://www.jeremystolow.com](http://www.jeremystolow.com)
 * MM

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

 *  [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181466)
 * This is why we NEVER edit core theme or WP files. Especially if you don’t have
   the experience to “fix” anything you might break.
 * What you need to do is upload a fresh copy of your themes `functions.php` file
   to your installation. You can do this either with an FTP account, or via your
   hosts CPanel.
 * Navigate to “wp-content/themes/MY_THEME” where `MY_THEME` is the folder name 
   if your currently active theme.
 * Once there, look for the `functions.php` file, and upload your fresh copy, over-
   writing the original.
 *  Thread Starter [moriahmac](https://wordpress.org/support/users/moriahmac/)
 * (@moriahmac)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181475)
 * Hi Josh,
 * I realize now I shouldn’t have tried to edit that part of the code, but the instructions
   I received from another website made my modification seem simple…a cut and paste…
   which was not the case clearly! I’m just learning 🙂 Maybe the hard way!?
 * In my cPanel, I found my functions.php file, it says it was last modified today
   at 1:17pm… do I just highlight that file and then press the upload button at 
   the top of cPanel? Won’t that just upload the file I tried to edit, the one I
   modified at 1:17 pm?
 * Thanks!
 *  [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181477)
 * You need to download a fresh copy of your theme. Then, find the `functions.php`
   file. This is the “new” file (un-modified by you).
 * Now, in your cPanel.. you already found the “old” `functions.php` file.
 * So, you want to upload a new file to that same directory… and choose your “new”`
   functions.php` file to upload. You should get a prompt saying “A file with that
   name already exists… do you want to proceed?”, or something like that… just click“
   Yes” or “Confirm” to over-write the “old” file with your “new” one.
 *  Thread Starter [moriahmac](https://wordpress.org/support/users/moriahmac/)
 * (@moriahmac)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181485)
 * Phew!!! Thanks for the clear instructions. That worked!!
 * My site is back up and working again.
 *  Thread Starter [moriahmac](https://wordpress.org/support/users/moriahmac/)
 * (@moriahmac)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181487)
 * Thanks again.
 *  [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181511)
 * 🙂 You bet!!
 * You may also want to look into using a [child theme](http://codex.wordpress.org/Child_Themes)
   to make modifications to your `functions.php` and `style.css` files in the future.
 * It looks a little daunting at first glance… but it’s really very easy.

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

The topic ‘Parse error: syntax error…’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [Josh](https://wordpress.org/support/users/josh401/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-50/#post-3181511)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
