When a plugin or theme misbehaves, the error log usually tells you why. Switch on debug mode to record PHP errors and warnings, reproduce the problem, then read the log in the portal.
Step 1: Turn on debug mode
- In the portal (portal.phluit.com), go to My Sites and open the site.
- Click the Advanced tab, then Developer settings.
- Switch on Debug mode and confirm "Turn debug mode on? The site restarts (a few seconds)."
From now on, PHP errors and warnings from WordPress, plugins and themes are written to the error log (wp-content/debug.log).
Only if you need it, tick Also show errors on the pages (visible to visitors). Errors then appear on the pages themselves. Don't leave this on for a live site: visitors see them too.
Step 2: Reproduce the problem
Open the page or do the action that goes wrong, so the error is recorded.
Step 3: Read the log
- Go to Advanced → Logs.
- Click Load (or Refresh to read it again).
You see the last 300 lines of the error log, with the time it was read and the log's size. Look for lines with PHP Fatal error or PHP Warning: the file path in them usually names the plugin or theme that causes the problem, for example wp-content/plugins/plugin-name/….
To start again with an empty log, click Clear and confirm "Empty the error log?"
Step 4: Turn debug mode off
When you're done, go back to Advanced → Developer settings and switch Debug mode off. The site restarts for a few seconds. The log keeps what was recorded until you clear it.
What to do with what you find
- A plugin is named in the error: deactivate it on the Plugins tab and check whether the problem is gone, then contact the plugin's developer. See Managing plugins from My Sites.
- It started after an update: restore the backup from before the update. See Restoring a backup (and undoing a restore).
- "Allowed memory size exhausted": raise the memory limit under PHP & e-mail. See PHP settings: memory, uploads, execution time and input variables.
- You're stuck: open a support ticket and paste the relevant lines from the log.
Good to know
- When debug mode is off, the log says "Turn on debug mode under Developer settings to record them."
- Turning debug mode on or off restarts the site, which takes a few seconds.
- Every change appears on the Activity tab.
