A common error in WordPress is a 500 Internal Server Error (or sometimes a white page or “The site is experiencing technical difficulties.”). This error can look like the image below.
Internal server errors in WordPress can be caused by plugin or theme functions, corrupted .htaccess file, or PHP memory limit.
To start debugging this error we need to see if we can get more information about the error.
The first method with which we can find out more information about the error is to set WP_DEBUG to true in wp_config.php. Please follow the steps below:
1. Access your site via FTP
2. Open the file named wp-config.php
3. Find the line where you see define(‘WP_DEBUG’, false);
4. Change false to true and save the file
The next time you refresh the page you were getting an error on you should see more information about the error messages which will help in troubleshooting.
If the line is already set to
true you may have another plugin or server configuration which is suppressing the error output.
And we can also find out more information about this error by checking if we have any PHP errors in the PHP error logs.
Increase the WordPress Memory Limit
When you install WordPress, the default memory limit is typically set at 64MB. However, as you install plugins, themes, and other WordPress add-ons, your website’s memory usage can increase. If your website’s memory usage exceeds the default limit, you may start to experience various performance issues, including slow loading times, error messages, and even website crashes.
To increase the WordPress memory limit, you will typically need to modify your website’s wp-config.php file or contact your web hosting provider to request an increase.
1. FTP into your website
2. Open the file named wp-config.php
3. You need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
4. Save the file
You can now visit your WordPress site and the memory exhausted error should disappear now.
Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase the PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.
Checking for Corrupt .htaccess File
.htaccess file can cause issues with your website, such as error pages or broken links. Here are the steps to check for a corrupt
- Access your website’s root directory through an FTP client or file manager provided by your hosting provider.
- Look for the
.htaccessfile in the root directory. If you cannot find it, make sure that you have enabled the option to view hidden files.
- Download a copy of the
.htaccessfile to your computer, and then delete it from your website’s root directory.
- Try accessing your website to see if the issues have been resolved. If they have, then the issue was likely caused by a corrupt
- To create a new
.htaccessfile, go to your WordPress dashboard, and navigate to Settings > Permalinks. Click the “Save Changes” button, and WordPress will generate a new
.htaccessfile for you.
If you continue to experience issues after deleting the
.htaccess file and generating a new one, it may be caused by a different issue, and you should contact your hosting provider or WordPress support for further assistance.
Ask your Hosting Provider
If you did not manage to solve your error please contact your host provider team and they will be able to check the server logs and locate the root cause of the error.
Profile Builder Pro
Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.Unlock PRO Features