WordPress Troubleshooting Logo (Sebaf IT)

[How to] Troubleshooting WordPress – Login to Backend (wp-login.php) throws critical error.

Recently I received an email from my WordPress Installation warning me about this error:

     Hello!
     WordPress has a built-in feature that detects when a plugin or theme is causing a fatal error on your site and notifies you
     with this automated email.
In this case, WordPress has caught an error in one of your plugins, Cyclone Slider Pro.

So, in fact the website was actually running fine, but logging in to the backend administration area wasn’t possible.

 

These were my steps to troubleshooting this phenomenon:

1) Enabling WordPress Debug Mode.

To enable the WordPress debugging logfile, you need to add the following to your wp-config.php file:

     define( 'WP_DEBUG', true ); 
     define( 'WP_DEBUG_DISPLAY', false ); 
     define( 'WP_DEBUG_LOG', true );

Once activated, just make a few clicks on the website and try to login to wp-login.php again to trigger writing up an errorlog-entry into the logfile.

The logfile that will be created is named debug.log and is located in your /wp-content folder.

 

2) Identify (or confirm) the plugin that is causing the issue.

In my case, the debug.log said this (among other things):

     PHP Fatal error:  
     Uncaught TypeError: Cannot access offset of type string on string in 
     /mnt/web197/e1/83/2265391303/htdocs/[my-site-name]/wp-content/plugins/cyclone-slider-pro/classes/codefleet/class-codefleet-plugin-updater.php:66

 

3) Disabling all plugins via the WordPress Database (phpMyAdmin)

     Step 1 – Open your database in phpMyAdmin
     Step 2 – Click wp_options
phpMyAdmin Table WP_OPTIONS

phpMyAdmin Table WP_OPTIONS (but with ftx9-prefix)

     Step 3 – Locate “active plugins”

"phpMyAdmin

     Step 4 – Disable all plugins by emptying it out.
phpMyAdmin Table WP_OPTIONS cell active_plugins

phpMyAdmin table WP_OPTIONS cell active_plugins

 

4) Login to the administration area and re-activate all other plugins, that weren’t causing problems.

5) Identify the cause for the plugin to fail. Google is most likely your friend here 😉

6) Done.

Posted in Manuals & Tutorials, WordPress.