Recently I added code to my theme’s function.php file, but after some when I visit my WordPress admin area it shows ERROR 500|INTERNAL SERVER ERROR. I was shocked how it happens. Firstly I thought this error is from the server and will automatically solve but on the next day the failure is still there I google about this, but nothing found there only I got the hint that checks your recent activity then I remember that I edited the function.php file.But there are many reasons by which you can get this type of error, so here is the solution.
The error caused by any plug-in:
Sometimes if you install any plug-in from an unknown source and that plug-in was damaged, then this is possible to get the error. How to solve this?
1.) Login to your FTP server (through FileZilla)
2.) Go to root>wp-content: and change the name of plug-in folder to _plug-in
3.) Then check is your site loading. If your site is not getting an error, it means one or more plug-in is affected. First backup Your Plug-in Folder
4.) Again rename your _plug-in folder to plug-in
5.) Now delete one by one all plug-in and check is your site loading after removing the plug-in.
Do this every time you delete any plug-in if your site loading by remove any plug-in it means that plug-in was effected .simply uploaded other plug-ins which you deleted and remove that effected plug-in. if you are still getting an error after removing your plug-ins then maybe your theme is infected Failure caused by any theme
6.) Login to your FTP server (through FileZilla)
7.) Go to root>wp-content: and change name of the themes folder to _theme
8.) Then check is your site loading. If your site not getting error it means one of your
themes defects First backup Your Theme Folder
9.) Again rename your _Theme folder to theme
10.) Now delete one by one, your theme and check is your site loading after removing theme.
Do this every time you delete any theme if your site loading by removing any theme it means that theme was effected .simply uploaded other plug-ins which you deleted and remove that effected theme Or if you edited your theme’s file like me then remove your codes which you wrote before, and your problem is solved.