Title: Unexpected &#039;endwhile&#039; (T_ENDWHILE)
Last modified: August 22, 2016

---

# Unexpected 'endwhile' (T_ENDWHILE)

 *  [EleonoraM](https://wordpress.org/support/users/eleonoram/)
 * (@eleonoram)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/unexpected-endwhile-t_endwhile/)
 * Hello,
    I was trying to instal existing website on virtual machine on my computer.
   Machine I use is VirtualBox and server is XAMPP. When I installed clean version
   of WordPress everything went ok, when I attached database it was no problem too.
   Just when I exported all files to my main folder I received this error: Parse
   error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in C:\xampp\htdocs\offroad\
   wp-content\themes\off_road\functions\theme.php on line 321
 * The file theme.php you can find [here](https://gist.github.com/anonymous/55353a4c17c5b31d3f78)
 * Site work without problem on it’s original server. Problem is that before I started
   to administrate it nobody was updating wordpress and it work on 3.3.1 version.
   My goal was to try updating first on virtual machine because I expect problems
   when doing it but I can not make it work on machine. I will be grateful for any
   help!

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/unexpected-endwhile-t_endwhile/#post-5408090)
 * there are some php shorttags like in line 221 (and possibly some more):
    `<? 
   endif; ?>`
 *  – not all servers understand them…
 * change them to full php tags; like:
 * `<?php endif; ?>`
 *  Thread Starter [EleonoraM](https://wordpress.org/support/users/eleonoram/)
 * (@eleonoram)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/unexpected-endwhile-t_endwhile/#post-5408146)
 * Thank you very much! That fixed my problem! I couldn’t fix it without your help!
   Thank you a lot for the time you spent to look at my issue.

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

The topic ‘Unexpected 'endwhile' (T_ENDWHILE)’ is closed to new replies.

## Tags

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

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 2 participants
 * Last reply from: [EleonoraM](https://wordpress.org/support/users/eleonoram/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/unexpected-endwhile-t_endwhile/#post-5408146)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
