Title: Parse error: syntax error
Last modified: August 21, 2016

---

# Parse error: syntax error

 *  [montymcmahon](https://wordpress.org/support/users/montymcmahon/)
 * (@montymcmahon)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-81/)
 * I just made a small update to a .php file that broke the whole site. I got this
   error message.
 * Parse error: syntax error, unexpected ‘:’ in /home/avchirop/public_html/wp-content/
   themes/wp_medi5-v1.0/panel/generic.php on line 478
 * This is the code on that line of the file:
 * $text = preg_replace(‘/:year:/’, date(‘Y’), $text);
 * Odd thing is I didn’t even change anything on that line.
 * Also odd, I installed a backup of the file and that still didn’t fix the problem.
 * Can anyone tell me what’s going on here?

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

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-81/#post-4816451)
 * Did you change a line above it somewhere? The times that I’ve seen that error
   before is when I’ve forgotten to add a closing ‘ somewhere and it’s bubbled down
   the code until it’s found the next ‘ and used that one.
 * What text editor are you using? If you’re not already I’d realyl suggest that
   you use one that does syntax highliting. That lets you see errors a whole lot
   easier, and will help to see just where problems like this are really happening.
 *  Thread Starter [montymcmahon](https://wordpress.org/support/users/montymcmahon/)
 * (@montymcmahon)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-81/#post-4816559)
 * I did change a line above it. I ultimately restored a backup file, edited it 
   again and it worked fine.
 * I was doing all of this in TextEdit. Do you have any suggestions on something
   that lets you see syntax errors as described?
 * Editing .php is not my forte. Just figuring it out as I go along.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-81/#post-4816683)
 * For editing I use a free program called Komodo Edit. There’s a paid version that’s
   a full IDE, but I haven’t found the need for that yet, and I wouldn’t suggest
   that you pay for the full version yet either. Get to know it and see how you 
   feel. There’s a lot of other programs out there too, and it may take some time
   to find one that suits you and the way that you want to work.

Viewing 3 replies - 1 through 3 (of 3 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/)
 * 3 replies
 * 2 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-81/#post-4816683)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
