Theme I have has error with Digitalocean, but not other host!

June 6, 2017 1.4k views
WordPress Ubuntu 16.04

The theme I have on gives me a ‘http error 500’ any time I try to view one of my post. I tried deleting all plugins, editing my htacces file (however it wasn’t in the same folder as wp-content, wp-includes, etc). I even deleted my droplet and tried reinstalling it. It’s not the theme because I bought a hostgator plan and it works just fine on there.

Any help would be loved as I love digital ocean!

2 Answers

Hi @ensurance

My guess would be that your theme is doing something, which is not compatible with PHP 7.0, which is the default version delivered with Ubuntu 16.04

Have a look in your Apache log file to get more details - run this command:

tail -30 /var/log/apache/error.log
  • Thanks for the reply, I took a look at the error log and it said ‘syntax error, unexprected 'endwhile’ (T_ENDWHILE) in /var/www/html/wp-content/themes/rosatube/single.php on line 128’

    What should I do to fix that?

    • @ensurance
      Have you created that theme or did you buy it?
      If you created the them, then you need to edit the file and have a look at line 128, which is probably ending a loop too soon - look for an extra } character.
      If you have bought the theme, then you need to see if there is an updated version of the theme, which fixes this - or contact the author.


If you’re able to post single.php, we can take a closer look to see if there’s anything we can spot if you’re unable to. A second set of eyes generally helps :-).

WordPress generally uses:

while ( expr ) : 

    do stuff ....


So you’re most likely missing the endwhile; at the end (at least according to that error).

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!