[Resolved] Internal Server Error on Translated Version of Website
This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing a 500 Internal Server Error on the translation of your site, which indicates an unhandled PHP error in your site's code. Solution: To resolve the 500 Internal Server Error, we recommend enabling the debug log to identify the specific PHP errors. Here's how you can do it: 1. Open your site's wp-config.php file. 2. Locate the line
define('WP_DEBUG', false);
and change it to:
define('WP_DEBUG', true);
3. To enable error logging to a file on your server, add:
define('WP_DEBUG_LOG', true);
This will save the errors to a debug.log file inside the /wp-content/ directory. For more detailed instructions, please visit WPML Debugging Documentation. After enabling debugging, check the debug.log file for errors and address them accordingly.
In this case, the site permalinks were causing the issue. The user refreshed them, and now the site is working fine.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket at WPML Support Forum for further assistance.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I am trying to fix the German translation of my website, hidden link, which is broken. Many strings are not automatically translating and publishing, causing formatting issues.
Symptoms:
Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete the request. Additionally, a 500 Internal Server Error was encountered while trying to use an ErrorDocument to handle the request.
Questions:
How can I resolve the internal server error on the German translation of my site?
Why are many strings not automatically translating and publishing correctly?
Let's try to resolve the 500 error within this ticket. Please create a separate support ticket for the other issue, including details and screenshots. This will also help other users with similar problems find solutions when searching the forum.
The 500 error means that there is an error in the PHP code that your site runs. When errors are not caught, the server stops everything and returns a page that says “500 error” or an empty page. Different servers are configured to display these errors slightly differently, but they all mean the same – there is an unhandled PHP error in the site’s code.
First, you need to see what the errors are. Guessing what might be the problem and trying different solutions may lead to even more trouble. The first step is to enable debug.log. You can add a few lines to the site’s wp-config.php file. With the error log enabled, you will see the actual problem.
To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
To enable the error logging to a file on the server, you need to add yet one more similar line:
define( 'WP_DEBUG_LOG', true );
The errors will be saved to a debug.log log file inside the /wp-content/directory.
Attached is the debug log. Also, the only page I can get to load is the homepage - all other pages for both translation and original version of site are showing 500 errors.
Here are the "error_log" from this month:
[01-Oct-2024 05:33:27 UTC] PHP Warning: Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/funkbowling/public_html/wp-settings.php on line 33
[01-Oct-2024 05:33:27 UTC] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/funkbowling/public_html/wp-settings.php on line 33
[01-Oct-2024 05:33:27 UTC] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/funkbowling/public_html/wp-settings.php on line 33
[01-Oct-2024 05:33:27 UTC] PHP Fatal error: require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/funkbowling/public_html/wp-settings.php on line 33
[01-Oct-2024 23:48:30 UTC] Error: $content is empty
[02-Oct-2024 11:56:17 UTC] PHP Warning: Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/funkbowling/public_html/wp-settings.php on line 33
[02-Oct-2024 11:56:17 UTC] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/funkbowling/public_html/wp-settings.php on line 33
[02-Oct-2024 11:56:17 UTC] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/funkbowling/public_html/wp-settings.php on line 33
[02-Oct-2024 11:56:17 UTC] PHP Fatal error: require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/funkbowling/public_html/wp-settings.php on line 33
[03-Oct-2024 01:24:10 UTC] Error: $content is empty
[03-Oct-2024 01:25:58 UTC] Error: $content is empty
[03-Oct-2024 13:01:22 UTC] Error: $content is empty
[03-Oct-2024 14:37:46 UTC] PHP Warning: Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/funkbowling/public_html/wp-settings.php on line 33
[03-Oct-2024 14:37:46 UTC] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/funkbowling/public_html/wp-settings.php on line 33
[03-Oct-2024 14:37:46 UTC] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/funkbowling/public_html/wp-settings.php on line 33
[03-Oct-2024 14:37:46 UTC] PHP Fatal error: require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/funkbowling/public_html/wp-settings.php on line 33
[04-Oct-2024 09:27:54 UTC] Error: $content is empty
[05-Oct-2024 13:29:09 UTC] Error: $content is empty
[06-Oct-2024 02:25:00 UTC] Error: $content is empty
[07-Oct-2024 20:02:01 UTC] PHP Warning: filemtime(): stat failed for /home/funkbowling/public_html/wp-content/db.php in /home/funkbowling/public_html/wp-content/plugins/wordfence/lib/wfActivityReport.php on line 674
[08-Oct-2024 18:15:45 UTC] Error: $content is empty
[09-Oct-2024 06:27:04 UTC] Error: $content is empty
[10-Oct-2024 00:10:05 UTC] Error: $content is empty
[10-Oct-2024 02:55:59 UTC] Error: $content is empty
[10-Oct-2024 05:48:25 UTC] Cron reschedule event error for hook: rocket_preload_process_pending, Error code: could_not_set, Error message: The cron event list could not be saved., Data: {"schedule":"rocket_preload_process_pending","args":[],"interval":60}
[10-Oct-2024 20:43:34 UTC] Error: $content is empty
[11-Oct-2024 12:14:22 UTC] Error: $content is empty
[11-Oct-2024 13:33:13 UTC] Error: $content is empty
[11-Oct-2024 23:46:36 UTC] Error: $content is empty
[12-Oct-2024 03:21:48 UTC] Error: $content is empty
[12-Oct-2024 07:08:51 UTC] Error: $content is empty
[12-Oct-2024 10:50:43 UTC] Error: $content is empty
[13-Oct-2024 02:46:04 UTC] Error: $content is empty
[13-Oct-2024 22:28:21 UTC] Error: $content is empty
[14-Oct-2024 00:40:26 UTC] Error: $content is empty
[14-Oct-2024 00:47:46 UTC] Error: $content is empty
[14-Oct-2024 11:46:34 UTC] Error: $content is empty
[14-Oct-2024 20:03:18 UTC] PHP Warning: filemtime(): stat failed for /home/funkbowling/public_html/wp-content/db.php in /home/funkbowling/public_html/wp-content/plugins/wordfence/lib/wfActivityReport.php on line 674
[15-Oct-2024 03:55:19 UTC] Error: $content is empty
[21-Oct-2024 20:00:51 UTC] PHP Warning: filemtime(): stat failed for /home/funkbowling/public_html/wp-content/db.php in /home/funkbowling/public_html/wp-content/plugins/wordfence/lib/wfActivityReport.php on line 674
[24-Oct-2024 17:35:19 UTC] .../api/Service.php:494 ET_Core_API_Service::make_remote_request():
ET_Core_HTTPInterface ERROR :: Remote request failed...
[24-Oct-2024 18:43:01 UTC] PHP Warning: filemtime(): stat failed for /home/funkbowling/public_html/wp-content/plugins/mailin//js/mailin-front.js in /home/funkbowling/public_html/wp-content/plugins/mailin/sendinblue.php on line 465