0

I am new in wordpress and my site is down. After lots of research I get to know there may be some syntax error.

Can you please help to find is there any syntax error in code or not

My code

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
David
  • 4,266
  • 8
  • 34
  • 69

1 Answers1

1

An HTML 500 response code is a server error. The first thing you should do is check your error_log to find out what the error is. Look at a page with phpinfo(); and search for error_log, it will give you the path.

For the best error logging experience, set error_reporting to -1, turn display_errors off, and set a custom error_log. Then in the terminal, type tail -f /path/to/error_log. Your notices, warnings and errors will now scroll past in real time, without distorting your web page's display.

Once you have the error message, update your question or leave a comment on this answer and we will take it forward!

delboy1978uk
  • 12,118
  • 2
  • 21
  • 39
  • This is my error ` PHP Fatal error: Unknown: Failed opening required '/home/microso6/public_html/index.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in Unknown on line 0` – David Aug 29 '17 at 11:47
  • Awesome! So now you know that PHP failed to find the file `/home/microso6/public_html/index.php`. Can you confirm the file actually exists in that location? – delboy1978uk Aug 29 '17 at 11:48
  • Yes, File is exists in that location. But while opening file it is empty. I mean nothing is der to edit or something. – David Aug 29 '17 at 11:50
  • an empty index.php? Stick a = phpinfo(); ?> in it and see if it displays. – delboy1978uk Aug 29 '17 at 11:54
  • Well I placed `=phpinfo()>` and in error I am getting `[29-Aug-2017 11:54:59 Etc/GMT] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 [29-Aug-2017 11:54:59 Etc/GMT] PHP Fatal error: Unknown: Failed opening required '/home/data/public_html/index.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in Unknown on line 0` – David Aug 29 '17 at 11:57
  • Ok, now it begins to look like permissions errors. Which user runs the script? www-data? apache? You probably need to `chmod` or `chown` your site folders – delboy1978uk Aug 29 '17 at 11:59
  • well.. ok I am checking what those means are. I mean I am completely new here. I find the page. Let me check what permission error have. Thanks for help :) – David Aug 29 '17 at 12:00
  • cd into the folder and type `ls -la` to see the owner, group, and permissions – delboy1978uk Aug 29 '17 at 12:01
  • I am using window and do I need to open terminal. – David Aug 29 '17 at 12:10