Best Way to Overcome WordPress Fatal Errors

WordPress is a freeware open source blogging platform that is used by millions of people around the world. WordPress has rich features that make it unique. WordPress is easy to use and too easy to install, anyone with basic knowledge of domain name and Website Hosting can own its website in minutes.

For using WordPress no coding is required, everything can be achieved by installing different plugins. Despite all these easiness provided by WordPress, many people start experimenting with their WordPress powered website by using a different combination of plugins available.

The plugin in WordPress is very powerful, it can make your website look good and on a contrary, it can also make your WordPress blog fatal. If you are in a similar situation where you find that your website is not working as desired or it is giving some sort of fatal error then this article is for you.  Here we are a discussion about five WordPress fatal errors that WordPress users often come across.

Overcome 3 Most Common WordPress Fatal Errors 

1. Error Establishing Database Connection

This problem is faced by different users at some point or the other when they have started using WordPress recently or have experimented with their WP-Plugins. So to solve this problem we have different approaches. Firstly you have to understand, why this problem occurs. The main reason for this error (as the name suggest) is Database misconfiguration or it happen when your Database has not active.

So now you know the problem let’s talk about it solution. The solution for this problem is can be different:

Solution 1: Undo Recent Changes

If you have recently changed something in your WP internal php files then please undo the changes if you know what you did.

Solution 2: Remove or uninstall the recently installed plugin

If you recently installed any of the plugins lately after which the error has existed then you need to remove that particular plugin. As you don’t have access to your site, you can directly use FTP or file manager available in your cPanel and remove the Plugin folder. You will find the plugin folder inside the wordpresswp-contentplugins and search the plugin you had installed and deleted the whole folder. You are done.

 Also read: Everything you need to know about WordPress Migration

Solution 3: Check your server status

Check your Web Host and check whether MySQL server is running or not. This is the main reason of concern to solve this problem. Most of the people have this issue only. Their Database server is not running or it has been blocked by the hosting provider.  Or the server is unable to handle the traffic load. If the server is not running check the issue and contact your hosting helpdesk.

Solution 4: Check Configuration with Database

You can also check WP-Config.php file inside the WP folder. Check whether database name, username and password is correct or not. Check for the lines below.

define(‘DB_NAME’, ‘database-name’);define(‘DB_USER’, ‘database-username’);define(‘DB_PASSWORD’, ‘database-password’);define(‘DB_HOST’, ‘localhost’);

2. Can’t access WordPress admin area

If you lose the wp-admin or the WP admin panel access then your website might me at risk. After entering the correct username and password if your WordPress Admin area is showing error then possibly you had been hacked. If you click on reset password and you don’t get any mail then it’s surely a hack.

So the only solution to this problem is to reset your password directly through database. You can use phpMyAdmin to access database. So here are steps to reset your password from database directly.

Step 1:  Access phpMyAdmin using cPanel

Select Databases option at the top and select WordPress Database for that particular website.

Step 2:  Select users Table from WP Database

Now inside the Database you have to select the users table (whose default name is wp_users) with the table name prefix.

Step 3:  Edit the Admin user details

Now select the edit text near the admin user and update the details. Select the MD5 from the function column from the user_pass and replace the value field with your new password. Under the function column, select MD5 from the drop down menu and click on the Go button.

You are done! Now you can access your WP admin panel with your new password.

3. WP White screen of death

If you are accessing a page of your WordPress site and you find that it’s totally blank. Every time its reload it just gives a plain White Screen and nothing else. This is called as WordPress White Screen of Death.

This is cause mainly due to PHP limit to use memory as the PHP script running may be too heavy and it is taking away all the memory allotted. It can also happen due to misconfiguration of server. Here are some solutions that may help you with this fatal error. Here are some Easy Ways to Fix WordPress White Screen of Death.

Solution 1: Increase WordPress PHP memory limit 

You can try increasing the memory limit of PHP in WordPress so the memory is not exhausted. To increase the memory limit if WordPress PHP just modify the wp-config.php this is located in root folder. Use ftp or file manager from cPanel to edit the file. Just paste the below code just before the line that says ‘That’s all, stop editing! Happy blogging.

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

After saving your changes, check for the error again.

Solution 2: Avoid too many plugin and heavy plugins

Your website may have become heavy due to large PHP script executing at a time. This may happen because of any plugin which is adding extra overhead to your site. So try disabling all the plugins you installed very recently or you can disable all the plugin and enable them one by one to check out the faulty plugin.

Solution 3: Avoid heavy theme

Sometimes apart from plugin, theme is also the reason for the white screen fault. You can change your theme and see whether your problem is solved or not. Heavy themes can be the root cause of this problem so please use a light weight theme for your blog.

You can copy and backup your theme folder using ftp or file manager and delete that folder. So the default WP theme would be activated. Then verify the problem and then you can reactivate your theme by copying it back from backup.

Solution 4: Clear your cache memory of cache plugin

Sometime your Admin panel works fine but your website is showing white screen this can be the problem of your cache plugin. So you can clear your cache and see whether your problem is solved or not.

Solution 5: WordPress Debug mode

If the above solutions are not working for you then you can use the WordPress Debug mode to find the errors. To use Debug mode of WordPress modify your wp-config.php file,  just add the following code to this file.


error_reporting(E_ALL); ini_set(‘display_errors’, 1);define( ‘WP_DEBUG’, true);

After adding the above code, your blank screen will now show all the Warnings and errors. The warning will help you in determining the white screen problem. You can learn more about WordPress Error log and Debugging mode.

Solution 6: Fresh installation

If nothing works for you then the only way to remove this error is to reinstall a new and fresh copy of WordPress by removing the old files. There may be the problem with your WordPress files, they may be corrupted, so remove all the old files and add the fresh files and connect it to database by config file.

4. PHP Warnings and Errors

If you are not at all good in programming or you don’t know what programming is then do not try to follow any such tutorial about WordPress that is directly telling you to alter your php source code. This is the reason why these types of WordPress Error pop up.

If you have changed any code in any of your PHP file inside WordPress directly or indirectly, just undo the changes if you know what you have done. If you don’t know what you changed in a particular file then use FTP credentials and re-upload that file or files from WordPress folder directly that would solve the problem. You can download WordPress directly and extract the WP zip file and re-upload that particular file from the extracted WP folder.

Conclusion

WordPress Fatal Errors can be of many types. We have covered some of the major ones.  If your Problem still exists try to reinstall WordPress and connect it the old database. Always try to use light weight plugins and themes to make your website faster.

If you are not the programmer don’t try to modify the source files of your WordPress installation. Always choose best Hosting providers for better security, bandwidth and uptime. You can use free Hosting like 000webhost or some paid ones like BlueHost and Hsostgator. Thank you for reading this post. Happy Blogging.

Leave a Comment

Exit mobile version