How to find a plugin or theme on WordPress incompatibility? [Quick Guide]
On a WordPress site, an incompatibility between your plugins or your theme can create malfunctions on your website making it unusable. At first sight, can be taken aback by this kind of issue, however there are simple methods that can identify the source of the problem.
To identify the plugin or the faulty theme, you can use the logs debug mode. To add a few lines of code in your wp – config.php in order to see these error reports. These few lines should be added below the constant define (‘WP_LANG’, ‘en_US’) .
first of all, here are some explanations on this code:
- define (‘WP_DEBUG’, true) : this option controls the display of warnings and error messages. To enable it, add the true reference
- define (‘WP_DEBUG_DISPLAY’, false) : this option allows the display of errors directly in the HTML of the page. In our case, this option is false. Errors will be visible directly from the WordPress administration via a plugin.
- define (‘WP_DEFINE_LOG’, true) : this option enables the logs for your web site
to view the logs, I suggest you to use a handy plugin that gives you access to the logs directly from your WordPress administration. This plugin is WP Log Viewer .
After installation via the menu extensions, you can read your logs by going to the menu Tools then log viewer
in this example, we can see that an unknown function, ma_function returns a fatal error. You can also see which line the error as well as the name of the PHP file which is located problem
with this plugin and these few lines of code, you can easily find errors that crash your WordPress site.
the logs using
at WPServeur for example, the console makes managing the logs for your WordPress sites. Indeed, you have access quickly to your report directly from the console. Via the FTP & SQL – LOGS, tab you can download and view your logs to identify your problems
once the logs are downloaded, it must be read with a type editor Notepad ++ for example. Playback of the file is not simple and notified errors, it may be longer or shorter.
in the logs, there are several information:
- the date and time of the log statement
- error level
- explanatory text on error
- the target of wrong (web environment, the name of your WordPress, path to the plugins folder, plugin)
first a parenthesis is needed about the types of PHP errors encountered on these logs. Each error for a more or less significant impact on the script:
- E_ERROR or Fatal error : this error is the stronger and stops the script. In the case of the example above, the optimizePressPlugin plugin calls a function that does not exist where the appearance of the fatal error
- E_WARNING or Warning : this error is a run-time error that does not stop the script. In the above example, an invalid argument is present in a PHP loop. This error is in the subscriptio plugin
- E_NOTICE or Notice : this warning is a non-critical runtime error that does not stop the script
- E_PARSE or Parse error : these warnings are often the careless or oversights in the code during development of plugin or a theme (forgotten semicolon missing parenthesis…)
using FTP to solve an incompatibility
thanks to the logs, the faulty plugin is quickly identified. We must now turn it off via http://FTP. Navigating the hierarchy of your web site, please access the folder wp-content then enter the folder plugins:
once in the folder plugins rename the faulty plugin. In our case, we rename the plugin folder optimizepressPlugin by adding at the beginning of my record three XXX.
Realizing this manipulation, WordPress no longer recognizes this extension and suddenly it is automatically disabled.
Rename the /plugins/ folder
If you have much too many plugins, you can in this case rename the whole plugins like this:
this manipulation will disable all plugins to your WordPress. For minimum disruption possible your users, remember to put your site in maintenance using a coming soon plugin .
In the web site tree, you now have a folder XXXplugins . Now create a new folder plugins and follow the procedure below to identify the incompatible extension:
- click right into the window (at the level of the green square :)) then create a folder.
- Name this folder plugins .
- Drag and drop one of these extensions in the file XXXplugins into the new folder plugins .
- For each trip, check the site to see if the bug is still present.
- So, you will easily identify the responsible plugin.
good debugging at all!
your subscription is taken into account, please confirm it by checking your emails!