{"id":7937,"date":"2020-05-27T16:00:30","date_gmt":"2020-05-27T10:30:30","guid":{"rendered":"https:\/\/vividreal.co.in\/vividreal\/?p=7937"},"modified":"2020-05-27T16:00:30","modified_gmt":"2020-05-27T10:30:30","slug":"how-to-fix-500-internal-server-error-in-wordpress","status":"publish","type":"post","link":"https:\/\/vividreal.co.in\/vividreal\/how-to-fix-500-internal-server-error-in-wordpress\/","title":{"rendered":"How to Fix 500 Internal Server Error in WordPress?"},"content":{"rendered":"<p><span style=\"color: #000000;\">What is a 500 Internal Server Error?<\/span><\/p>\n<p><span style=\"font-weight: 500;\">One most common error that a WordPress website owner comes across as is a 500 internal server error. These errors are frustrating because they don\u2019t have a specific reason and can be confusing to figure out what went wrong.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">500 Internal server error is an HTTP status code indicating that there is some issue on the host server or within the root directory.\u00a0 However, the cause of this error doesn\u2019t necessarily have to be based on one single reason. There are multiple instances when this status code is displayed and <\/span><span style=\"font-weight: 500;\">is rarely an actual server error<\/span><span style=\"font-weight: 500;\">.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">An internal server error is not exclusive to WordPress, it can occur on any website at any time. Most of the time an internal server error is displayed as an error message or simply a blank white page. Meanwhile, bigger brands have their custom error message for internal server error.\u00a0<\/span><\/p>\n<p>If you are in need of professional assistance to fix 500 internal server error for your WordPress website, feel free to connect with <a href=\"https:\/\/vividreal.co.in\/vividreal\/web-development\/\">our team of expert web developers<\/a>.<\/p>\n<p><span style=\"font-weight: 500;\">In this article, we\u2019ll be telling you some good solutions to fix Internal server error.<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>1. Reload the page<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">Let\u2019s start with the very basic step: try loading the page again. If a website is being reloaded while it\u2019s processing the old request, a new request will be sent to the server at the same time with the first one forcing the server to respond.<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Another way to identify the issue is to make use of sites (tools) that check whether a website is down or not. If these tools receive anything other than HTTP 200 status code (Everything is OK), then it indicates that the website is down.\u00a0<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>2. Clear browser history<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">Clear the browser history and then try to reload the page. This should be one of the first steps to be taken before proceeding with any deeper debugging step on your website.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>3. Debugging<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">WordPress offers a provision to debug using its built-in debugging feature. Debugging may not necessarily fix the problem but it can provide some insights on the issue.<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Here\u2019s WordPress\u2019s debugging process explained in simple steps.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 500;\">Access your site\u2019s wp-config.php file from the root folder of the website.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 500;\">Inside the file, search for \u201c<\/span>WP_DEBUG<span style=\"font-weight: 500;\">\u201d (which is a PHP constant used as a permanent global variable for debugging purposes in WordPress).\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 500;\">Now set the variable WP_DEBUG as \u201ctrue\u201d to start with the debugging process.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 500;\">It should look like this:<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">define( &#8220;WP_DEBUG&#8221;, true );<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Reload the website after saving this change and if this error gets fixed, a new error will definitely pop up. Now, this new error will help you figure out what the exact problem is. Moreover, you may observe the error location and fix it right away! If it points to a plugin folder, you can easily deactivate the plugin to remove the error.<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>4. Plugins and themes<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">Plugins and themes are an inevitable part of WordPress and there are chances of encountering a 500 internal server error because of this<\/span><span style=\"font-weight: 500;\">.<\/span><span style=\"font-weight: 500;\"> An error can occur immediately after installing a plugin\/theme or while running an update for the same.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">One way to troubleshoot this is to deactivate all your plugins and reload the website to check if they were the ones causing the error. Deactivation is recommended over deletion because you wouldn\u2019t lose any of your data in the former\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Now reactivate them one at a time and try reloading the website each time. This way you can easily figure out the plugin causing the problem. You can connect with the plugin developer and ask for help or post about it in the WordPress support forum.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-7938 aligncenter\" src=\"https:\/\/vividreal.co.in\/vividreal\/wp-content\/uploads\/2020\/04\/2020-04-08-2.png\" alt=\"WP_Screenshot_Eg\" width=\"1366\" height=\"620\" srcset=\"https:\/\/vividreal.co.in\/vividreal\/wp-content\/uploads\/2020\/04\/2020-04-08-2.png 1366w, https:\/\/vividreal.co.in\/vividreal\/wp-content\/uploads\/2020\/04\/2020-04-08-2-300x136.png 300w, https:\/\/vividreal.co.in\/vividreal\/wp-content\/uploads\/2020\/04\/2020-04-08-2-1024x465.png 1024w, https:\/\/vividreal.co.in\/vividreal\/wp-content\/uploads\/2020\/04\/2020-04-08-2-768x349.png 768w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/p>\n<p><span style=\"font-weight: 500;\">If this doesn\u2019t work because you are unable to access the admin side, access your FTP server, SFTP server or hosting account\u2019s Cpanel dashboard. Rename all the plugins folder as something like old_plugins and try reloading the website again.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">If the site gets reloaded, you rename the folder to its old name, start renaming each plugin inside the folder and simultaneously reload the website. If this works, you\u2019ve figured out the culprit!<\/span><\/p>\n<p><span style=\"font-weight: 500;\">The same thing goes with the theme as well, at times certain themes can cause such errors (while installing or updating). Check the themes just like the way you did with the plugins. Also, use the WordPress default theme (optimized theme) if there are any theme related issues.<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>5. Database connection error<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">A database connection error is the most commonly observed error in WordPress. This error occurs when there is an error while the PHP code tries to establish a connection with the MySQL database. As the website is unable to establish a connection with the server, this error is always shown on a blank page.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">This can occur for 2 reasons; one simple reason is that the login credentials may be incorrect, while the other one is that there are chances for a database error.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>6. Reinstall WordPress<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">At times some old sites can get an internal server error when some core WordPress files get corrupted. Reinstalling WordPress can be done without affecting the already installed plugins or themes.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Try re-uploading the <\/span>wp-admin and wp-includes folders once the new WordPress is installed using these simple steps:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Download the WordPress zip file from the WordPress.org site.\u00a0<\/span><\/li>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Extract the WordPress file and access the WordPress folder.\u00a0<\/span><\/li>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Connect the WordPress website via an FTP client.<\/span><\/li>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Once you get the access, you can view the folder which contains wp-admin, wp-includes, and wp-content.\u00a0<\/span><\/li>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Open the WordPress folder from your computer and select wp-admin &amp; wp-includes to upload them.\u00a0<\/span><\/li>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">The FTP client now transfers the file to the server and asks if it should be overwritten.\u00a0<\/span><\/li>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Now select \u2018overwrite\u2019 and \u2018Always use this action\u2019.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"color: #00ccff;\"><b>7. Permission error<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">Sometimes even a permission error can be a reason showing an internal server error. Even though the chances of such an error occurring is very less, let\u2019s not spare a possibility to remove error 500.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Access your WordPress root directory using an FTP client and check if the permission for files and folders are set to either <\/span>755 or 644<span style=\"font-weight: 500;\">. Also, remember setting it to any other number would cause an error.<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>8. Expand PHP memory limit<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">An exhausted PHP server memory can be one reason for an internal server error. This can be resolved if the PHP memory limit is increased.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">There are chances for a 500 error code showing up while trying to log in the WordPress admin or when uploading an image in wp-admin, at those instances you can expand the memory limit using the following steps.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 500;\"><span style=\"font-weight: 500;\">Create a new file,<\/span> php.ini in the root directory<\/li>\n<li style=\"font-weight: 500;\">Write the code, memory=64MB on it.<\/li>\n<li style=\"font-weight: 500;\">Save and upload it in wp-admin via FTP server, SFTP server or hosting account\u2019s Cpanel dashboard.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Or the same thing can be done by accessing your site\u2019s wp-config.php file from the root folder of the website and search for \u201cWP_MEMORY_LIMIT\u201d within. Now change its value to \u201c64M\u201d.<\/p>\n<p><span style=\"font-weight: 500;\">It should look like this:<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">define(&#8216;WP_MEMORY_LIMIT&#8217;, &#8217;64M&#8217;);<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Don\u2019t be relieved if this code fixed your error, now you need to figure out what is exhausting the PHP memory. A poorly-developed plugin or theme function can cause this, while it&#8217;s highly recommended if you can contact your hosting provider and get details from the server logs.<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>9. Check your .htaccess file<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">A corrupted .htaccess file is one of the most common reasons for internal server error if your WordPress host is running on Apache.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Access your FTP server, SFTP server, or hosting account\u2019s Cpanel dashboard and rename your .htaccess file into .htaccess_old. Now, if the website reloads, the error is fixed!<\/span><\/p>\n<p><span style=\"font-weight: 500;\">You can create a new .htaccess file with the following contents, and then upload it to the server.<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\"># BEGIN WordPress<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">&lt;IfModule mod_rewrite.c&gt;<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">RewriteEngine On<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">RewriteBase \/<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">RewriteRule ^index\\.php$ &#8211; [L]<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">RewriteCond %{REQUEST_FILENAME} !-f<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">RewriteCond %{REQUEST_FILENAME} !-d<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">RewriteRule . \/index.php [L]<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\">&lt;\/IfModule&gt;<\/span><\/p>\n<p style=\"padding-left: 80px;\"><span style=\"font-weight: 400;\"># END WordPress<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Or you can directly go to <\/span>Settings \u00bb Permalinks<span style=\"font-weight: 500;\"> page in the WordPress admin part and save the data on it without making any changes. This action will generate a new .htaccess file.<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>10. PHP timeouts<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">Error 500 can occur during PHP Timeouts. A PHP timeout is a result of a lack of PHP workers.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">For example, you have 4 requests coming to the website at the same time, with you having only 2 PHP workers. Now 2 requests out of them would be processed immediately while the other 2 requests need to wait until the others finish.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Processing further requests can happen instantly if there are no complex themes or a lot of plugins used on the website. The problem arises when there are too many requests and it would be left uncached if the PHP workers can\u2019t handle them. So it&#8217;s always advisable to estimate the number of PHP workers you require for the website and work over it.\u00a0<\/span><\/p>\n<p><span style=\"color: #00ccff;\"><b>Conclusion<\/b><\/span><\/p>\n<p><span style=\"font-weight: 500;\">When the website goes down, you are losing a lot of visitors and affecting website traffic seriously along with degrading the brand name! On top of that, Google detects such occurrences on a website and can demote the website to alert that the error needs to be addressed.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Make sure that all your website\u2019s plugins, themes, and WordPress core files are up-to-date.\u00a0 Ensure that the theme you use is compatible with your plugins.<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Use tools that monitor any kind of error occurring on your website so that you can have a track on them. These tools can alert you whenever the site goes down by simply sending you an email. This also means that it can monitor and pass information to you even at an interval of 15 seconds.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 500;\">Ask your hosting provider for support if all these techniques didn\u2019t help you figure out the reason for a 500 internal server error. You can ask them to check the server logs and identify the root cause for the error. <\/span><\/p>\n<p><span style=\"font-weight: 500;\">If all of this seems confusing to you, do not worry! <a href=\"https:\/\/vividreal.co.in\/vividreal\/web-development\/\">Our team of expert website developers<\/a> can definitely help you fix the\u00a0500 internal server error for your WordPress website.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a 500 Internal Server Error? One most common error that a WordPress website owner comes across as is a 500 internal server error. These errors are frustrating because they don\u2019t have a specific reason and can be confusing to figure out what went wrong.\u00a0 500 Internal server error is an HTTP status code [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":7964,"comment_status":"closed","ping_status":"open","sticky":false,"template":"wpb-single-post.php","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[34,38,183],"tags":[58,106],"class_list":["post-7937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-web-development","category-wordpress","tag-digital-marketing","tag-website"],"_links":{"self":[{"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/posts\/7937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/comments?post=7937"}],"version-history":[{"count":0,"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/posts\/7937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/media\/7964"}],"wp:attachment":[{"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/media?parent=7937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/categories?post=7937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vividreal.co.in\/vividreal\/wp-json\/wp\/v2\/tags?post=7937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}