WordPress is the best Content Management System that is loved by most businesses because of its flexibility and user-friendly nature. This is the reason why major businesses like TechCrunch, CNN Press Room, The Rolling Stone, etc., have invested in this CMS.
But every application has its own pros and cons, WordPress is not any exception. You do not need to freak out if you are seeing WordPress fatal error warnings or if your website has suddenly stopped working. It is good to take WordPress support for WordPress update fatal errors.
You may face this when you are installing a theme or plugin. It may also arise when you are trying to add codes.
Now when WordPress fatal error arises you cannot access WP Admin. For this, you must access your database to get it fixed.
Access the phpMyAdmin
You can access the phpMyAdmin in two ways:-
- Through the dashboard of WP Engine
First, choose the option “Install”. Now if have to work with multiples, please make sure to check these steps:-
Tap on “phpMyAdmin”.
- Through the dashboard of cPanel
- On the search bar, you need to type “PHP”
- Then you need to tap on the icon “phpMyAdmin”
Functioning PhpMyAdmin
Once you navigate to phpMyAdmin you can see the dashboard that is much more similar to like the image below. You can come across the various versions that change the Control Panel’s User Interface.
- You need to first tap on the Database name.
- Tap the option “wp_options”.
- Click the right arrow to go to the next page i.e Page No 2.
So, how can you fix these WordPress fatal error warnings?
Fatal error from WordPress theme
Now if are facing this issue when you were upgrading or installing the theme, then delete it. For this, you must delete your theme from the server. You can use FTP and login to your server to make the changes.
You will come across your theme folder. For this, you need to navigate to “wp-content” and click the action “Themes”. From here, you can rename or delete your theme. It will assuredly bring your website back to life if you had a fatal error from the WordPress theme.
Fatal error from WordPress plugin
If your website still shows WordPress fatal error then please follow the second step. Here, you need to visit the folder “wp-content”. Then you must rename your plugins folder and disable all your plugins on the website.
If this step resolves the error then you need to rename the folder name of the plugins to the original.
Next, you need to enable the plugins one at a time to check the point of cause. This way you can find the culprit who is troubling you in the first place itself.
If done with the above steps, refresh your homepage to check if WordPress Fatal error still pulls up.
Htaccess file
If deleting/ disabling the themes and plugins does not fix your WordPress Fatal error, delete the .htaccess file.
Make sure to make a copy of it and secure it before deleting the file.
Now, if your website starts to work again after you delete your .htaccess file. Click “Settings” and check for the option “Permalink”.
Make sure to save your settings again and do not make any changes/ If you do it will construct the .htacess file again with the basic rules of WordPress.
WordPress Fatal error out of memory
Now if you see the message “WordPress Fatal error out of memory” or “PHP memory limit error”, please read further.
It simply means that you have not allocated enough resources for the installation of your WordPress to correctly operate. You will see the message as
This does not mean that your website is not broken. But in this case, you need to make the changes to the installation process of WordPress.
You need to specifically expand the memory if WordPress Fatal error is out of memory. Mostly 64 MB is more than sufficient. However, in certain cases, you may need to run more PHP scripts. So, you need to expand the PHP memory size.
To check the memory limit, you need to access your WordPress dashboard. Then you must browse for the option “Tools”. Go for the option “Site Health” and click “Info”. You can tap on the tab “Server” and check the PHP memory limit entry.
In the same place itself, you can check the details such as PHP time limit and PHP version. Now, if you have your memory limit below 64, please expand your limit. Here we will discuss the two methods:-
- Manually expand the PHP Memory
For this, you need to modify the two files wp-config.php. and .htaccess manually. However, if you make changes to the .htaccess file of WordPress installation you may end up with site-wide errors. It is because this file identifies how your file interacts with the server.
wp-config.php is one of the safest options to expand the memory limit of PHP. You may require SFTP (Secure File Transfer Protocol) client like FileZilla.
When you access your site using SFTP, open the root folder and check for the wp-config.php file.
Use the text editor. Once you do it, you may witness something like this:-
You can simply add the single code line after the <?php tag.
Please ensure to add the below line code.
define( ‘WP_MEMORY_LIMIT’, ‘XXXM’ );
Make sure to replace the variable “XXX” within this line itself to expand the memory. You can even double or set your PHP memory limit to 256 MB. Write the following code:-
define( ‘WP_MEMORY_LIMIT’, ‘256M’);
Now, if you are clear with the number, save these wp-config.php changes and close your editor.
Visit the dashboard of your WordPress and tap the option “Tools”. Next, go for the option “Site Health” and tap the button “Info”. Lastly, click the tab “Server”.
In most scenarios, manually declaring the PHP memory limit will not work. It is because it does not have essential permission to change the value. If you cannot manage to make changes to the PHP memory limit manually, please try the next option.
- Upgrading the hosting plan of your Website
Employing a decent WordPress hosting provider will fix the Fatal error that is allowed for the memory size of WordPress. If you encounter this trouble, make sure to upgrade for a better hosting plan.
It will ultimately lead to expanding the available PHP memory limit if you have a fatal error uncaught error in WordPress.
What are the main culprits behind WordPress Fatal error?
There are numerous factors that cause WordPress Fatal errors. They are:-
- Bad Coding
If you have used a poorly coded plugin then the problem will arise irrespective of plugins/ themes you employed.
- Problem with WordPress
There may be times when the Plugin code. This will be incompatible with the code that is used for the core files of WordPress. This is the reason why numerous plugin developers update the plugins as soon as the WordPress’ new version releases. It is an affirmation that the plugin is still compatible.
- Problem with Another Plugin
There might be many cases when one plugin will not play nicely with another plugin. This case generally arises particularly in a case where plugins give functions similarly.
- Problem with the Theme
Now there are numerous theme functions that are placed in the file functions.php.
The principle in extending the functionality of the theme employing functions is similar to adding the functionality via the plugin.
The problem arises when you have coded badly or there is any conflict with another plugin.
If you have still have any concerns regarding WordPress Fatal error, please hire Just AnotherWP.