One of many scariest issues that may happen with a WordPress consumer is that you just set up a plugin, and upon activation, you get a white display of demise.
This display, the place your superbly crafted web site as soon as lived, is now plain white or produces a line or two of unformatted textual content.
A plugin battle is when you will have two plugins put in, and whereas they each work high-quality, working them collectively breaks the positioning.
It normally occurs when plugins run in tandem, they usually each come packaged with the identical or related library capabilities. There’s a naming battle, and PHP produces an error.
This text will focus on find out how to repair them.
Plugin Conflicts Are Changing into Extra Uncommon
Initially, plugin battle: the place anyone installs a plugin that conflicts with one other plugin, is changing into extra uncommon.
WordPress, in the previous couple of years, has launched protections in place which means if an error does happen, reasonably than activate the plugin absolutely, it’ll backtrack routinely, present an error, and go away the plugin deactivated.
For almost all of customers, that is what they see.

At this level, an investigation must be carried out in a staging setting with this plugin, however except it’s a singular plugin, another could should be discovered that doesn’t battle together with your setup.
Plugin conflicts are likely to happen once you set up a Should Use (MU) plugin through a service like FTP, an replace to a number of plugins takes place, or you will have a customized plugin activated and adjustments are pushed to the server.
I’ll stroll you thru my means of resolving plugin conflicts.
Do You Have Entry To WordPress?
To start, the primary query you need to ask is in case you have entry to WordPress.
In the event you do, typical knowledge dictates that the plan of action to take is to deactivate all plugins and swap to a default theme, to attempt to troubleshoot the place the issue happens.
If you’re doing this on a stay web site, this isn’t best, as the positioning should have a whole lot of performance.
A unique method is to put in the Well being Examine and Troubleshooting plugin. Putting in this plugin would let you run a model of the positioning with a default theme, and no plugins put in.
Merely activate every plugin in flip till you establish the one that’s inflicting the difficulty after which go away that one deactivated.
Make sure that the theme is the very last thing activated, as customized themes may use performance in plugins that might convey down the positioning.
If You Don’t Have Entry To WordPress
In the event you don’t have entry to WordPress, then there could possibly be a little bit of a course of with a purpose to diagnose and repair the issue.
This method is what I take as greatest as I can when diagnosing plugin conflicts. It may be carried out in any order, relying in your information and what you will have entry to.
Have Entry To The Administrative Electronic mail? You Might Get An Electronic mail
When you have entry to the administrator electronic mail with WordPress (set in Settings > Normal), it’s possible you’ll obtain an electronic mail.
This can let you put the positioning into Restoration Mode. From there, you may log in, and it’ll establish the plugin that has the difficulty, and you’ll deactivate it.

Examine The Hosts’ Log File
Step one could be to verify the host’s log file.
Relying on the host, it could be simply seen in your host’s dashboard or from inside cPanel, however when you solely have a file browser, they are typically put exterior of the /public_html/ or /www/ (that are publicly obtainable). Often, one degree up in a file known as /logs/ tends to be the place it’s situated.
Must you discover the file (it ought to have a reputation like error_log), obtain it and seek for any Deadly Error inside the doc, possibly in direction of the underside.
Inside the error message, you need to have a few file places that may dictate the place the file points happen.
No Logs? You Might Want To Activate Them
When you have FTP/SFTP entry to the positioning however no logs, it’s possible you’ll must activate them.
Inside the root listing of WordPress, add the next strains to the wp-config.php file.
outline( 'WP_DEBUG', true ); outline( 'WP_DEBUG_LOG', true ); outline( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
This can create a file debug.log inside the wp-content/ folder. From there, you may see the errors on this file.
Safety Tip: The debug.log will likely be publicly seen, so when you’ve fastened the difficulty, take away these strains from wp-config.php and delete the debug.log file.
Resolving These Plugin Conflicts
Whichever technique you utilize, your logs ought to produce strains like this under:-
Deadly error: Can't redeclare hello_dolly_get_lyric() (beforehand declared in/wp-content/plugins/broken-plugin/index.php:17) in /wp-content/plugins/hello-dolly/whats up.php on line 46
Every ingredient means:
- “Deadly Error” determines the error. A deadly error in PHP signifies that the positioning instantly stops working. You will get different errors or warnings.
- “Can’t redeclare hello_dolly_get_lyric()” is the deadly error. On this case, there are two PHP capabilities with the identical identify (hello_dolly_get_lyric()). That is the idea of the plugin battle.
- “/wp-content/plugins/hello-dolly/whats up.php on line 46” tells you the place this error happens. Whereas the road quantity isn’t essential (except you’re coding your self), it does let you know the plugin the place the plugin error happens – on this case, “hello-dolly”.
The following step is to manually change the plugin.
In your chosen FTP programme or file supervisor, go to the plugin folder inside WordPress – /wp-content/plugins/ on this case – and rename the plugin folder (on this case, change “hello-dolly” to “broken-hello-dolly”). This can deactivate the plugin once you subsequent log into WordPress.

It’s a good suggestion to not delete the WordPress plugin when you can stop it. This can power the deactivation of the plugin in query.
From there, you may examine the 2 plugins and establish why the 2 capabilities are known as twice.
For Builders: Good Apply Can Stop Plugin Conflicts
If you’re a developer constructing WordPress websites, following good observe can stop plugin conflicts.
Listed below are some ideas for stopping your plugin or WordPress websites from having plugin conflicts with different plugins on the market:
- If you’re not utilizing PHP Namespaces, then I’d advocate naming your courses or capabilities with a prefix. One thing like plugin_name_function_name can stop related performance from having the identical perform identify. Attempt to make them distinctive (so don’t use wp_ as a prefix).
- Utilizing function_exists round your capabilities to forestall your capabilities from loading in the event that they exist already.
- If you’re importing performance, utilizing class_exists can verify to see if the category has already been loaded.
- Loading your performance late, so naming your plugin folder with a late alphabet letter is helpful. Not each developer follows the identical method as you!
- If you’re constructing on one web site, make certain your server setup is identical (or as near being the identical) because the stay setting.
You’re by no means going to fully assure your plugin or theme doesn’t battle with the thousands and thousands of plugins that exist within the WordPress house.
Nonetheless, by following the above steps, you may reduce battle as a lot as doable, and easy adjustments to your code writing can stop a world of debugging hell later.
Extra Assets:
Featured Picture: Whiskerz/Shutterstock