WordPress HTTP ERROR 500
WordPress Admin did not load after logging in, instead you got that error page? There are several reasons for getting this error, the following could be one of the possible solutions.
Make sure you have WordPress debugging & error logging enabled in your
wp-config.php file. Don’t know how to do that? Look for a line
WP_DEBUG inside the
wp-config.php file and change the false to true. Also add this line
define( 'WP_DEBUG_LOG', true ); below it. So they need to look like this:
Now check whether the
debug.log file inside your
wp-content folder contains a php notice about sidebar similar to below.
[11-Apr-2019 06:19:00 UTC] PHP Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Social Profiles" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /wp-includes/functions.php on line 4667
If it does then you need to have the line
'id' => 'something' inside your register_sidebar() function right after the
'name' => line in your theme’s
functions.php file where you have registered your widgetized areas.
id is kinda required now, been that way since WP 4.2 I believe. This is not a CSS id, you just use this id [or the name] in the dynamic_sidebar() function to specify which widgetized area you want to display in your theme. So this id can be a number or a word, doesn’t matter, just make sure to have it in your
functions.php, the above php notice won’t appear again and you won’t get the 500 error after logging into WP Admin.
So if this was your theme’s
register_sidebar() function BEFORE:
This will be the AFTER: