{"id":396,"date":"2021-04-22T07:26:06","date_gmt":"2021-04-22T07:26:06","guid":{"rendered":"https:\/\/wpboffins.com\/?p=396"},"modified":"2021-11-28T11:04:37","modified_gmt":"2021-11-28T05:04:37","slug":"fix-internal-server-error","status":"publish","type":"post","link":"https:\/\/wpboffins.com\/fix-internal-server-error\/","title":{"rendered":"How to Fix Internal Server Error in WordPress"},"content":{"rendered":"<p>The <strong>internal server error<\/strong> is one of the most common WordPress errors. Mostly, this error occurs on the root directory, where the root files are located. It&#8217;s a frustrating issue for many beginners as the internal server error doesn&#8217;t give any other information.<\/p>\n<p>So are you looking for <strong>how to fix the internal server error in WordPress<\/strong>? Then read this article as I have given all the possible solutions to fix the error. Let&#8217;s go:<\/p>\n<p><!--more--><\/p>\n<figure id=\"attachment_674\" aria-describedby=\"caption-attachment-674\" style=\"width: 840px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-674 size-full wpbShadow\" src=\"https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/internal-server-error.jpg\" alt=\"internal-server-error\" width=\"840\" height=\"199\" srcset=\"https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/internal-server-error.jpg 840w, https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/internal-server-error-300x71.jpg 300w, https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/internal-server-error-768x182.jpg 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><figcaption id=\"caption-attachment-674\" class=\"wp-caption-text\">Internal Server Error<\/figcaption><\/figure>\n<h2><strong>What Causes an Internal Server Error?<\/strong><\/h2>\n<p>There are\u00a0several possible culprits, namely:<\/p>\n<ul class= \"boffin-default-list\">\n<li>Plugins<\/li>\n<li>Topic<\/li>\n<li>WordPress installation<\/li>\n<li>.Htaccess\u00a0file<\/li>\n<li>PHP memory<\/li>\n<li>Your hosting<\/li>\n<\/ul>\n<p>To know more about them, my suggestion is to read all the contents given below:<\/p>\n<h2><strong>Regenerate the .htaccess File<\/strong><\/h2>\n<p>To eliminate the biggest suspect of an internal server error, I always start by checking the .htaccess file.<\/p>\n<p>The problem with this file is that\u00a0there are many plugins that add lines to it, so\u00a0sometimes guessing what could have caused the problem is difficult, especially if you do not have server knowledge.<\/p>\n<p>So the easiest, and safest, is to do the following:<\/p>\n<ol>\n<li>Access by FTP or the cPanel of your hosting and rename the current .htaccess file to something else.<\/li>\n<li>If you go to your site and the internal server error has been fixed, go to your WordPress dashboard, that is, to https:\/\/yourdomain.com\/wp-admin\/<\/li>\n<li>Go to\u00a0Settings&gt; Permalinks\u00a0and\u00a0Save changes\u00a0without modifying any\u00a0settings.<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-677 wpbShadow\" src=\"https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/htaccess-permalink.jpg\" alt=\"htaccess-permalink\" width=\"1341\" height=\"372\" srcset=\"https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/htaccess-permalink.jpg 1341w, https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/htaccess-permalink-300x83.jpg 300w, https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/htaccess-permalink-1024x284.jpg 1024w, https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/htaccess-permalink-768x213.jpg 768w\" sizes=\"(max-width: 1341px) 100vw, 1341px\" \/><\/p>\n<p>What you have done is\u00a0force WordPress to generate a new\u00a0clean\u00a0.htaccess file, only with the WordPress rules, and by the way, you already know that it was something in the old .htaccess\u00a0that was causing the error.<\/p>\n<p>Now you have to check what was in that file, that is why you have the copy, which caused the error.<\/p>\n<h2><strong>Disable Plugins<\/strong><\/h2>\n<p>The next possible culprit is plugins, simply because they\u00a0can load functions that insert lines into the\u00a0.htaccess\u00a0file\u00a0or break WordPress\u00a0and your entire installation if there is a programming problem.<\/p>\n<p>Access your WordPress installation by FTP or cPanel and rename the plugins folder, change the folder that is in the path \/ wp-content \/ plugins \/ to something else, for example, \/ wp-content \/ plugins_rotos \/<\/p>\n<p>What you do with this is to deactivate all the plugins automatically, because WordPress does not find the standard path where the plugins are installed.<\/p>\n<p>Visit your site, and if the internal server error has been fixed, rename the plugins folder back to its original name.<\/p>\n<p>Now you will be able to access the WordPress dashboard again, but with all the plugins inactive.<\/p>\n<p>The following you already know, or imagine, right? You have to activate plugins one by one and check which one is causing the internal server error.<\/p>\n<p>Once located, deactivate it, rename its folder or delete it directly via FTP or your hosting panel, get in touch with the developer to let them know and offer you a solution, and look for an alternative plugin that offers you the same functionality but without mistakes.<\/p>\n<h2><strong>Change the Subject Temporarily<\/strong><\/h2>\n<p>If not the plugins,\u00a0also the active theme could cause an internal server error.<\/p>\n<p>Themes not only make your website look beautiful and functional, but they also include (more and more) internal functions, practically plugins, which, like your plugins, can cause an internal server error.<\/p>\n<p>Here the solution is similar to the previous one, and I will take advantage of a not very well-known WordPress trick, at least not as well known as I would like.<\/p>\n<p>Again, access your installation by FTP or cPanel and check if, in addition to the currently active theme, you have installed a recent default WordPress theme.<\/p>\n<p>If you don&#8217;t have any of these themes installed,\u00a0download it from the official WordPress themes directory and upload it to your WordPress installation themes folder\u00a0(\u00a0\/ wp-content \/ themes \/\u00a0).<\/p>\n<p>Once done, rename the current theme folder to whatever you want . For example, from\u00a0\u00a0\/ wp-content \/ themes \/ my-theme \/ to \/ wp-content \/ themes \/ my-broken-theme \/ .<\/p>\n<p>In a few seconds WordPress will detect that the current theme is not available in the path stored in the database and will switch to the first default theme. Now visit your site to see if this has fixed the internal server error.<\/p>\n<p>If so then talk to the developer, retrieve a clean copy of your favorite theme or find another that offers the same but without errors.<\/p>\n<p>You can also read: <a href=\"https:\/\/wpboffins.com\/fix-syntax-error-in-wordpress\/\">How to Fix Syntax Errors in WordPress<\/a><\/p>\n<h2><strong>Upload PHP Memory<\/strong><\/h2>\n<p>Another possible culprit may be that you have little memory for PHP, a directive that is usually set default by hosting companies, but that I can manipulate to some extent.<\/p>\n<p>If none of the above has worked this could be the problem, so I will try to force the available memory for PHP, the programming language that WordPress uses, its plugins, and themes a mass.<\/p>\n<p>This is because the processes on your website exceed the available memory at any time and may force internal server errors. For example, an automated task of a plugin that coincides with the publication of a post.<\/p>\n<p>Whatever it is, we&#8217;re going to increase the PHP memory limit to see if that was it. To achieve this I have to try to jump the limits imposed by the server, which I can achieve in several ways.<\/p>\n<h3><strong>Increase PHP Memory Limit from .htaccess<\/strong><\/h3>\n<p>Add\u00a0the following line to the\u00a0.htaccess\u00a0file\u00a0:<\/p>\n<pre>php_value memory_limit 512M<\/pre>\n<p>Save the changes and see if the internal server error has been fixed.<\/p>\n<h3><strong>Increase PHP Memory Limit from wp-config.php<\/strong><\/h3>\n<p>If the above does not work for you, delete that line and add this one to your\u00a0wp-config.php\u00a0file\u00a0:<\/p>\n<pre>define ('WP_MEMORY_LIMIT', '512M');<\/pre>\n<p>Again, save the changes and check your website to see if you no longer have the\u00a0Internal Server Error\u00a0under your nose.<\/p>\n<h3><strong>Increase PHP Memory Limit from php.ini<\/strong><\/h3>\n<p>If you have full access to all paths on your hosting, locate the PHP parameter configuration file, called\u00a0php.ini,\u00a0and change the PHP memory limit line to these values:<br \/>\nmemory_limit = 512M; Maximum amount of memory a script may consume (256MB)<\/p>\n<p>If you don&#8217;t have access to the path of the\u00a0original\u00a0php.ini\u00a0file\u00a0you can create one yourself in the\u00a0wp-admin\u00a0folder\u00a0and add the following:<\/p>\n<pre>memory_limit = 512M\r\n<\/pre>\n<h2><strong>And if All Else Fails, Call Your Hosting<\/strong><\/h2>\n<p>If none of the above solves the problem, talk to your hosting provider, and inform them about your hosting. They have access to your entire server, to the error logs, and will be able to more easily determine what caused the problem.<\/p>\n<p>In addition, they may increase the available memory, even temporarily, so that you can review the steps we have seen previously.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Anyone using WordPress has experienced an internal server error, at least once. As we have seen, solving an internal error 500 of the WordPress server is not that difficult if you know how to do it.<\/p>\n<p>It seems that in real life, the first thing to do is find out the cause of a problem. After that, you can use online sources, ask friends, developers, or even your hosting provider. But still, if you face any trouble, you can share your problem by commenting in the comment box below. Our expert community will help you very soon to solve your problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The internal server error is one of the most common WordPress errors. Mostly, this error occurs on the root directory, where the root files are located. It&#8217;s a frustrating issue for many beginners as the internal server error doesn&#8217;t give any other information. So are you looking for how to fix the internal server error [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":643,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[],"class_list":["post-396","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"jetpack_featured_media_url":"https:\/\/wpboffins.com\/wp-content\/uploads\/2021\/04\/4.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/posts\/396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/comments?post=396"}],"version-history":[{"count":0,"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/posts\/396\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/media\/643"}],"wp:attachment":[{"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/media?parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/categories?post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpboffins.com\/wp-json\/wp\/v2\/tags?post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}