Php script error 500

php script error 500

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all. Error 500 is likely to occur if the website you are visiting is hosted on a low-memory hosting solution such as a shared hosting account. If. 3. Check.htaccess Code In some cases, the “500 Internal Server Error” may be caused by specific instructions set in your.htaccess file. This file provides.

Php script error 500 - right! Idea

How to Resolve 500 Internal Server Error

The 500 Internal Server Error is perhaps the most annoying error you can encounter. In many instances, you can easily resolve the issue by applying the process outlined in this KB.

In a 500 Internal Server Error situation, the server has encountered an unexpected condition that prevents it from fulfilling the clients’ requests. Note that essentially, there is nothing wrong with the server itself. It has simply encountered something it can’t figure out.


Before making changes to the site’s code and database, it is always a good practice to take a full backup of the server, so that you can restore the site in case something goes wrong.

Resolving 500 Internal Server Error requires you to follow this process:

How to Resolve 500 Internal Server Error

Step 1: Debugging the Issue

The first step is to make sense of the situation and try to make sense of the error. For this, you need to check PHP logs (part of Apache error logs) for more information about the error.

If you are unable to find the error logs there, try enabling PHP error reporting by adding the following lines to the index.php file:

If you have a WordPress website, download the wp-config.php file (located in the website’s root directory) via SFTP and open it in your preferred text editor. Search for the string ‘WP_DEBUG’. If you find the line, simply change FALSE to TRUE and upload the file again.

If the line isn’t in the config file, add the following line to the wp-config.php file:

Reload the website and see if the error changes.

If it does, and you now see a ‘fatal error’ message that points to a specific line of code in a specific file, you’re looking at a relatively simple code error. Assuming that the said error originates from a plugin or theme, you’ll need to disable the offending product and/or work on fixing the issue yourself (or have someone else take a look at it if you’re not able to work out what’s happening on your own).


Once you have found the problem, remember to change the above-mentioned ‘TRUE’ value back to ‘FALSE’ within the wp-config.php file.

Step 2: Empty .htaccess File

An empty .htaccess file can also cause this error on all the internal pages. Therefore, add the following rules in your .htaccess file by remotely connecting to your server using SSH/SFTP.

Step 3: Debug .htaccess Issues

In many cases, rules in the .htaccess file can also cause 500 Internal Server Error. This is generally caused by rules that point to modules that are not installed/available at the Apache server.

Another scenario involves recursive rewrite rules that can end up in a 500 Internal Server error.

Step 4: Increase PHP Memory Limit

PHP libraries require a memory limit for the successful execution of PHP scripts. Increasing the available PHP memory limit from the Server and Packages tab can also fix the 500 Internal Server error. If you have defined a memory limit in the application configuration files, simply increase the value in these files. Changing the PHP memory limit will also help you avoid the “Allowed memory size” error.

Step 5: Check if the Admin Works

Log in to the admin panel for your website. If this page loads properly and allows you to log in, you can be reasonably sure that the issue is with a plugin/extension/module or with the active theme. If the admin page loads, move on to Step 4.

Step 6: Revert Recent Changes

If your dev team pushed changes just before the 500 error was reported, you should try to revert back to the last available version. This way, you could eliminate a very probable source of the error.

It is always a good practice to test the changes on a staging website/environment to make sure everything works as intended. To help our users, the Cloudways Staging feature provides dedicated and unlimited staging sites where they can test website changes before pushing code to live servers.

Step 7: Audit Your Plugins/Extensions/Modules

Plugins/extensions/modules can also cause 500 Internal Server Error. In general, the error occurs because of the compatibility issues caused by outdated plugins/extensions/modules or poorly coded new ones. In this context, you might encounter the error after installing a plugin/extension/module.

To find out which of your plugins/extensions/modules is causing the error, deactivate ALL of them and then reactivate them one at a time. For WordPress, Magento, and similar apps, use the application Dashboard, CLI or SFTP.

If you discover the offending plugin/extension, deactivate (or better yet uninstall) it and get in touch with the developer for help.

Step 8: Check File Permissions

If none of the above works, the issue can lie with file permissions. Fortunately, the fix is simple: Simply hit the Reset Permissions button.

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

How to view PHP error log in case of error 500 (Internal Server Error)

Error 500 (Internal Server Error) means some malfunctioning of the PHP scripts. More details about a malfunctioning can be obtained from a PHP error log.

There are a few ways to do so.

Method 1: Logs app

  1. Install free Logs app in your Installer.
  2. In the app’s settings, enable PHP error logging to file php.log.

  3. Repeat an action resulting in an error.
  4. View new records added to log file php.log.

Method 2: Commands for .htaccess file

  1. Add these commands to the end of file .htaccess, if your web server supports them:

    php_flag display_errors Off php_value error_reporting 2147483647 php_flag log_errors On php_value error_log ./wa-log/php.log
  2. Repeat an action resulting in an error.
  3. View new records added to log file wa-log/php.log.
In addition to file php.log, you can also obtain useful troubleshooting information from other log files. Most useful are usually files updated last.

Reason behind the php errorThe PHP error 500 can be considered a general error that doesn’t indicate a particular problem. It simply lets you know that there was an internal server error that didn’t allow your request to be completed. As the message isn’t clear enough, this article has been penned down to inform you about a variety of possible causes and solutions related to the 500 internal server error.

Read till the end to find the reason behind the PHP error 500 and resolve it at the earliest.


How To Solve 500 Internal Server Error in PHP

You can solve the 500 internal server error in various ways depending on the cause of the stated error. Here, you should begin with getting a closer view of the issue before solving it. Therefore, you’ll need to turn on error reporting to get more details about the given error.

– How To Get More Details About the Error

Open your PHP file and pass “E_ALL” to the error_reporting function to get an error message instead of a general PHP error 500. Next, you’ll need to turn on the display_errors and the display_startup_errors settings after ensuring that you aren’t using a production server.

Also, don’t forget to disable the display_errors setting and enable the log_errors setting before deploying your website. It is because the former setting isn’t recommended to be used on production servers.

– Get an Error Message Coding Example

For instance, you cannot figure out the actual cause of the 500 error. Therefore, you’ll turn on error reporting and display the errors to understand them better.

Please add the below block of code in your PHP file to get a clearer error message:

ini_set(‘display_errors’, 1);
ini_set(‘display_startup_errors’, 1);

Possible Causes of PHP Error 500

As the 500 internal server error doesn’t appear due to a single reason, listed below are some possible reasons that might be responsible for its occurrence:

  • The htacess misconfiguration
  • A possible coding time out
  • Insufficient PHP memory
  • Incorrect file permissions
  • Recently added code
  • The browser cookies
  • The browser cache

Go through the below sections to gain in-depth knowledge about the above-stated problems and their solutions.

Cause of Htaccess Internal Server Error

The .htaccess file, also known as the “distributed configuration file” is used to specify some particular directives for the contents of a directory where it is located. So, are you using this kind of file? If yes, try rechecking the structure and syntax inside the given file. It is because any syntax errors or misconfiguration can result in a 500 internal server error.

What else can you do? Read below:

– How To Remove the htaccess Internal Server Error

You can remove the htaccess internal server error by renaming the .htaccess file or simply removing the given file for some time to confirm if it is causing the 500 error. Moreover, it would be beneficial to note that an empty .htaccess file can throw the same error as well.

The above solutions are the easiest ways to confirm the stated cause when you aren’t able to identify the errors in the .htaccess file. If the error continues to pop up, look for more causes and solutions below.

PHP Code Time-out

A PHP code time-out can be defined as an interrupting signal generated either by a program or a device after a long waiting period. Hence, if your PHP script contains a lot of external links and they are slow to respond, then an HTTP error 500 PHP is displayed on your browser. Does this case seem to be similar to yours? Then here are the solutions that can be helpful for you:

– Solving the PHP Code Time Out Error

You can make the PHP code time-out error go away by removing the external connections from your script file. However, if you can’t afford to remove the external links, then you can increase the waiting period. Here, all you have to do is open your php.ini file and set the max_execution_time to any number of seconds within 180. Also, remember that the default value of the same is set to 60 seconds.

Insufficient PHP Memory Sending 500 Error Message

Certainly, the PHP scripts take up a specific amount of memory for successful execution. Hence, there can be a possibility of the memory limit being exceeded in certain cases. Consequently, you might be seeing the 500 error message due to insufficient memory.

– How To Increase the PHP Memory Limit

Similar to the max_execution_time, the memory_limit can also be specified in the php.ini file. However, please note that you can’t assign a value greater than 256M to the memory_limit setting.

It would be beneficial to know that the memory_limit has its default value set to 129M. So, if you feel like the given memory limit isn’t enough for your PHP scripts to run successfully, then you can increase it.

Incorrect File Permissions

Do you know that incorrect file permission can make the PHP error 500 appear on your screen? Well, it would be great to note that different kinds of permissions can be assigned to the files. So, maybe, the file that you are trying to load on your browser doesn’t have permission to be read or executed by you.

– Which File Permission Loads the File Successfully?

The 644 file permission loads the file successfully. It is because the 644 permission allows every user to read the file with ease. However, if you want to perform a function such as uploading an image, then the 755 file permission will work for you.

Note that the 755 file permission allows the users to read as well as execute the required file.

– A Fact To Remember

On most of the Operating Systems, only the owner of the file is allowed to change the file permission.

Changes in the Code

Is the PHP error 500 appearing while loading a file that was previously working fine? Then think about any recent code changes that have been done in the stated file. Indeed, some invalid pieces of code can be a reason for the 500 internal server error to display on your screen. Well, if you haven’t made any changes, then reach out to your team members who have access to the same file and ask them about the same.

– Deal With the Recent Code Changes

Certainly, you’ll need to remove the recent code changes to see if the given changes are the root cause of the HTTP error 500 PHP. But here, a better idea can be to have two files: one with the changed code and another with the code that worked fine previously. Next, you’ll have to run both of the files to confirm the cause of the error. And the benefit of creating two files will be that you won’t end up losing the essential changes that you made if they aren’t erroneous.

The Browser Cookies

But where are the browser cookies created and who creates them? Well, the browser cookies are created by the web servers during your browsing routine. And you can find these little data stores stored on your browser.

Undeniably, the HTTP cookies enhance your browsing experience on various websites. But they can be a source of a 500 internal server error as well when the data stored in them is outdated.

– Deleting the Browser Cookies

As stated earlier, the browser cookies are stored on your browser. So, you can go to the settings of your browser, find the cookies, and delete them. Next, you’ll need to restart your browser and try loading the file that was facing the 500 error earlier. Hopefully, you’ll get the file loaded after deleting the cookies.

Browser Cache

Have you noticed that the websites load faster the next time you visit them as compared to the very first time? Undoubtedly, the website loading time is decreased because of the browser cache stored in your hard drive. But how can it be connected with the annoying HTTP error 500 PHP? So, here is the answer:

As the websites are updated time by time, the issue can be a mismatch between the cache created for the websites and the actual websites, leading to a 500 error.

– Clearing the Browser Cache

Undeniably, the act of clearing the browser cache isn’t harmful. Moreover, if the browser cache is the cause behind the 500 error, then it’s not a good idea to keep it. So, proceed with clearing the browser cache, and it will allow your browser to load the updated website efficiently.

500 Internal Server Error on WordPress Websites

Are you encountering a 500 error on your WordPress website? Then read below to find the areas that might be causing the same error to pop up. However, it would be best for you to begin with loading the admin panel to ensure that the issue resides within the technical stuff being used in website creation.

– Plugins or Themes Causing the PHP Error 500

Indeed, the plugins are used to create feature-rich websites, and the themes are the dress codes that beautify the overall look of your website. But unfortunately, not all plugins and themes come with an error-free code. Therefore, if your admin panel is working fine, try deactivating the currently activated plugins and themes one after the other to find the cause of the 500 error.


Certainly, the PHP error 500 is a general error, but luckily, you have learned about all the possible reasons that might be causing the same error. Moreover, you have got a list of solutions in the shape of this article to help you out whenever you get stuck with the 500 error on your screen. Also, the below points have been penned down to summarize all the solutions to boost your error-solving process:

  • You can get a closer view of the PHP error 500 by turning on the error reporting setting to display all errors.
  • You can solve the PHP error 500 by temporarily deleting the misconfigured htaccess file.
  • The 500 error can go away by increasing the values set for the max_execution_time and the memory_limit settings.
  • Setting the file permission to 644 or 755 can help in resolving the 500 internal server error.
  • You can try removing the recent code changes to see if the 500 error goes away. You can also delete the cookies, and the browser cache can help resolve the 500 error.
  • The poorly-coded plugins and themes can cause a 500 error on WordPress websites.

Php errorEnding this article with a satisfactory note that now, you won’t feel frustrated while seeing PHP error 500 on your browser window because you are fully prepared to handle it.

Position is Everything

Position is Everything

Position Is Everything: Your Go-To Resource for Learn & Build: CSS,JavaScript,HTML,PHP,C++ and MYSQL.

Position is Everything

Latest posts by Position is Everything (see all)

Position is Everything

PHP 500 internal server error in IIS – Causes and Fixes

500 internal server error clearly indicates that something went wrong during the display of PHP page.

By default, web servers like IIS return only generic error messages in websites. Often, this causes the masking of real reason for IIS PHP errors such as 500 internal server error.

That’s why, we frequently get request from Windows server owners to find out the reason for PHP website errors and fix them as part of our Server Management Services.

Today, we’ll take a look on how Bobcares’ Engineers track the real reason and fix php 500 internal server error in IIS.


What causes PHP 500 internal server error in IIS

Basically, 500 Internal Server Error is IIS web server’s way of saying, “Something has gone wrong when I tried to display the page. Not sure what.

Now, its time to see the exact reasons for the 500 errors.


1. Permissions Error

From our experience in managing servers, our Windows Experts often see PHP 500 internal server errors due to wrong permissions and ownership on website files. In Windows servers, every file and every folder has its own set of permissions. Again, some permissions are inherited from the parent folders too. And, when the PHP binary do not have enough permissions to execute the scripts, it can result in 500 internal server error.

Similarly, ownership of the files also create problems. In Windows, specific users like IIS User, IIS WP User, etc. should have access on the website folders and files. For example, the IUSR account should have modify permissions on php scripts. And, when there are permission problems, website shows PHP errors.


2. Bad PHP Settings

Yet another reason for PHP internal server error is bad PHP settings. The PHP settings are specified in the configuration file at C:\PHP\PHP.ini. PHP binary take the values from this file while executing scripts.

A classic example will be PHP timeout settings. When the website PHP scripts has to fetch results from external resources, PHP timeout values often cause trouble.  Most system administrators set timeout values in PHP to avoid abuse of the server resources. And, if the PHP script executes for a time longer than the threshold limits, it eventually results in 500 error.


3. PHP module errors

A very few 500 errors happen when the PHP module on the server as such becomes corrupt too. As a result, it results in processing failure of PHP scripts.

Luckily, when the website reports the 500 error due to module failures, IIS often show a more specific error messages like:


How we fixed PHP 500 internal server error in IIS

Fixing PHP 500 internal server error in IIS need a series of steps. Let’s now see how our Dedicated Engineers fixed it for one of our customers and made PHP scripts running.

The customer reported 500 internal server error on WordPress website running in IIS.


1. Turning On Display errors

While the error correctly suggested that PHP had caused 500 error code, it did not provide application-specific information about what caused the error. Therefore, the the first step of investigation was to turn ON display errors option. For this, our Dedicated Engineers followed the steps below.

  1. Using Windows® Explorer, browse to C:\PHP and open the Php.ini file in the PHP installation directory.
  2. Edit and set the display_errors = On directive.
  3. Save the file.
  4. Reset IIS using the command iisreset.exe

After turning on the errors, we reloaded the PHP and it showed a PHP parse error:

Often browser settings only show friendly error messages. In such cases, we recommend customer to turn it Off. For example, in Internet Explorer Go to Tools, Internet Options, Advanced tab, and then clear the Show friendly HTTP error messages check box.

Thus, it was a coding error on the PHP script. We suggested script modifications to customer and that fixed the error.


2. Running PHP script locally

Yet another way to find the exact error is to run the problem php script within the server. For this, our Support Engineers connect to the server via rdesktop and execute php script using the php.exe binary. It would show the  DLL’s that are having conflicts and causing the 500 error. We fix these conflicts and make the script working again.


3. Correcting PHP settings

In some cases, we need to correct the PHP settings to get the problem solved. Recently, when a customer reported problems with his website, we had to set the php directive open_basedir correctly to solve 500 Internal Server Error.

Similarly, when PHP cgi scripts show up some warning, IIS7 still displays an HTTP 500 error message. Although the best method is to fix the PHP scripts, often changing the default error handling for FastCGI in IIS7 to “IgnoreAndReturn200” also work as a temporary fix. The exact settings will look as shown.


4. Fixing PHP binary

In some rare cases, the fix may involve complete rebuilding of PHP binary on the server. This happens mainly when the PHP program on the server becomes corrupt. However, in such cases our Dedicated Engineers always check the dependency of the package and do the reinstall. For control panel specific servers, we set the appropriate binary on the server.

[Broken PHP scripts causing big problems? Our IIS experts have the fix for you.]



In a nutshell, PHP 500 internal server error in IIS happens mainly due to reasons like buggy PHP scripts, wrong server settings and many more. Today, we saw the top reasons for the error and how our Support Engineers fix it for customers.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";

At some point in time, you must have encountered a 500 Internal Server Error while trying to access a particular website. As a visitor, you may ignore it, but as a website administrator, you cannot afford to ignore it and get rid of it as soon as possible.

Not only the website frontend but also the WordPress administrator dashboard might not be available to access. In this article, we will walk you through some of the reasons why this error occurs, how to avoid it, and why it is important to invest in a reliable web hosting server to avoid this error and improve website uptime.

The frequent occurrence of 500 internal server error is bad for the reputation of your business and will lead to visitors losing trust in your brand. Besides the reputation, it will also hurt your search engine rankings. Hence it is advised to avoid this error, and deeply understand what it is all about and how to troubleshoot.

Sometimes it could be due to the problem in website configuration, while sometimes it has something to do with issues at the server, which might be beyond your control.

What is a 500 internal server error?

http 500 internal server error

In one of our previous articles about HTTP Status codes, we have covered in detail the type of errors website users might encounter. The 3-digit error status code that starts with ‘5’ and looks like 5XX indicates that there is no problem with the request made by the user agent.

But due to some other reasons, the server is not able to process the request due to incorrect configuration of the website or due to some issue encountered within the server.

While 500 specifically indicates that the webserver is facing some kind of an Internal issue due to which the request made by the user agent could not be processed at that moment. Sometimes this kind of error is momentary, which lasts for a few minutes and sometimes just a few seconds.

But if the problem persists, chances are that there is a problem with the website. Also, it is found that often the issue arises due to incorrect configuration of the website, which you can fix at your end. 

But if this is very frequent you should discuss the problem with the webserver tech support team to help you troubleshoot the issue. Some other popular 5XX error codes are 502 Bad Gateway error,504 Gateway timeout error

For a more specific kind of issue, you need to look into the specific error code using tools like MS IIS. Some of the most commonly occurring codes are as shown below:

Code List of 500 Internal Server Errors

CodeExplanation500.11The application crashes down on the webserver when a request is made by a user agent.500.12The application is under the restart process on the webserver.500.13The web server is too busy with other requests. In other words, it is overloaded with a large number of requests, which is more than its capacity.500.14Invalid application configuration on the server. The WordPress website installation is incorrect or corrupt.500.15Direct requests for GLOBAL.ASA is not allowed.500.16UNC authorization credentials are incorrect.500.17URL authorization store cannot be found.500.18URL authorization store cannot be opened.500.19Data for this file is configured improperly in the Metabase.500.2URL authorization scope cannot be found.500.21Module not recognized.500.5A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.

How to Fix 500 Internal Server Error in WordPress?

If there is a 500 internal server error on your WordPress website the users will not be able to access any of its pages, which indicates that there could be a problem at the root directory. Here are some of the most common issues due to which your WordPress website has an HTTP 500 Internal Server Error.

#1 – Corrupt .htaccess file

One of the most common causes of WordPress 500 error is a corrupted .htaccess file (found in the root directory) that might arise due to a plugin update, theme update, etc., or during the migration from one server to another. To fix this error you can replace the current htaccess file with another one.

Sometimes you might not be able to see the .htaccess file, in such cases check the hidden files in the root directory as well. Also, make sure that the file is correctly named.  Read everything about the htaccess file in wordpress here.

#2 – Exceeding PHP Memory Limit 

This could happen due to some plugin or theme consuming a lot of processing memory, or if you are using too many plugins. If your WordPress website is consuming a lot of memory to process a request you might run out of memory limit.

You can increase the memory limit to troubleshoot this problem. This could be done by making some modifications to the wp-config file or php.ini file. 

Add this code to the wp-config file:

image4 1 500 Internal Server Error: What is it & How to Troubleshoot?

You can increase the memory limit by changing 64M to 128M, 256M, and so on.

Alternatively, you can increase the memory limit through php.ini. Edit your php.ini, find out the line of code that defines the memory limit which will look like this:

memory_limit = 32M ; 

You can increase it to 64M, 128M, 256M, and so on.

Another related issue is with Maximum Execution Time. If a request made by the user agent takes more than the time limit set for the website process request. You can increase the max execution time limit either through the wp-config file, .htaccess file, or php.ini file.

To define the Max Execution Time using wp-config, add the following code or if the code already exists increase its value:


To increase the time limit using the .htaccess file, add or edit the following code:

php_value max_execution_time 300

You can edit php.ini as well to increase the execution time using this code:

max_execution_time = 300

#3 – Faulty Plugin or theme Issue

If you have recently installed or updated a plugin you might need to investigate if that is causing an issue. If you can access the admin dashboard, you can deactivate all the plugins at once, and then refresh the website to check if it works now.

If it works reactivate the plugins one after the other and check after activating each of the plugins. That way you will be able to identify which plugin is causing the issue. If after deactivating the plugins the website is still not working then the issue is obviously not due to any of the plugins.

If you are not able to access the admin backend you can rename the directory of each of the plugins, and while doing so you can check the website after renaming each of these and see if the problem resolves. Also, it is recommended to keep all the plugins updated.

Try updating or switching the theme of your WordPress website and see if the internal server error is gone. Sometimes outdated or corrupt scripts and codes within the theme files can lead to an internal server error. If you have encountered this error after a theme update, report this to the theme developer, and restore it to a previous version.

That is why it is recommended to take regular backups of your website, especially before making themes, plugins, or core installation updates.  Some hosting providers also provide you with Error logs that might help you further identify the cause of the error.


Hosting providers like WPOven provide you with a console within your hosting console to update the plugins, themes, core files, and many other management tools for better performance and control over your website along with regular backup and restore options.

#4 – Corrupted Core Files

You can upload the updated files through an FTP server to troubleshoot the internal server error on your WordPress website. You can upload the updated files from and upload them to the server using FTP software like FileZilla etc.

#5 – Check File Permissions

To make the WordPress website work perfectly fine, it is essential to have all the directory and file permissions correctly configured. The recommended file permission settings are as follows:

  • 755 for all folders and sub-folders.
  • 644 for all files.

Incorrect permission settings will lead to the blocking of some plugins, themes, and scripts to work. 

At WPOven you can use the “Fix Permissions” tool for fixing file permissions in Sites->Tools in the dashboard. 

Fast Hosting

#6 – Unsupported PHP Version

There are outdated PHP versions that are not supported by the latest WordPress version anymore. One of the latest versions 7.0, 7.1, 7.2, 7.3, and 7.4 are highly recommended. You can refer to our article on PHP Versions as well for more details.

Also, you can find the latest PHP 8 version here.  WPOVen – Managed WordPress Hosting Comes with the latest PHP Updates.

#7 Incorrect DNS entries

If your DNS is pointing to a server other than your hosting server, the visitors will not be able to access it. Make sure that the DNS entries are accurate.

#8 – Problem with Server itself

If none of them work you should immediately contact the tech support team of your web hosting provider to troubleshoot. There might be a problem with either the server hardware or the software. If there are frequent outage reports at the server end you should consider switching to another company.

Check out our article on WordPress Security here

Tips to avoid Internal Server Error and Quick Troubleshoot

  • First and foremost, keep all the plugins, themes, and WordPress Core updated. The outdated versions tend to create more problems and are more prone to security threats like malware and hacking.
  • Always take regular backups of your WordPress website files and database. Use a good plugin that takes regular backup and can easily restore the website to the desired version.
  • Turn on ‘Debugging’. It is a small trick that will help you easily debug the website, by giving you vital information about the cause of the issue. It can be enabled by adding the following line of code in your wp-config file: “define( “WP_DEBUG”, true );”
  • Increase your PHP Memory Limit (as explained above).
  • Use a highly reliable server.
  • Use security plugins to scan and audit your website regularly.
  • Use reliable and trusted plugins and themes only, that provide good support.

Some of the top web server hosting companies like WPOven have a system in place to keep a close watch on the hosted WordPress websites and send out a notification to the website administrator. There are some free web-based website monitoring tools like UptimeRobot, that also send notifications in case the website is not working for any reason.

Steps for troubleshooting of 500 Internal Server Error.

Step 1: Reload the page, sometimes there is a momentary issue with the server, so a simple reload of the page will get you to the page.

Step 2: Clear Browser Cache: Using Hard Refresh (Ctrl + F5) you can clear the cache, moreover you can go to browser history and clear the browser cache.

Step 3: Try accessing the wp-admin backend of your WordPress installation.

Step 4: If you can access the admin dashboard, deactivate all the plugins to see if it resolves the problem. If it does, start reactivating the plugins one by one to identify the one creating the problem. You have to get rid of that plugin. Before doing this make sure that all the plugins are updated to the latest version.

Step 5: If you are unable to resolve the issue, switch the theme to the default one, if it resolves the issue you will have to update the theme or change the theme. Probably some of the theme files could get corrupted, hence you can re-upload the files.

Step 6: If the problem persists, check the .htaccess file, file permissions, as well as (as explained above), 

Step 7: You can also check out your error logs and find out the possible causes that trigger 500 internal server errors. All you need to do is log in to the FTP client and then navigate to the Error log Directory and either download it or directly open it in an editor.

This will help you to narrow down the issue so that you easily figure out the exact problem and you can immediately fix it. You can also read our complete guide on How to access and set up WordPress error logs?

Step 8: It is also highly possible that the 500 internal server error can generate due to corrupt WordPress core files, especially if you are running an old website. To fix this, the easiest thing you can do is to completely replace the old WordPress core files with the new ones without affecting your WordPress theme and plugin.

To reinstall WordPress core files, you can refer to our detailed and comprehensive post on How to reinstall WordPress using 4 best methods?

Step 9: If the problem persists, immediately contact the tech support team to help you resolve the issue and make your website live.

Where can you see a 500 internal server error?

HTTP 500 internal server Error on a WordPress Website:

If your website has encountered an internal server error, you will not be able to access the website. In extreme cases, you might not be able to access even the wp-admin backend.

Typically, your browser will show any of the following messages:

  • “500 Internal Server Error”
  • “HTTP 500”
  • “Internal Server Error”
  • “HTTP 500 – Internal Server Error”
  • “500 Error”
  • “HTTP Error 500”
  • “500 – Internal Server Error”
  • “500 Internal Server Error. Sorry, something went wrong.”
  • “500. That’s an error. There was an error. Please try again later. That’s all we know.”
  • “The website cannot display the page – HTTP 500.”
  • “Is currently unable to handle this request. HTTP ERROR 500.”

500 internal server Error on Linux:

If your website visitors are getting the 500 HTML error status you can troubleshoot it using Linux as well, especially if the error arises due to any of the CGI or PERL scripts.

Also, the error can be due to the non-compatible versions of PHP and Apache. In such a case you need to upgrade PHP or recompile Apache. In Apache you can go through the error logs in the following locations:



You can use Linux commands to fix the errors, for example, to change the file and folder permissions you have to use the following commands:

cd public_html

find . -type d -exec chmod 755 {} \;

find . -type f -exec chmod 644 {} \;

500 Server Error on some Popular Websites:

Though there are lesser instances of 500 internal server errors on the world’s most visited website, even then they have encountered the error at some point in time. Some websites have very creatively designed error pages as well. Some of the examples are shown below:

image2 2 500 Internal Server Error: What is it & How to Troubleshoot?

amazon internal server error

internal server error example

http 500 internal server error

Some of the leading Content Delivery Network providers like Amazon’s AWS offer to create a custom page when there is a 500 internal server error.

500 internal server error NGINX

When there is an issue that happens on the server-side, due to which NGINX is unable to return a proper response, it starts showing 500 internal server error. The issue can happen due to multiple reasons some of the most common are, limited file permissions and errors in the script.

However, you can easily fix this error by following these simple methods:

  1. Force refresh or restart your webpage.
  2. Check out your Error logs.
  3. Check out the Scripts.
  4. Check whether adequate permission is granted to folders and files.
  5. Check all your redirections.

How does 500 Internal Server Error Effects your Search Engine Ranking?

Non-availability of websites, or in other terms longer and frequent downtime of the website can negatively impact your search engine rankings. Google always strives to provide a good user experience to the visitors, and hence if many visitors encounter the problem at different points in time it will downgrade the ranking of the website for sure.

Hence it is important to take these errors seriously and keep monitoring the websites. Using Google Analytics as well as Search Console you can see how many visitors faced the error. Besides the user experience, Google crawler also crawls the website regularly, and while crawling it found that the website is not available consistently which will negatively affect the rankings.


The seriousness of the 500 Internal Server Error depends on how frequent the error occurs, and the cause of the error. If the error lies with the website files or configuration then you need to fix it or get professional help.

But if errors frequently occur due to some problem with the server’s hardware or software then you need to immediately migrate to a more reliable and trusted hosting company

General FAQ

What does 500 internal server error mean?

The Hypertext Transfer Protocol (HTTP) 500 Internal Server Error response code represents that the server is unable to fulfill a particular request that was made by a user at the front end of the website.

How do I fix internal server error?

The best and quickest ways to fix the internal server errors are

  1. Try reloading your web pages. Do it with F2 or Ctrl+F5
  2.  Clear cache of your browsers.
  3. Delete all browser cookies.
  4. You can also contact the website admin to let them know

What causes internal server error?

500 Internal Server errors are caused due to server errors where the server may not be able to fulfill any particular request at that time. It may also cause due to some policy issues with your APIs.

Why am I getting a 500 Internal Server Error message?

Last modified: March 11, 2020


What is a 500 Internal Server Error?

For every request that is sent to a server, there is an http status code that is returned. These status codes will be returned as a 3 digit number (200, 403, 404, 500, 502, etc). Each of these numbers provide some indication as to what type of issue is preventing your site from loading. The 5XX errors indicate that a request has been sent to the server, but some technical issue has prevented this request from being completed.

The 500 Internal Server Error in particular is a catch-all error message, given when no more specific message is suitable.  There can be a number of causes for a 500 Internal Server Error to display in a web browser. Below is a sample of what a 500 error message will look like.

Common Causes

Below are common troubleshooting steps that can be taken to resolve a 500 Internal Server Error:

  1. Check the error logs
  2. Check the .htaccess file
  3. Check your PHP resources
  4. Check CGI/Perl scripts

Check the Error Logs!

With any error message, particularly one as broad as the 500 Internal Server Error, you will first want to check any Apache and PHP error logs for your server. These logs can provide valuable context related to any code failures or other potential causes of a site failure. For information on where to find the logs for your server, please see: Where are the access_log and error_log for my server?

Error with an .htaccess file

If you are using a .htaccess on your site, it may be interfering with the web page you are trying to load into your browser. Please double check the .htaccess configuration. Any syntax errors will cause a 500 Internal Server Error message to be displayed instead of your website.

To confirm whether a misconfiguration .htaccess is the cause of the 500 Internal Server error, either remove or rename the .htaccess file temporarily and then try to reload the page.

See also:

PHP Coding Timing Out

If your PHP script makes external network connections, the connections may time out. If too many connections are attempted and time out, this will cause a "500 Internal Server Error." To prevent these time outs and errors, you'll want to make sure that PHP scripts be coded with some timeout rules. Typically, however, catching a timeout error when connecting to a database or externally to remote resources (example: RSS feeds) are difficult. They, in effect, freeze the script from continuing to run.

Removing any external connections can increase both the performance of your website and decrease the chances of you receiving a "500 Internal Server Error."

You can also attempt to increase your PHP resource limits.PHP resource limits.PHP resource limits.

Syntax or coding errors in your CGI/Perl script

If it is a web page ending in .cgi or .pl that is producing the error, check your script for errors. For detailed troubleshooting tips, please see: Troubleshooting CGI/PERL scripts.

CGI Script Guidelines

  • When editing your CGI script, use a plain text editor - a program that saves the file as a 'text file' type. DO NOT use Wordpad that comes with Microsoft Windows because it doesn't save files in pure ASCII text format. Use Notepad instead to edit files.
  • Upload your CGI scripts in ASCII mode into the cgi-bin directory.
  • Set the file permissions on the CGI script file and directories to be chmod 755. If you use an FTP program to transfer files, right-click on the file and select change file attributes. See Using FTP and SFTP for more information.
  • Double-check that the Perl modules you require for your script is supported. For a list of the currently supported Perl modules, please click here.
Advanced Support can help!

Need further assistance with your server? Help is available via Advanced Support, our premium services division. For more information on what Advanced Support can do for you, feel free to click here.

Are your website visitors only seeing the 500 server error? As an operator, you should tackle the problem quickly because not only will this scare off your visitors, but it could also mean that Google will lower your ranking. Before you take action, first check whether your server is still running. If not, contact your hosting provider as soon as possible.

If there is an internal error, the first step is to view the log files. For Linux servers, the collection of error messages should be found at /var/log/httpd/error_log. It makes sense to reload the website to reproduce the HTTP error 500 code and observe how the log file is being created. This will help you find the source of the error quite quickly. Also consider which changes were made shortly before. In many cases, incorrectly programmed or incompatible plugins are the cause of error messages.

Errors can also occur if you have not set permissions correctly for important files. In general, there are three types of rights:

  • Read (r)
  • Write (w)
  • Execute (x)

These permissions can be assigned for three different user types:

  • Owner of the file
  • Group of users
  • All others

The rights are specified either in the abbreviations r, w, and x, or in corresponding numerical values: 4 for read, 2 for write, and 1 for execute. They are added for each user type and specified one after the other: rwxr-xr-x (rwx for the owner, r-x for the group, and r-x for all others) or 755. This configuration (755) should be the default setting. If the permission assignment is set differently, an error may occur. You can change this with a command:

How to view PHP error log in case of error 500 (Internal Server Error) php script error 500

Error 500 (Internal Server Error) means some malfunctioning of the PHP scripts. More details about a malfunctioning can be obtained from a PHP error log.

There are a few ways to do so.

Method 1: Logs app

  1. Install free Logs app in your Installer.
  2. In the app’s settings, enable PHP error logging to file php.log.

  3. Repeat an action resulting in an error.
  4. View new records added to log file php.log.

Method 2: Commands for .htaccess file

  1. Add these commands to the end of file .htaccess, if your web server supports them:

    php_flag display_errors Off php_value error_reporting 2147483647 php_flag log_errors On php_value error_log ./wa-log/php.log
  2. Repeat an action resulting in an error.
  3. View new records added to log file wa-log/php.log.
In addition to file php.log, you can also obtain useful troubleshooting information from other log files. Most useful are usually files updated last.
Free Web Hosting with PHP, MySQL, Email Sending, No Ads <div><h2> How to Fix a 500 Internal Server Error on Your WordPress Site </h2><div><p>The dreaded 500 internal server error. It always seems to come at the most inopportune time and you’re suddenly left scrambling to figure out how to get <a href=fatal error digma 350 WordPress site back online. Trust us, we’ve all been there, php script error 500. Other errors that behave similarly that you might have also seen include the frightening error establishing a database connection and the dreaded white screen of death. But from the moment your site goes down, you’re losing visitors error a2006 undefined symbol customers. Not to mention it simply looks bad for your brand.

Today we’re going to dive into the 500 internal server error and walk you through some ways to get your site back online quickly. Read more below about what causes this error and what you can do to prevent it in the future.

500 Internal Server Error (Most Common Causes):

500 Internal server error in WordPress can be caused by many things. If you’re experiencing one, there’s a high chance one (or more) of the following elements is causing the issue:

  • Browser Cache.
  • Incorrect database login credentials.
  • Corrupted database.
  • Corrupted files in your WordPress installation.
  • Issues with your database server.
  • Corrupted WordPress core files.
  • Corrupted .htaccess file and PHP memory limit.
  • Issues with third-party plugins and themes.
  • PHP timing out or fatal PHP errors with third-party plugins.
  • Wrong file and folder permissions.
  • Exhausted PHP memory limit on your server
  • Corrupted or broken .htaccess file.
  • Errors in CGI and Perl script.

Check Out Our Ultimate Guide to Fixing the 500 Internal Server Error

What is a 500 Internal Server Error?

The Internet Engineering Task Force (IETF) defines the 500 Internal Server Error as:

The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

When you visit a website your browser sends a request over to the server where the site is hosted. The server takes this request, processes it, and sends back the requested resources (PHP, HTML, CSS, etc.) along with an HTTP header. The HTTP also includes what they call an HTTP status code. A status code is a way to notify you about the status of the request. It could be a 200 status code which means “Everything is OK” or a 500 status code which means something has gone wrong.

There are a lot of different types of 500 status error codes (500, 501, 502, 503, 504, etc.) and they all mean something different. In this case, a 500 internal server error indicates that the server encountered an unexpected condition that prevented it from fulfilling the request (RFC 7231, section 6.6.1).

500 internal server error in WordPress

500 Internal Server Error Variations

Due to the various web servers, operating systems, and browsers, a 500 internal server error can present itself in a number of different ways. But they are all communicating the same thing. Below are just a couple of the many different variations you might see on the web:

    • “500 Internal Server Error”
    • “HTTP 500”
    • “Internal Server Error”
    • “HTTP 500 – Internal Server Error”
    • “500 Error”
    • “HTTP Error 500”
    • “500 – Internal Server Error”
    • “500 Internal Server Error. Sorry something went wrong.”
    • “500. That’s an error. There was an error. Please try again later, php script error 500. That’s all we know.”
    • “The website cannot display the page – HTTP 500.”
    • “Is currently unable to handle this request. HTTP ERROR 500.”

You might also see this message accompanying it:

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

Internal Server Error

Other times, you might simply see a blank white screen. When dealing with 500 internal server errors, php script error 500, this is actually quite common in browsers like Firefox and Safari.

500 internal server error in Firefox

Bigger brands might even have their own custom 500 internal server error messages, such as this one from Airbnb.

Airbnb 500 internal server error

Here is another creative 500 server error example from the folks over at readme.

readme 500 internal server error

Even the mighty YouTube isn’t safe from 500 internal server errors.

500 internal server error on YouTube

If it’s an IIS 7.0 (Windows) or higher server, they have additional HTTP status codes to more closely indicate the cause of the 500 error:

  • 500.0 – Module or ISAPI error occurred.
  • 500.11 – Application is shutting down on the web server.
  • 500.12 – Application is busy restarting on the web server.
  • 500.13 – Web server is too busy.
  • 500.15 – Direct requests for global.asax are not allowed.
  • 500.19 – Configuration data is invalid.
  • 500.21 – Module not recognized.
  • 500.22 – An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
  • 500.23 – An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
  • 500.24 – An ASP.NET impersonation configuration does not apply in Managed Pipeline mode.
  • 500.50 – A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.
  • 500.51 – A rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling. A global configuration or global rule execution error occurred.
  • 500.52 – A rewrite error occurred during RQ_SEND_RESPONSE notification handling. An outbound rule execution occurred.
  • 500.53 – A rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling. An outbound rule execution error occurred. The rule is configured to be executed before the output user cache gets updated.
    500.100 – Internal ASP error.

500 Errors Impact on SEO

Unlike 503 errors, which are used for WordPress maintenance mode and tell Google to check back at a later time, a 500 error can have a negative impact on SEO if not fixed right away. If your site is only down for say 10 minutes and it’s being crawled consistently a lot of times the crawler will simply get the page delivered from cache. Or Google might not even have a chance to re-crawl it before it’s back up, php script error 500. In this scenario, you’re completely fine.

However, if the site is down for an extended period of time, say 6+ hours, then Google might see the 500 error as a site level issue that needs to be addressed. This could impact your rankings. If you’re worried about repeat 500 errors you should figure out why they are happening to begin with. Some of the solutions below can help.

How to Fix the 500 Internal Server Error

Where should you start troubleshooting when you see a 500 internal server error on your WordPress site? Sometimes you might not even know where to begin. Typically 500 errors are on the server itself, php script error 500, but from our experience, these errors originate from two things, the first is user error (client-side issue), and the second is that there is a problem with the server. So we’ll dive into a little of both.

Check out these common causes and ways to fix the 500 internal server error and get back up and running in no time.

1. Try Reloading the Page

This might seem a little obvious to some, but one of the easiest and first things you should try when encountering a 500 internal server error is to simply wait a minute or so and reload the page (F5 or Ctrl + F5). It could be that the host or server is simply overloaded and the site will come right back. While you’re waiting, you could also quickly try a different browser to rule that out as an issue.

Another thing you can do is to paste the website into This website will tell you if the site is down or if it’s a problem on your side. A tool like this checks the HTTP status code that is returned from the server. If it’s anything other than a 200 “Everything is OK” then it will return a down indication.


We’ve also noticed that sometimes this can occur immediately after you update a plugin or theme on your WordPress site. Typically this is on hosts that aren’t set up properly. What happens is they experience a temporary timeout right afterward. However, things usually resolve themselves in a couple of seconds and therefore refreshing is all you need to do.

2. Clear Your Browser Cache

Clearing your browser cache is always another good troubleshooting step before diving into deeper debugging on your site. Below are instructions on how to clear cache in the various browsers:

3. Check Your Server Logs

You should also take advantage of your error logs. If you’re a Kinsta client, you can easily see errors in the log viewer in the MyKinsta dashboard. This can help you quickly narrow down the issue, php script error 500, especially if it’s resulting from a plugin on your site.

Want to know how we increased our traffic over 1000%?

Join 20,000+ others who get our weekly newsletter with insider WordPress tips!

Subscribe Now
Check error logs for 500 internal server errors

If your host doesn’t have a logging tool, you can also enable WordPress debugging mode by adding the following code to your wp-config.php file to enable logging:

The logs are typically located in the /wp-content directory. Others, like here at Kinsta might latency test error + speedtest a dedicated folder called “logs”.

WordPress error logs folder (SFTP)

You can also check the log files error cannot find pcres libpcre in /usr/lib Apache and Nginx, which are commonly located here:

  • Apache: /var/log/apache2/error.log
  • Nginx: /var/log/nginx/error.log

If you’re a Kinsta client you can also take advantage of our analytics tool to get a breakdown of the total number of 500 errors and see how often and when php script error 500 are occurring. This can help you troubleshoot if this is an ongoing issue, or perhaps something that has resolved itself.

Response analysis 500 error breakdown

If the 500 error is displaying because of a fatal PHP error, you can also try enabling PHP error reporting. Simply add the following code to the file throwing the error. Typically you can narrow down the file in the console tab of Google Chrome DevTools.

And you might need to also modify your php.ini file with the following:

4. Error Establishing a Database Connection

500 internal server errors can also occur from a database connection error. Depending upon your browser you might see different errors. But both will generate a 500 HTTP status code regardless in your server logs.

Below php script error 500 an example of what an “error establishing a database connection” message looks like your browser. The entire page is blank because no data can be retrieved to render the page, as the connection is not working properly. Not only php script error 500 this break the front-end of your site, but it will also prevent you from accessing your WordPress dashboard.

Example of error establishing a database connection

So why exactly does this happen? Well, here are a few common reasons below.

  • The most common issue is that your database login credentials are incorrect. Your WordPress site uses separate login information to connect to its MySQL database.
  • Your WordPress database is corrupted. With so many moving parts with themes, plugins, and users constantly deleting and installing them, sometimes databases get corrupted. This can be due to a missing or individually corrupted table, or perhaps some information was deleted by accident.
  • You may have corrupt files in your WordPress installation. This can even happen sometimes due to hackers.
  • Issues with your database server. A number of things could be wrong on the web hosts end, such as the database being overloaded from a traffic spike or unresponsive from too many concurrent connections. This is actually quite common with shared hosts as they are utilizing the same resources for a lot of users on the same servers.

Check out our in-depth post on how to fix the error establishing a database connection in WordPress.

5. Check Your Plugins and Themes

Third-party plugins and themes can easily cause 500 internal server errors. We’ve seen all types cause them here at Kinsta, from slider plugins to ad rotator plugins. A lot of times you should see the error immediately after installing something new or running an update. This is one reason why we always recommend utilizing a staging environment for updates or at least running updates one by one. Otherwise, if you encounter a 500 internal server error you’re suddenly scrambling to figure out which one caused it.

A few ways you can troubleshoot this is by deactivating all your plugins. Remember, you won’t lose any data if you simply deactivate a plugin. If you can still access your admin, a quick way to do this is to browse to “Plugins” and select “Deactivate” from the bulk actions menu, php script error 500. This will disable all of your plugins.

Deactivate all plugins

If this fixes the motorola l7 error 39 02 you’ll need to find the culprit. Start activating them one by one, reloading the site after each activation. When you see the 500 internal server error return, you’ve found the misbehaving plugin. You can then reach out to the plugin developer for help or post a support ticket in the WordPress repository.

If you can’t login to WordPress admin you can FTP into your server and rename your plugins folder to something like plugins_old. Then check your site again. If it works, then you will need to test each plugin one by one. Rename your plugin folder back to “plugins” and then rename each plugin folder inside of if it, one by one, until you find it. You could also try to replicate this on a staging site first.

Rename plugin folder

Always makes sure your plugins, themes, and WordPress core are up to date. And check to ensure you are running a supported version of PHP. If it turns out to be a conflict with bad code in a plugin, you might need to bring in a WordPress developer to fix the issue.

6. Reinstall WordPress Core

Sometimes WordPress core files can get corrupted, especially on older sites. It’s actually quite errors were encountered while processing mysql-server-5.5 to re-upload just the core of WordPress without impacting your plugins or themes. We have an in-depth guide with 5 different ways to reinstall WordPress. And of course, make sure to take a backup before proceeding. Skip to one of the sections below:

7. Permissions Error

A permissions error with a file or folder on your server can also cause a 500 internal server error to occur. Here are some typical recommendations for permissions when it comes to file and folder permissions in WordPress:

  • All files should be 644 (-rw-r–r–) or 640.
  • All directories should be 755 (drwxr-xr-x) or 750.
  • No directories should ever be given 777, even upload directories.
  • Hardening: wp-config.php could also be set to 440 or 400 to prevent other users on the server from reading it.

See the WordPress Codex article on changing file 49.00ff service error a more in-depth explanation.

You can easily see your file permissions with an FTP client (as seen below). You could also reach out to your WordPress host support team and ask them to quickly GREP file permissions on your folders and files to ensure they’re setup properly.

File permissions SFTP

8. PHP Memory Limit

A 500 internal server error could also be caused by exhausting the PHP memory limit on your server. You could try increasing the limit. Follow the instructions below on how to change this limit in cPanel, php script error 500, Apache, your php.ini file, and file.

Increase PHP Memory Limit in cPanel

If you’re running on a host that uses cPanel, you can easily change this from the UI. Under Software click on “Select PHP Version.”

php script error 500 alt="Select PHP version" width="1448" height="361">

Click on “Switch to PHP Options.”

Switch to PHP options

You can then click on the attribute and change its value. Then click on “Save.”

Increase PHP memory limit in cPanel

Increase PHP Memory Limit in Apache

The file is a special hidden file that contains various settings you can use to modify the server behavior, right down to a directory specific level. First login to your site via FTP or SSH, take a look at your root directory and see if there is a file there.

.htaccess file

If there is you can edit that file to add the necessary code for increasing the PHP memory limit. Most likely it is set at 64M or below, you can try increasing this value.

Increase PHP Memory Limit in php.ini File

If the above doesn’t work for you might try editing your file. Log in to your site via FTP or SSH, go to your site’s root directory and open or create a file.

php.ini file

If the file was already there, search for the three settings and modify them if necessary. If you just created the file, or the settings are nowhere to be found you can paste the code below. You can modify of course the values to meet your needs.

Some shared hosts might also require that you add the suPHP directive in your file for the above file settings to work. To do this, edit your file, also located at the php script error 500 of your site, and add the following code towards the top of the file:

If the above didn’t work for you, it could be that your host has the global settings locked down and instead have it configured to utilize files. To edit your file, login to your site via FTP or SSH, php script error 500, go to your site’s root directory and open or create a file. You can then paste in the following code:

Increase PHP Memory Limit in wp-config.php

The last option is not one we are fans of, but if all else fails you can give it a go. First, log in to your site via FTP or SSH, and locate your wp-config.php file, which is typically in the root of your site.

wp-config.php file

Add the following code to the top of your file:

You can also ask your host if you’re running into memory limit issues. We utilize the Kinsta APM tool and other troubleshooting methods here at Kinsta to help clients narrow down what plugin, query, or script might be exhausting the php script error 500. You can also use your own custom New Relic key from your own license.

Debugging with New <b>Php script error 500</b> width=

9. Problem With Your .htaccess File

Kinsta only uses Nginx, but if you’re using a WordPress host that is running Apache, php script error 500, it could very well be that your file has a problem or has become corrupted. Follow the steps below to recreate a new one from scratch.

First, log in to your site via FTP or SSH, and rename your file to .

Rename .htaccess file

Normally to recreate this file you can simply re-save your permalinks in WordPress. However, if you’re in the middle of a 500 internal server error you most likely can’t access your WordPress admin, so this isn’t an option. Therefore you can create a new file and input the following contents. Then upload it to your server.

See the WordPress Codex for more examples, such as a default file for multisite.

10. Coding or Syntax Errors in Your CGI/Perl Script

500 errors being caused by errors in CGI and Perl is a lot less common than it used to be. Although it’s still worth mentioning, especially for those using cPanel where there are a lot of one-click CGI scripts still being used. As AEM on Stack Overflow says:

CGI has been replaced by a vast variety of web programming technologies, including PHP, various Apache extensions like mod_perl, Java of various flavors and frameworks including Java EE, Struts, Spring, etc, Python-based frameworks like Django, Ruby on Rails and many other Ruby frameworks, and various Microsoft technologies.

Here are a few tips when working with CGI scripts:

  • When editing, always used a plain text editor, such as Atom, Sublime, or Notepad++. This ensures they remain in ASCII format.
  • Ensure correct permissions of chmod 755 are used on CGI scripts and directories.
  • Upload your CGI scripts in ASCII mode (which you can select in your FTP editor) into the cgi-bin directory on your server.
  • Confirm that the Perl modules you require for your script are installed and supported.

11. Server Issue (Check With Your Host)

Finally, php script error 500, because 500 internal server errors can also error stray in programm from PHP timing out or fatal PHP errors with third-party plugins, you can always check php script error 500 your WordPress host. Sometimes these errors can be difficult to troubleshoot without an expert. Here are just a few common examples of some errors that trigger 500 HTTP status codes on the server that might have you scratching your head.

We monitor all client’s sites here at Kinsta and are automatically notified when these types of errors occur. This allows us to be pro-active and start fixing the issue right away. We also utilize LXD managed hosts and orchestrated LXC software containers for each site, php script error 500. This means that every WordPress site is housed in its own isolated container, which has all of the software resources required to run it (Linux, Nginx, PHP, MySQL). The resources are 100% private and are not shared with anyone else or even your own sites.

PHP timeouts could also occur from the lack of PHP workers, although typically these cause 504 errors, not 500 errors. These determine how many simultaneous requests your site can handle at a given time. To put it simply, each uncached request for your website is handled by a PHP Worker.

When PHP workers are already busy on a site, they start to build up a queue. Once you’ve reached your limit of PHP workers, the queue starts to push out older requests which could result in samp error 017 undefined symbol playerinfo errors or incomplete requests. Read our in-depth article about PHP workers.

Monitor Your Site

If you’re worried about these types of errors happening on your site in the future, you can also utilize a tool like to monitor and notify you immediately if they occur. It periodically sends an HTTP HEAD request to the URL of your choice. You can simply use your homepage. The tool allows you to set check frequencies of:

  • 15 seconds
  • 30 seconds
  • 1 minute
  • 2 minutes
  • 5 minutes
  • 10 minutes

It will send you an email if and when your site goes down. Here is an example below.

Email notification of 500 error

This can be especially useful if you’re trying to debug a faulty plugin or are on a shared host, who tend to overcrowd their servers. This can give you proof of how often your site might actually be doing down (even during the middle of the night), php script error 500. That’s why we always recommend going with a managed WordPress host. Make sure to check out our post that explores the top 9 reasons to choose managed WordPress hosting.


500 internal server errors are always frustrating, but hopefully, now you know a few additional ways to troubleshoot them to quickly get your site back up and running. Remember, php script error 500, typically these types of errors are caused by third-party plugins, fatal PHP errors, database connection issues, problems with your .htaccess file or PHP memory limits, and sometimes PHP timeouts.

Was there anything we missed? Perhaps you have another tip on troubleshooting 500 internal server errors. If so, let us know below in the comments.

Save time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise php script error 500 audience reach with 34 data centers worldwide.
  • Optimization with our built-in Application Performance Monitoring.

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to find the plan that’s right for you." width="120" height="40">

We use cookies to ensure you can get the best experience on our site. If you keep using this site we assume that you agree to our use of cookies. Privacy PolicyOK