How To Fix Common WordPress Errors

Most of us probably remember the good old days when we got Windows BSoD. Blue Screen of Death was a nightmare for most of users. Something similar happens with WordPress users, when they get certain errors while developing a website. And yes, emotions are probably the same as we had with BSoD. Some errors block the progress of a website and do not allow continuing the work.

This moved me to collect some basic WordPress errors users may face on a daily basis. But before hitting the most common issues that come between when launching a WordPress site or making new steps as a CMS newbie, I shall suggest to memorize these 5 rules.

1. Never install a plugin that is not in the list of WordPress directory. There is a bunch of popular websites with a lot of forums and chat rooms allowing users to upload or suggest this and that plugins uploaded on third party websites. These are not the places where a WP newbie shall hang out. Almost all necessary plugins are officially registered over WordPress.org and are available for downloads. Plugins from other origin can easily compromise security of your website as well, since there is no guarantee that code of such plugin does not contain vulnerabilities or is not purposefully malicious. Maybe in the future you’d like to discover premium theme and plugin websites, like Codecanyon.net, but as for now, I shall recommend to stick with WordPress.org only.

2. Try to experiment with plugins and themes on localhost or remote server. In this way users shall always keep the main sites clean and prevent any damage when editing or modifying any plugin or a theme.

3. Set WP_DEBUG = true in test site to check whether any plugin or theme generates errors.
Set WP_DEBUG = false in working site to hide any possible error. In this way you will increase the security and no user will see nasty errors on your website.

4. Always use recommended plugins and themes when trying to download them on WordPress.org. Pay attention to higher download count, feedback in reviews, and check if the plugins and themes are constantly being updated. Another good thing is to contact support team to make sure that they respond to customers. This is especially important for those who want to customize a plugin or a theme. You shall always have a chance to contact authors of a plugin or be in touch with support team.

5. Don’t forget about regular backups! This is an essential that shall not be missed under any circumstances. Backup both database and files.

White screen death error

This happens when user sees nothing on his WordPress website, but only a white screen. This is commonly called White Screen Death Error and can be fixed easily.

First of all remind yourself what caused white screen to appear. Did it happen after recent plugin/theme installation or maybe you have changed some settings or backend code of an active plugin. These are the main reasons that cause white screen death.

1. If the case was connected with a plugin or a theme, go ahead and deactivate the one causing white screen. IMPORTANT: in some cases, if users cannot remember previous modifications they had made before white screen, it is recommended to deactivate each and every plugin one by one in order to detect the one that causes the conflict. In this way you should see your content restored to its former glory.

2. Try to upload an original, unmodified version of the same plugin from WordPress Plugin Directory if there were any changes taken.

3. In some rare cases white screen can appear all over WordPress dashboard. In this cases you will have to use an FTP (file transfer protocol) client to access your files and delete or deactivate the plugin you were modifying. It’s a simple way to navigate between files and folders, so no worries about messing around anyhow. Or if you are still not sure about FTP access, let us show you how to do that.

How to connect to a FTP server

This allows to edit, modify and drag and drop files from your local computer to another computer over the Internet. The other computer is the server housing your hosting account. This is why the first step is to contact your hosting company and ask for FTP access or login details. TP account information can be found in cPanel of your hosting account as well. Hosting companies normally have FTP manager in settings options. Or alternatively, you can create a new account and give reading and writing permissions to /wp-content/plugins directory, again within your hosting cPanel. After setting up FTP protocol with your host, follow the steps described below.

First of all…

  1. Install and download an FTP client program. FileZilla for example
  2. Install FTP client just like any other program over your computer
  3. Click site manager at the top of your FTP
  4. Create a web-host folder /if you create FTP by yourself
  5. Name your host /if you create FTP by yourself
  6. Navigate to the folder where your WordPress files are
  7. Find wp-content folder, locate plugins folder
  8. Open the plugins folder and locate the plugin you were working on just before the white screen of death appeared and delete it. Alternatively you may rename the plugin, let’s say example_inactive
  9. Return to your browser and refresh your website

In any other case feel free to give your host a call and present hostname, FTP server name, username and password in order to enter your inquiry.

It’s also an option to use WordPress debug function to see what type of errors are being outputted. For this case you shall add the following code in your wp-config.php file.

error_reporting(E_ALL); ini_set(‘display_errors’, 1);

define( ‘WP_DEBUG’, true);

Once you add the following code, the blank screen shall appear with the list of errors, warnings, and notifications. The following could help to determine the root cause of an error(s).

Instead of FTP access, you can also use Panel, SSH or any web-server control panel’s file manager.

WordPress Memory Exhausted Error

This message can sometimes come as a white screen as well. The reason of such error is that a plugin or a script is eating up memory of the website. In other words, your website is trying to do more than your server can manage. The simplest solution is to increase the allocated memory.

For this, go to your wp-config.php file (which is found in root directory of the website) and add the following code:

define (‘wp_memory_limit’, ’64M’);

IMPORTANT: if you are on a shared web-host, you might not be allowed to increase your memory limit beyond a certain point. In this case you shall contact your host and ask them to increase the memory limit.

How To Speed Up A WordPress Site?!

To understand the reason behind the slow work of your site, you shall grasp how WordPress blogs or websites work. The server on which your website is connected to processes PHP scripts establishes a database connection. So the bigger the content of your website, the busier it goes through server.

Of course, you shall recommend sticking with top hosting services and companies with faster servers.

You shall consider installing performance optimization plugins including W3 Total Cache or use Plugin Performance Profiler (P3), these guys create a profile of a plugins’ performance by measuring their impact on load time of your site.Another nice and helpful caching engine plugin is called WP Super Cache. However, I shall suggest to use such plugins to check particular cases only, and deactivate them later on, as such plugins can slow down websites we well. This shall bring the list of unwanted plugins that can actually cause website to slow down.

WordPress Has Been Locked Down in Maintenance Mode

Briefly unavailable for scheduled maintenance. Check back in a minute. That’s another common error meeting WordPress users from time to time. The error comes when users attempt to update a plugins and internet connection goes down or another computer crash comes between at that very moment. The error means that users is both, locked-out from the front-end and admin page of website/blog.

In this case WordPress creates a root catalogue on your server with a temporary file called .maintenance when ones is updating something on back-end of a website. And this file would be the reason of an error. So, if something goes wrong while updating a plugin or a theme, .maintenance file might not be deleted automatically as it’s supposed to and the error message gets stuck.

The simplest solution for this error is to delete .maintenance file in your WordPress folder.

1. Log in to your FTP program and open the folder that contains your WordPress files

2. Detect and delete the file named .maintenance

3. Log in to WordPress and try to process the updates again

Warning:Cannot Modify Header Information — Headers Already Sent…

This error means that you have messed up your wp-config.php or left some unnecessary spaces inside file(s) or some php files generate output when they should not. This output can be an error, notice or database error.

Before fixing this error, I shall advise to make a backup of any files that are going to be edited.

After that download your wp-config.php down via FTP and open wp-config with your favorite editor, and remove all spaces before <“?php” and after “?”>. After editing the file(s), save them upload and replace.

Set WP_DEBUG = false, if this output is PHP error or notice, it should disappear afterwards. If still appears, probably there is some logical error in one of the plugins or themes.

500 Internal Server Error

And the last one, the one I avoided speaking about till the end of the blog. This error can be really bad, but the good news is that you have learned a lot about solving issues in upper solutions, so some of the methodology of curving this error is the same as the previous ones.

Yes, the issue is about Internal Server Error, or commonly known as 505 error.

Before hitting the spine, let me suggest deactivating all plugins and themes one by one and seeing if the error is connected with one of these. If not, the case can come from bad .htaccess. Corrupt .htaccess file is located in the root/base directory of your WordPress installation.

Depending of your FTP client, detect .htaccess file (make sure that viewing of hidden files is enabled). If not, Filezila, for example, gives a simple way to turn hidden files on, just click ‘Server’ menu at the top of the program and then select ‘Show hidden files’. After that go to your WordPress root directory and rename .htaccess file. Let’s say to .htaccess-corrupt., for example. Or alternatively delete .htaccess file and re-create it.

After that, go to your WordPress back-end and select settings menu from toolbar. Navigate to ‘Settings – Permalinks’, and then reset your permalinks. Save the changes.

There are some complex issues connected with this error, but it requires more technical skills. In some cases users may need to re-upload the wp-admin and wp-includes directories. Rename themes or reset plugin directory.

Max_file_upload limit, post_max_size or max_execution_time errors

In some cases when getting “max” errors, users shall increase the maximum size of data that is allowed to be sent to server.

Change these lines in php.ini

php_value upload_max_filesize 100M

php_value post_max_size 100M

After increasing the PHP limit don’t forget to restart apache.

If you don’t have access to php.ini you may add the following in theme functions.php file

@ini_set( ‘upload_max_size’,’100M’ );

and

@ini_set( ‘post_max_size’, ‘100M’);

max_execution_time is the maximum time that PHP script can run. Sometimes some actions require more time and when reaching max_execution_time, the script generates fatal error. To avoid this, find out which PHP function is running too long and add set_time_limit(0); at the beginning of that function. In this way you will ask permission for the script to execute infinitely long after that point.

Gregor is an experienced technology blogger, focused on covering WordPress related topics. He is a regular contribur at Web-Dorado blog, mainly writing on the latest premium WordPress plugins and themes.

Leave a Reply

Your email address will not be published. Required fields are marked *