A 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 page that says “500 error”. Different servers are configured to display these 500 errors slightly differently, but they all mean the same – there is an unhanded PHP error in the site’s code.

What Causes 500 Errors and How to Resolve Them

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. If you are seeing 500 errors, your first step is to enable debug. You can do this by adding a few lines to the site’s wp-config.php file. With error log enabled, you will see what the actual problem is.

Out of Memory

The most frequent cause of 500 errors is your server running out of memory. This can happen if the memory allowance was marginal before you activated a plugin and with that plugin activated, there is not enough memory.

In the error log file, you will see something like:

Allowed memory size of YOUR_LIMIT bytes exhausted (tried to allocate SOME_MEMORY bytes) in...

If the first number (YOUR_LIMIT) is below 128M, it means that you should increase the amount of memory allocated to PHP. Often, you can increase the amount of available memory, as described in the WordPress memory settings documentation.

However, if the YOUR_LIMIT number is very high, or increasing it doesn’t help, the code may be running an infinite loop (functions call each other in an endless loop). To debug something like this, please use our technical support forum. Explain the problem, show the PHP error and our supporters will help.

Code Conflict

The second most popular cause for a PHP fatal error is conflict between different plugins and themes. This can manifest into many different errors, depending on the exact functions conflicting.

Since your site is stuck in a state of 500 error, you cannot use the WordPress admin to make changes and troubleshoot. Use an FTP program and go to the plugins directory (wordpress>wp-content>plugins). Delete any plugin that you suspect to be related with the conflict. You can safely delete WPML plugins too. Deleting WPML plugins doesn’t change the language information in your site. After you resolve the conflict, enable WPML again and all language information will be restored.

Compatibility with WordPress Versions

Next popular issue is compatibility with WordPress versions. WPML team always releases versions ahead of new WordPress releases. Be sure to update WPML for the WordPress version that you are running. It’s always a good idea to run the newest WordPress version (most stable and secure) with the newest WPML version. Before upgrading, we recommend to do a test upgrade on a test copy of your site. This will help you make sure that your theme and ALL plugins are completely compatible with the new WordPress version.

Compatibility with PHP Versions and PHP Extensions

WPML runs on a wide range of PHP versions (see the minimum requirements for complete details). The standard PHP build comes with a list of default extensions. In some rare cases, hosting companies switch off certain extensions that they don’t like. If this happens, you will see errors indicating that some extension or function doesn’t exist.

When you see something like that, it’s best to report in our technical support forum. Our supporters will troubleshoot it and see what’s missing. Then, we will work with your hosting provider to enable what’s missing.