• Hi,
    I’ve struggled for the last few days to migrate my blog from bluehost to a CentOS 7 VM instance on Google Cloud Compute Engine, but I’ve encountered a great problem. The wp-admin dashboard is working perfectly, yet the homepage or any other post page isn’t working but displaying a 500 server error: ‘Failed to load resource: the server responded with a status of 500 (Internal Server Error)’. I’ve used a few advices from the internet and I came to the conclusion that it is a theme problem. Can you help me with this and suggest any fix, please!

    You may check my site adding this string to your hosts file:
    130.211.63.172 moldovacrestina.md

    Or, if you want to see the working version of the site, check moldovacrestina.md before changing the hosts file. Thank you!

Viewing 14 replies - 16 through 29 (of 29 total)
  • Moderator James Huff

    (@macmanx)

    When? It should take more than 3 minutes to rebuild Apache with a new version of PHP.

    Thread Starter filatdav

    (@filatdav)

    The only data I’ve found so far is stored in httpd access_log. Here is what I found about that moment:
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$
    ::1 – – [19/Jun/2016:10:47:05 +0300] “OPTIONS * HTTP/1.0” 200 – “-” “Apache/2.4.6 (CentOS) PHP/5.4.16 (internal dum$

    Thread Starter filatdav

    (@filatdav)

    I updated it to php 7 right now!

    Thread Starter filatdav

    (@filatdav)

    But it seems php is not working at all now!

    Moderator James Huff

    (@macmanx)

    Note from your access logs, “Apache/2.4.6 (CentOS) PHP/5.4.16”

    Are your access logs now reporting PHP 7?

    Additionally, see where the 200 is? 200 means success. Look for a 500 in that column, note the date and time, then look for an entry in your error log at that *exact* date and time.

    Moderator James Huff

    (@macmanx)

    If PHP is not working at all, try restarting or recompiling Apache. If that doesn’t work, contact your hosting provider’s support.

    Thread Starter filatdav

    (@filatdav)

    I figured it out and now the php module is working fine, but the theme is not working anyway…

    Moderator James Huff

    (@macmanx)

    Ok, so I’ll return to my previous reply:

    Note from your access logs, “Apache/2.4.6 (CentOS) PHP/5.4.16”

    Are your access logs now reporting PHP 7?

    Additionally, see where the 200 is? 200 means success. Look for a 500 in that column, note the date and time, then look for an entry in your error log at that *exact* same date and time.

    Thread Starter filatdav

    (@filatdav)

    It seems that while I reinstalled php, it made some changes to the log files. But when I run the ‘php -v’ command, it confirms that PHP 7.0.7 is installed on the machine!

    Moderator James Huff

    (@macmanx)

    Ok, so what are the answers to both question?

    Thread Starter filatdav

    (@filatdav)

    Sorry for the delayed answer, but I messed the server really bad and I had to reinstall the OS on it and I reinstalled Ubuntu on it, but the problem persists.

    I’ve checked the PHP version and it is 7.0. Yet I turned on WP DEBUG and it shows a plenty of errors on the homepage! You can check the new installation at:

    104.155.101.60 moldovacrestina.md

    I beg your pardon once again and I’ve to thank you for your help! Hope we can figure out how to fix it!

    Moderator James Huff

    (@macmanx)

    Would you please quote the errors? I don’t have time to muck around in my hosts file today, sorry.

    Thread Starter filatdav

    (@filatdav)

    Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /var/www/html/wp-includes/functions.php on line 3897

    Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /var/www/html/wp-includes/functions.php on line 3897

    Notice: Undefined index: name in /var/www/html/wp-includes/class-wp-roles.php on line 128

    Notice: Undefined index: name in /var/www/html/wp-includes/class-wp-roles.php on line 128

    Notice: Metoda constructor apelat? pentru WP_Widget ?n tp_disqusrecentcomments este ?nvechit? de la versiunea 4.3.0! Folose?te ?n schimb
    __construct()
    . in /var/www/html/wp-includes/functions.php on line 3718

    Parse error: syntax error, unexpected end of file in /var/www/html/wp-content/themes/moldovacrestina/header.php on line 111

    Moderator James Huff

    (@macmanx)

    Sounds like the problem is either the theme or a plugin the theme is requiring.

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘500 server error after migrating to CentOS 7 –only homepage’ is closed to new replies.