Have you ever faced a situation where after updating a theme or a plugin, your WordPress site displays nothing but a white page? So bad, that you’re even locked out of the WordPress dashboard? That my friend, is popularly known as the White Screen of Death.
I’m sure our readers who’ve used Windows XP in the past have faced something similar! Yes, its the famous blue screen of death (BSOD)! However, your PC would actually boot after the BSOD, but it’s certainly not the case in WSOD. ;)
The White Screen of Death (and a couple of other errors) is what this article is all about. I’m going to discuss some of the most common WordPress errors and list possible causes and potential solutions for each of them!
Before we begin, there’s a general rule of thumb which I think everyone needs to follow before gallivanting to the land of undiscovered plugins.
- Do not install plugins that aren’t listed in the WordPress plugin directory. Even if you do, make sure they’re trustworthy. If you are a basic or moderate user, most of your necessary plugins will already be listed in the WordPress plugin directory.
- Don’t experiment with new plugins in your main site. I’m not saying don’t experiment. Never! I’m merely pointing out that, it would be wiser to create a copy of your site in a remote server or in your localhost and carry out your tests there!
- Go for recommended plugins and ones with a higher download count.
- Regular backups!
Okay so lets get started …
The White Screen of Death:
The WSOD is one of the most important errors a fellow WordPress user can face. It can be due to multiple reasons and the solutions are varied in every situation.
There are a number of causes for the White Screen of Death. It is certainly not easy to pin point the source of the problem. However, following points are believed to be the most common causes for the WSOD.
- Incompatible plugin with current version of WordPress
- Plugin collision with another plugin
- Plugin collision with active theme
- Incompatible theme with latest revision of WordPress (mainly happens when a new theme is installed or and old one is updated)
- Plugin-theme collision: In many cases the theme might have some code which the plugin that you most recently activated uses; thereby causing a deadlock.
1. Resetting the WordPress Plugin Directory:
Article continues after this block
To reset the WordPress plugin directory, you must have access to the WordPress installation folder. You can do this by using FTP access, cPanel, SSH or any web-server control panel’s file manager. For example, FatCow and Dreamhost do not use cPanel but have their own file manager.
- Rename the plugins directory to plugin-temp
- Create a new directory called plugins and change its permission to 644
- If you’re on a VPS or a dedicated server and have SSH access, restart your web server
All your previously activated themes will be deactivated and removed. You could now try logging into your WordPress dashboard. If it works, then you could start moving the plugins one by one, starting with the trustworthy ones such as Askimet, Jetpack, WordPress SEO and so on.
2. Renaming the Currently Active Theme:
When you rename your currently active theme, WordPress cannot find it anymore. It then looks for its default theme, i.e. either Twenty Ten, or Twenty Eleven, or Twenty Twelve. When found, it switches over to either of those three themes (depending on the version of WordPress you’re running) and you might be able to access your dashboard once again.
500 Internal Server Error
The most likely cause for a 500 Internal Server error is a corrupt .htaccess file in the root/base directory of your WordPress installation. In 90% of the cases the problem is solved by deleting the .htaccess file and creating a new one. To delete the file, login to you WordPress root directory via FTP (or any of the previously mentioned methods) and rename the existing .htaccess file to something like .htaccess-corrupt. Immediately login to your WordPress dashboard and head over to the Permalinks option under Settings. Select your preferred permalink option and Save the changes. Your site should be working fine now.
There are other causes for the 500 Internal Server Error but they can be varied and hard to pinpoint. Other troubleshooting methods include renaming the theme, resetting the plugin directory and replacing the wp-includes and wp-admin folders with fresh ones from the most recent wordpress-latest.zip file.
Error Establishing Database Connection
This is one of the most common errors for WordPress Beginners. Its easier to fix as compared to the WSOD problem since we know exactly what causes the error.
- The most common cause is that one of the MySQL database access details is incorrect. As a result, WordPress cannot connect with the database and thus, cannot function.
- The MySQL server is down
- The MySQL user does not have the appropriate amount of permission to modify the database.
- In case of incorrect login details, verify them.
- Make sure your password is within single quotes. If you password happens to contain a single quote, make sure you enclose the password string with double quotes and vice-versa.
- If the MySQL server is down, try restarting it if you have SSH access. Else, contact your hosting provider
- If the MySQL user does not have the required privileges, assign them using the MySQL Database option available inside cPanel
Warning: Cannot Modify Header Information – Headers Already Sent By (output started at /public_html/wp-config.php:34)
This error is mainly caused due to unnecessary spaces or white spaces in the buggy WordPress php file. In order to solve this issue, you need to download the buggy file mentioned in the error message generated. In our case we would download the wp-config.php file.
Next, using a proper editor (my favorite is Notepad++) remove all white spaces or blank spaces between the <?php and ?> tags. There shouldn’t be any unnecessary spaces among them. Upload and overwrite the wp-config.php file via FTP and your problem should be solved.
Failed Automatic WordPress Update
Sometimes due to connection issues and overloaded servers, the automated WordPress installation gets interrupted and you’re left with either tons of error messages or a WSOD. To resolve this, we could follow the steps of a manual upgrade and the issue should be resolved.
- Download the latest version of WordPress and extract the contents in your PC
- Deactivate all plugins if possible
- Login to your WordPress root directory using FTP and replace (overwrite) the files in the base directory with the new ones in the extracted folder.
- Next, delete the wp-includes and wp-admin directories
- Upload the freshly extracted wp-includes and wp-admin folders to your root directory
- Navigate to your wp-content directory present in your webserver via FTP
- Overwrite the files inside this directory with the ones in the freshly extracted wp-content directory
- Never delete the wp-content directory in your webserver – else you might lose all your images and other media
Fatal Error Undefined Function is_network_admin()
Another example of an unfinished automatic WordPress installation. Follow the steps shown above for manually updating your WordPress site.
Briefly Unavailable for Scheduled Maintenance. Check Back In a Minute
Not so brief eh? Well, it may be due to a failed upgrade in which case you need to update your WordPress manually (steps shown above) or because the .maintenance file wasn’t deleted. If its the latter, simply navigate to your WordPress root directory via FTP and delete the .maintenance file.
Fatal Error: Allowed Memory Size of —- Bytes Exhausted
This error is caused due to insufficient memory allocated to PHP process. All you need to do is increase the amount of memory allocated to PHP. There are several ways of doing so. Here are some of them:
1. If you’re allowed to edit your php.ini file add the code to it and restart the webserver:
memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)
2. Edit the .htaccess file located in the WordPress root directory and add the following line of code to it:
php_value memory_limit 64M
3. Edit the wp-config.php file also located in the WordPress root directory and add the following line of code to it:
4. Create a php.ini file inside the wp-admin folder. Open Notepad++ and type the following line of code in it:
memory_limit = 64M ;
Save it as php.ini and upload it to the wp-admin folder located in your WordPress root directory.
You’ve probably noticed that we have set the maximum memory to 64MB. Other allowable values include 128MB, 256MB and so on. Even if you allocate 1GB of memory to PHP, it doesn’t necessarily mean that PHP will consume the entire 1GB. It simply means that the max amount of memory that PHP can use if 1024MB – which is more than enough even for high traffic websites.
It is also worthwhile to note that some hosts have a max memory limit for PHP as 8MB. Yes, that’s sad. Some hosts don’t allow increasing the max PHP memory, in which case, you should change hosts if they don’t update the allocated memory for PHP.
Connection Timed Out
This is a classic symptom of an overloaded webserver. If this happens often, my advice – change your webhost. This indicates that the server is too overloaded to complete the request sent by your web browser. Possible solutions to this problem would be:
- Increasing the PHP memory limit (steps shows above)
- Reset your plugin directory or deavtivate some heavy plugins
- Rename your active theme and switch over to the default Twenty Eleven theme.
Manual Theme Changes Not Shown
Suppose you’ve updated a significant portion of your theme (CSS/ other layout) and the change isn’t reflecting? Well there could be two possible reasons.
- Your local browser cache. Empty your cache and you should be able to see the changes.
- Some caching plugin is installed in which case you need to empty the page cache generated by the plugin and then execute step one.
Maximum Execution Time Exceeded
Every PHP file has a maximum execution time under which it has to finish executing all its lines of code. Generally this error should not happen unless you fall into an infinite loop or a deadlock. That maybe caused due to a faulty plugin or theme. To remedy that situation, perform a plugin reset and/or a theme reset.
If that does not work, then it implies that your web host server resources aren’t powerful enough to complete the tasks within the said amount of time. In order to fix this, you could try increasing the maximum execution time. You can do this by the following ways:
1. Editing the .htaccess file in your WordPress root directory. Add the following line to the .htaccess file:
php_value max_execution_time 60
2. Editing the php.ini file. If your webhost allows it, then add the following line to your php.ini file:
max_execution_time = 60 ;
We’ve seen some of the most common WordPress errors today. I would like to point out that most of the PHP related errors such as connection timed out, maximum execution time exceeded, fatal error – allowed memory size of — bytes exhausted, etc could indicate a poor web host, or one not properly set up to handle WordPress. I would recommend talking to their customer support. If it still doesn’t work out, you could take a look at the list of the best managed WordPress hosting providers or look through our recommended WordPress hosts.