How to fix WordPress error 500?
Fix the WordPress 500 error: raise the PHP memory limit in wp-config.php, and check the snippet you just added to functions.php.
WordPress error 500 is generally an insufficient memory problem.
Here’s how to fix it:
- Via your cPanel or your FTP access, edit the
wp-config.phpfile at the root of your WordPress site. - Copy and paste the code below just after the line:
That’s all, stop editing! Happy blogging.
define( 'WP_MEMORY_LIMIT', '256M' );
If it does not work, you must increase PHP memory via your server or cPanel.
If the error appeared right after you added a snippet to functions.php, memory is not the cause: a single syntax slip in that snippet is enough to return a 500. Remove the added code and check it, for instance against the method in changing text dynamically in WordPress.
Cache plugins can also cause error 500 after a website migration. You may need to deactivate or delete them, then reinstall cleanly.