0

My website keeps showing HTTP ERROR 500 and I'm not sure what's causing it

Website URL

I tried a couple of debugging ideas like removed my .htaccess and renaming the Plugins folder, but still no luck

I check the error_log file and here's what i found

[15-Nov-2017 17:47:35 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:47:54 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:11 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:14 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:16 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:17 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:19 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:20 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:22 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280

The thing is, my functions.php folder has only 234 lines of code

This is a business website, help me please

3
  • Go to wp-content/themes/theme2/functions.php and open it with notepad ++ or another editor. You will probably see a not closing <?php tag or something relative on line 280. Commented Nov 15, 2017 at 19:01
  • @Drupalizeme I feel so stupid right now, I was checking the functions.php file of another directory, anyway It works now, thanks for your help Commented Nov 15, 2017 at 19:07
  • No worries(fast fix) :) Commented Nov 15, 2017 at 19:09

2 Answers 2

0

For future reference you could use the define( 'WP_DEBUG', true ); at your wp_config to easily spot errors and turn to false when you are done.

Enabling WP_DEBUG will cause all PHP errors, notices and warnings to be displayed. This is likely to modify the default behaviour of PHP which only displays fatal errors and/or shows a white screen of death when errors are reached.

It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs.

More info here

4
  • after define( 'WP_DEBUG', true ); where is log should be save? @Drupalizeme
    – Gem
    Commented Jun 20, 2019 at 10:07
  • @Gem WP_DEBUG_LOG is a companion to WP_DEBUG that causes all errors to also be saved to a debug.log log file inside the /wp-content/ directory. This is useful if you want to review all notices later or need to view notices generated off-screen (e.g. during an AJAX request or wp-cron run). Commented Jun 20, 2019 at 10:36
  • There is no debug.log in my /wp-content/ file, actually my website returns HTTP 500 error, how can i debug where is the error? @Drupalizeme
    – Gem
    Commented Jun 20, 2019 at 10:42
  • @Gem This is just a thread to solve one problem. If you need further help I propose to post a new question and ask there with the appropriate resources. Commented Jun 22, 2019 at 15:02
0

HTTP ERROR 500 is an error on you code.

As see on you logs:

[15-Nov-2017 17:47:35 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:47:54 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:11 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:14 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:16 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:17 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:19 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:20 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280
[15-Nov-2017 17:48:22 UTC] PHP Parse error:  syntax error, unexpected '<' in /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php on line 280

There is an error with your /home/igts160XXXXX1/public_html/wp-content/themes/theme2/functions.php and forced the HTTPS ERROR 500 to display.

You didn't include the error on line 280 on your error.log so i can't determine what really the error is. But there are sample functions.php everywhere on Google and the Internet.

I can help you if you can update the question with the error itself or the line of code within the function.

You could use the define( 'WP_DEBUG', true ); at your public_html to easily spot errors and turn to false when you are done. Find that inside your wp-config.php file using SFTP and make sure the value is true.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.