1

I uploaded a brand-new wp install to my host. I am able to access the admin, and all its settings just fine, but I get a 500 internal error on the front-end.

I have tried solving this issue by:

  • checking .htaccess
  • checking wp-config.php
  • checking for missing core files
  • doing a permalink reset
  • checking file permissions
  • switching themes
  • disabling all plugins
  • using a default theme
  • server config (i have a vps with other sites working just fine under the same config).

What else can I check for? Could setting up wordpress under one php version and then moving it to another server under another php version cause this issue?

My .htaccess file has what you would expect.

# 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
3
  • Have you tried downloading a fresh copy of WP? If this is a brand new installation nothing will be lost and probably will take less time.
    – lmseo
    Jun 4, 2015 at 19:19
  • Can you show us the content of your .htaccess? Or do you use a nginx server? If so, check this question.
    – user40422
    Jun 4, 2015 at 19:53
  • I use apache. The .htaccess has the basic wordpress rewrite on. Nothing else. I can update the answer with it, but it's what you get when you choose a permalink structure.
    – gdaniel
    Jun 4, 2015 at 20:04

3 Answers 3

1

My problem had to do with file permissions. Even though it looked like the permissions were correct, the index.php in the root had the permission set to 644, instead of 664. Once I changed the permission the front-end loaded. It's a bit odd that of all files in the root, the index is the only one with the wrong permission.

2
  • Do you know what the root cause was of the permissions change please? :) Feb 15, 2016 at 17:14
  • 1
    Never found out. But if you have permissions issues with wp and your host. See if you can change the permission handler from apache to suphp, or Fast CGI. SUPHP doesn't have owner/group issues. It's good to note that suphp is a bit slower than apache, but you will only notice issues on really big sites.
    – gdaniel
    Feb 15, 2016 at 17:32
1

It can be simple mistakes in your code too.In my case I had forgotten the php closing tag and started another opening tag in the header file

0

I have been chasing my tail for hours trying to find this problem, and it wound up being that the theme codebase from my project was developed on a PHP 5.* environment and I had it setup on PHP 7.2... and the code had the old <? opening tag (now deprecated, with no php after the question mark in the opening tags) all over the place. I had to hunt them all down and add the php so they looked like this <?php.

Try doing a search for <? with the white space after the question mark, then switch the search mode to REGEX and use <\?\n as the string to look for line returns after the question mark.

I made a YouTube about finding these little <? buggers awhile back, if it helps anyone:

PHP HOW TO FIND: "Parse error: syntax error, unexpected end of file in..." https://www.youtube.com/watch?v=dzXaQ3cttRU

1
  • Welcome to WPSE! Note that this isn't the solution to the original question. The OP solved their own problem and posted the solution as an answer. I'd recommend that you ask a new question—possibly linking to this one if you feel it's relevant—and then answer it yourself. (Your answer solves a problem, just not the problem occurring here.)
    – Pat J
    Apr 22, 2021 at 18:18

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.