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

  • 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. – Drupalizeme Nov 15 '17 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 – Ahmed El Sherif Nov 15 '17 at 19:07
  • No worries(fast fix) :) – Drupalizeme Nov 15 '17 at 19:09
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

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, privacy policy and cookie policy

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