If you’re seeing a 500 Internal Server Error after submitting a form, it means something has gone wrong on the server. The server may or may not provide an error message.
What is a 500 Error?
A 500 error is a general server-side error. It means the server tried to process a request but encountered an unexpected condition that prevented it from completing it. The problem could stem from PHP code, plugin conflicts, server configuration, or even low server resources.
Common Causes of 500 Errors
-
PHP errors (e.g. syntax issues, calling undefined functions)
-
Fatal plugin or theme conflicts
-
Server resource limits (memory, execution time, etc.)
-
Corrupted
.htaccess
file (especially on Apache servers) -
Misconfigured permissions
-
Missing or outdated PHP extensions
How to Troubleshoot a 500 Server Error
Check the WS Form Debug Console
If you’re working with WS Form, enable the Debug Console in the plugin settings:
-
Go to WS Form > Settings from the WordPress admin menu.
-
In the Basic Tab, set Debug Console to Administrators only.
-
Click Save.
Then preview your form. If an error occurs, the Error tab in the debug console may give you more information, especially if the issue is coming from a specific action like Send Email or Run WordPress Hook.
Enable WP_DEBUG Logging
Turn on debugging in WordPress to reveal PHP errors:
-
Open your site’s
wp-config.php
file. -
Add or modify the following lines:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
-
Reproduce the error, then check the log file at
/wp-content/debug.log
.
Look for fatal errors or uncaught exceptions that occurred during form processing.
Check your Hosting PHP Error Log
Most hosting environments keep a PHP error log that records issues like fatal errors, syntax problems, or missing dependencies. You can usually access this log through your hosting control panel, or via FTP/SFTP under a directory like /logs
or /var/logs
. Review the log entries around the time the error occurred. Look for lines marked FATAL ERROR
, UNCAUGHT EXCEPTION
, or anything referencing a plugin or theme file. These entries often pinpoint the exact line of code or file causing the 500 error. If you’re not sure how to locate the error log, your hosting provider’s support team should be able to assist.
Use the Browser Inspector
Your browser’s built-in developer tools can help you quickly identify if a 500 error is occurring during a form submission. To get started, open the browser inspector by pressing F12
or right-clicking anywhere on the page and selecting Inspect. Then navigate to the Network tab.
Submit the form again while the Network tab is open. Look for a request that returns a 500 status code—this indicates a server-side error. Click on that request to view more details, then open the Response sub-tab. If the server returned any error output (such as a PHP fatal error or exception), it will appear here.
This step is especially helpful when errors aren’t visibly displayed on the page, or when the response is partially masked by the server. It provides a direct look at what the server sent back to the browser and can offer clues for troubleshooting.
Fixing the Issue
Once you’ve identified the error, possible solutions may include:
-
Fixing or rolling back custom code
-
Disabling the plugin or theme causing the error
-
Increasing
memory_limit
ormax_execution_time
inphp.ini
-
Restoring a previous version of your
.htaccess
file -
Reinstalling missing PHP modules (e.g.
curl
,json
,mbstring
)
If the issue is tied to a WS Form action (like a webhook or integration), double-check the action’s configuration and API credentials.