Fix the 500 Internal Server Error in WordPress

Guys I have faced HTTP 500 internal server error many times. The one and only cause was that I have made some changed in function.php file. Whenever I changed something in inc/functions.php I could not access my dashboard and whole site.

I have gone through many online solutions but I found solutions of only

-htaccess file corruption

-Error with plugin

-Memory exceed etc etc

But I could not find specific solution for modifying functions.php. Some answer suggested me to contact my hosting provider but I know this problem is not from hosting provider. So I had to delete all the files from CPanel and start from scratch. I was already upset because I had many important posts which got deleted. I installed the theme again and started from initial stage. But after few weeks again whenever I customized some code in functions.php, again the same 500 internal server ERROR occurred. Again I gone through many online tutorials for solving. I could not find my solution.

Finally I came out with an IDEA. The problem was neither from plugin nor from corrupted htaccess. I knew the problem was from internal modification of the theme’s function. The I came up with the GREAT solution.

Lets solve step by step.
  • You can’t access you dashboard or site but still you can access your FTP or CPanel.


  • Login to CPanel > File Manager > Public_html > wp-content> themes (delete your active theme because problem occurred because of theme).


  • Once you delete the theme now you can access you can login to WordPress again. If you reload your site your will get the error saying current theme is not available error. Even though you have deleted your theme still your data are safe.


  • Now all you have to do is install the theme that was active before occurrence of the error.


  • You get your site back with no any change and effect.

You can edit functions.php as much as you like until you get your desired changes because you can recover you site with this technique.

This problem occurs because invalid code format in functions.php file. In most of the cases the problem of 500 internal server occurs because of the plugin. In that case you have to manually check plugin from file manager.