Some supported themes include the option to add custom code. This feature lets you:
- Insert custom PHP snippets.
- Add custom CSS/JavaScript in the header (e.g. Google Analytics, meta tags).
- Insert custom code in the footer.
While powerful, adding PHP code comes with a risk: a faulty snippet can break your site and make WordPress admin inaccessible.
To prevent getting locked out, we provide Safe Mode recovery options.
1. Simple Recovery - Disable Link
The easiest way to recover is by using the Disable Custom Code link.
To find this link in your wp-admin area, go to Appearance > Theme Dashboard > Custom Code tab, and click the notice at the top.
The link looks like this:
https://mywebsite.com/wp-admin/?hootcmd=disablecustomcodesReplace mywebsite.com with your actual site domain.
When you visit this link, all custom code is disabled, restoring access to your site.
We recommend saving/bookmarking this link somewhere safe before adding custom code.
2. Advanced Recovery - If You're Locked Out
Note that the disable link only works if you are already logged in as the Site Admin.
This is to prevent anyone else from disabling your custom code just by having the link.
If your site breaks and you cannot log in:
- Log into your hosting panel (e.g., cPanel) or connect via FTP.
- In your WordPress directory, navigate to the directory below.
wp-content > plugins > hootkit > misc > code
For Olius , Strute and Nirvata themes, browse to this location:wp-content > plugins > {theme}-premium > library > manager - Find the file
debug-disable.phpand rename it todebug-enable.php - Now, visit the Disable Custom Code link:
https://mywebsite.com/?hootcmd=disablecustomcodesReplacemywebsite.comwith your actual site domain.Your custom code will be disabled and the site will become accessible.
Important: After recovery, don't forget to rename the file back to debug-disable.php.
Leaving it as debug-enable.php would allow anyone with the disable link to turn off your custom code at any time.
