WordPress Internal Server Error
At some point, WordPress Internal Server Error will happen to you, and when it does you’ll want to make sure you have a handle on it. This error is not isolated to WordPress, this error began on non WordPress websites before WordPress ever existed. Back then it was just called, Internal Server Error.
There could be many reasons why this error occurs. Here are a few common causes and troubleshooting tips to help you narrow down the root cause of this error.
- Incorrect permissions on files and folders.
- Corrupted .htaccess file.
- Exceeding the PHP memory limit.
- Plugin or theme functions conflicts.
How To Check WordPress Error Logs
In order to check your WordPress Error Logs, they must be enabled in your “wp-config.php” file. This accomplished by adding this line of code to your “wp-config.php” file: define( ‘WP_DEBUG’, true ); Then WordPress will be able to log errors and warnings to the debug.log file, which will be located in /wp-content/ directory.
Note: Do not leave – define( ‘WP_DEBUG’, true ); enabled unless you are testing on a local server. Otherwise, too much information is left open to hackers to read to possible gain access to your WordPress site.
The other way to create a WordPress server error log file is to use a Plugin. Here are a few I recommend.
Error Log Viewer – https://wordpress.org/plugins/error-log-viewer
Rename your .htaccess to .htaccess-old and try to re-connect to the site in question. If that fixed it, log into your WordPress site, go to settings / permalinks and click save. That will re-write your .htaccess file.
Increase PHP Memory Limits
Create a php.ini file and add this line to it —> memory=64mb. Upload it to the wp-admin folder. If this corrects the issue, you will need to figure out which plugin is causing the memory limits to be reached. You may need to contact your web host for assistance.
Deactivate Plugins
You can deactivate your plugins one at a time or all at once by renaming your plugins folder. If you are able to access your website after doing this, then one of your plugins is the issue.
Revert Back To A Default Theme
Check Your “wp-admin” And “wp-includes” Directories
Download a fresh copy of WordPress and upload the wp-admin and wp-includes folders in place of the one’s on your server.
Check Your File Permissions
These setting are default and will work.
- 644 -rw-r–r– /home/user/wp-config.php
- 644 -rw-r–r– /home/user/cgi-bin/.htaccess
- 644 -rw-r–r– /home/user/cgi-bin/php.ini
- 755 -rwxr-xr-x /home/user/cgi-bin/php.cgi
- 755 -rwxr-xr-x /home/user/cgi-bin/php5.cgi
My web host recommends 644. 644 is usually the default for most web hosts.
When all else fails contact your web host for assistance with this issue or hire a guy like me. I can be reached on Social Media or Call: (954) 895-2555.