This page may contain affiliate links. Please read my disclaimer for more information.

How to Fix: Fatal Error… for WordPress Websites

If you just visited your WordPress website and saw a scary Fatal Error message that looks something like this:

Fatal error: Some message here about what it cant do /home/yourusername/public_html/wp-content/plugins/plugin-folder-name/plugin-file.php on line ###

Don’t panic!

I’m going to show you the easiest way to diagnose and solve this problem.

Need a Done-for-You Option?

Done-For-You Service

Want us to fix it for you!? If you don’t want to waste time with these tech issues, we’re happy to do-it-for-you! You can feel confident knowing you’ve got an expert fixing it for you!

PRO TIP: Before you begin, be sure to backup your site!!

Let’s Diagnose This!

This error is usually a result of a plugin or theme. As indicated by the last bit in the error message shown above /plugins/….

They could be conflicting with each other or a new WordPress update. It could also be caused by a failed plugin/theme update.

Or the fact that your plugins and/or theme need to be updated.

Usually when this happens, you will be unable to access your WP Admin.

Therefore, we will need to access the database in order to get this done.

Below I show you how to do this with cPanel and WP Engine‘s dashboard, but ultimately you need to get to phpMyAdmin.

cPanel Access to phpMyAdmin

  1. Type “PHP” in the search bar
  2. Click on the “phpMyAdmin” icon

WP Engine Access to phpMyAdmin

After selecting the “Install” you want to work with, if you have multiple, follow these steps…

  1. Click on “phpMyAdmin”

Working in phpMyAdmin

Once you’re in the phpMyAdmin you will see a dashboard that looks similar to this below. There are different versions which change the UI of the control panel but the steps will be the same.

  1. Click on your Database name in the left column
  2. Click on “wp_options” in the left column
  3. Need to move to page 2 by clicking on the right arrow

NOTE: Please do not do step 4 and 5 consecutively. Use the Fatal error message on the screen to determine where you need to start. If it’s a plugin, then proceed with step 4, if it’s a theme then you’ll want to go to step 5 below.

  1. Find the table for “active_plugins” we will edit this table in next section
  2. Find the tables for “template” and “stylesheet” we will edit these table in the next section as well

Clearing Content in Tables in part 4 and 5 from above

  1. Click “Edit”
  1. Cut all content (control+c or command+c) in the big box and save it to a note pad and delete from the box
  2. Click “Go”

Next Step: Did this resolve the problem?

Once you’ve completed these steps above, you will want to refresh your website homepage and see if it pulls up.

Warning: Without your theme and plugins, you site will look much different, but the point is to diagnose the issue.

If the site is loading, you now know for sure that the problem is either your theme or plugins or both.

Great but now what?

With the problem theme and/or plugin disabled, you will be able to access the WP Admin again.

If it was a plugin issue and you followed step 4 above, you will need to reactivate your plugins, except for the one with the issue. At least until you’ve done the following recommendations.

You’ll want to check your updates. Are there any for your theme / plugins. Is there a new WordPress update that just completed?

You may need to reach out to the plugin / theme developers via their support forms to see if anybody else has reported the same issue. If not, be the first!

Wrapping up!

Getting the plugins and themes deactivated is the easy part. Really figuring out how to solve the problem is where it gets tricky.

I will say that in most cases a quick update will resolve whatever issue there was, but in those cases that it does not, you’ll probably want to reach out to your developer to help resolve the problem for good.

Done-For-You Service

Want us to fix it for you!? If you don’t want to waste time with these tech issues, we’re happy to do-it-for-you! You can feel confident knowing you’ve got an expert fixing it for you!

29 thoughts on “How to Fix: Fatal Error… for WordPress Websites”

  1. My client would really like to get the MailChimp WooCommerce plugin installed, and I have been trying for several months to resolve, hoping that MC would update the plugin so that it could be used with our installation. However, every time I go to install this plugin, it breaks the site.

    This is the error I am getting when installing on our staging site:

    Fatal error: Call to undefined function wp_get_raw_referer() in /nas/content/staging/walaswim/wp-content/plugins/mailchimp-for-woocommerce/includes/class-mailchimp-woocommerce-service.php on line 373

    ==
    WordPress version: 4.1.16
    PHP version: 5.6

    Would be very grateful if you could help get this resolved. Let me know if there is additional information that is needed.

    Reply
    • That is a mighty old WP version. Have you tried with the latest version to see if you get the same error? Have you reached out to the plugin developer? If you have done both of those things and still having an issue, this will require a lot of troubleshooting, so if you need further assistance after that please use this link to submit a ticket. https://wp.me/PisGP-1WP

      Reply
  2. I tried to open a five-year-old post and got the fatal error. Later posts open, but not earlier ones. I have not added plugins or changed the theme for a long time. I can get to the edit screen for the post, but clicking on view post from there gets the same error. My WordPress and theme are up to date.

    What now?

    Reply
    • Hey David.

      Is the the error you are getting?

      Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3618686 bytes) in /home3/dmguion/public_html/music/wp-includes/functions.php on line 440

      This would indicate that you have a PHP process that is maxing out your available memory. You can see if your host allows you to increase your memory but that is not a long term solution. That will just buy you time.

      You will want to dig into what is causing the over usage of memory.

      I can work on this for you if you’d like, just submit a ticket here => https://wp.me/PisGP-1WP

      Reply
  3. This post just saved me so much time. Thank you for putting this together. I had a plugin do this and couldn’t figure out how to get around it without being able to login. Your a website saver Chris!

    Reply
  4. Finally! After millions of articles about changing memory limit to “fix” this problem, I found one more clever… and working. Thank you

    Reply
  5. hello Tech Savvies, may you help me fix this error please

    “Fatal error: Can’t use method return value in write context in /home/paggelco/public_html/wp-content/plugins/wc-multivendor-marketplace/core/class-wcfmmp-commission.php on line 67.”

    Reply
  6. when i run the malware scanner from cpanel it has removed some files,can you help me resolve this error.

    Fatal error: Call to undefined function avada() in /home/zealitcc/public_html/wp-content/plugins/fusion-builder/inc/lib/inc/class-fusion-dynamic-css-inline.php on line 41

    Reply
    • Ahmed,

      Hopefully you got my messages through messenger? Incase you didn’t, here is what I sent you..

      It would have put them into a Sucuri quarantine directory. You should be able to find them there. Typically that would mean the file was infected or corrupted. You may want to get a fresh copy of the plugin and upload a clean copy of that file.

      Please let me know if you need more help.

      -Chris

      Reply
  7. Hi

    following is my site problem, what shall I do, please

    Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/eboorgse/public_html/thememasterly.com/wp-includes/functions.php on line 4773

    Reply
    • Have you tried deactivating your plugins? And switching themes?

      If that resolves the error, you know it is a conflict with a plugin or theme.

      If it doesn’t resolve the issue, I’d recommend installing a fresh version of WordPress Core files.

      Let me know..
      -Chris

      Reply
  8. Hi,

    We are trying to reactive a website which was set up by someone else and have not had much help from that person. I do have login information, but when I attempt to go to the login, I get this message:

    Fatal error: Call to undefined function get_custom_logo() in /data/17/1/148/117/1800280/user/1949088/htdocs/wordpress/wp-content/themes/illdy/inc/back-compatible.php on line 7

    We have limited knowledge of coding and html but would like to just be able to update the site. Any help would be greatly appreciated!

    Reply
  9. I’ve paid for a one-job fix but cannot access my site to create a user account for you (even if I knew how). I need to a fatal error fixed after I updated plugins. How do you want me to proceed?

    Reply
  10. Below is the error appears when i activate Plugin…
    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘;’ in /home/vol10_1/epizy.com/epiz_28583073/htdocs/wp-content/plugins/ninja-forms/ninja-forms.php on line 15
    How I Solve it..

    Reply
    • Hi Shakir, you will first want to make sure you have the latest version of Ninja Forms, and that your system meets the recommend PHP, WP version, etc, for that plugin.

      This is a common issue when there is a conflict between a plugin and your theme or a plugin and another plugin.

      You can use the guide in this tutorial to help you perform a conflict test: https://wpmantis.com/troubleshoot-wordpress-plugin-conflict/

      You will want to deactivate all plugins, then try activating the Ninja forms plugin, if that works without issue, try reactivating, one at a time, each plugin until you get an error.

      If that does not turn up anything, you could reach out to the Ninja Forms support team: https://wordpress.org/support/plugin/ninja-forms/

      Hope that helps.

      Reply

Leave a Comment

Join The Mantis Report

Get weekly WordPress news, resources, tutorials, and other tips from our experts.

Name*
This field is for validation purposes and should be left unchanged.

Skip to content