When a website bug that wasn’t there before appears suddenly, try these steps.
- Ask
- ask the client what has changed, who is working on the site etc. Are you aware of any other work going on on the site? E.g. sometimes other devs will move untested code to the live site, marketers may install plugins or change something else etc.
Almost everyone’s first reaction is to deny all culpability but asking covers your bases.
- ask the client what has changed, who is working on the site etc. Are you aware of any other work going on on the site? E.g. sometimes other devs will move untested code to the live site, marketers may install plugins or change something else etc.
- Test plugin conflicts
- Backup the site, note which plugins are active (or it’s often easier to note which are inactive)
- Disable all plugins
- In an incognito window, display the page with the bug.
- Is the bug still present?
- If no, then it’s caused by a plugin
- If yes, then it’s NOT caused by a plugin and you can restore the backup from above and blame WP
- Is the bug still present?
- Which plugin is it?
- Use a binary search to quickly hone in on it
- Disable half of the plugins
- Is it still there?
- If yes, activate half of the disabled plugins and go to step 2.
- If not, disable half of the active plugins and go to step 2.
- Alternatively you can just reactivate a select number of plugins and check again for the bug. E.g. activate all plugins beginning with letter A to E and retest. Or all plugins related to Events Calendar etc. etc.
- Use a binary search to quickly hone in on it
- NOTES
- The guilty plugin is often not related to the plugin where the bug is manifested
- Always retest for the bug in a NEW incognito window.
- Sometimes just deactivating and reactivating plugins will eliminate the problem … the complexities of code, code oralwaysder, … whatever …
The above will usually find the exact plugin causing the problem.