Switching on developer mode
At the very bottom of the Control Panel is “Developer mode”. When you switch it on, the Control Panel shows for every tool what runs underneath, including the original message, and the workbench gains the “Developer” tab. The switch applies to this browser, not to your account, and it grants no permission at all: everything is checked exactly as before.
The “Developer” tab does two things: on the right are the settings — “Workbench in the preview window”, “Appearance” with “Dark editor”, “Debugging” and “Access” —, and in the middle the workbench opens with file tree and editor. “Open in the full window” moves it into a browser window of its own, for a second screen, say.
- Scroll down in the Control Panel and switch on “Developer mode”.
- Open the new “Developer” tab.
Files and code editor
The file tree shows your installation’s whole directory, level by level. “Go there” jumps to the most common places: Plugins, Must-Use Plugins, Uploads, wp-config.php and WordPress root. A file opens in the editor; you save with Ctrl+S or ⌘+S. “New file in this folder” creates a file.
Before every save we check the PHP syntax. If it is wrong, nothing is written and you see where. Then we call your site; if it no longer loads, the file’s previous version is back immediately. The WordPress core files are locked, because changes there are lost with the next update. If you still want to change something there, you confirm “I understand that this change will be lost with the next WordPress update.” — for that one operation only.
The developer workbench follows the “Live”/“Sandbox” switch; the sandbox is the better place for experiments.
- Open the “Developer” tab and choose “Must-Use Plugins” under “Go there”.
- Click “New file in this folder” and give it a name, for example lumen-custom.php.
- Write your code and save with Ctrl+S or ⌘+S.
The history of a file
Every save in the editor is a point in the file’s history — with name, time and comparison. “History of this file” shows the versions; you can compare a version side by side with the current one, and “Restore” makes it the current one again.
Restoring is an ordinary save and goes through the same syntax and site check, because old does not mean sound. For media and cache files we deliberately keep no history.
- Open the file in the editor and click “History of this file”.
- Choose a version and look at the comparison.
- Click “Restore”.
Error log and debugging
“Error log” in the developer workbench’s toolbar shows the last lines of your installation’s log; “Refresh” reloads them. On the right, under “Debugging”, you switch on more detailed logging by WordPress.
Debugging only writes to the log, never to the site: your visitors see no error messages, even while it is on. Switch it off again once you have found the problem.
Time-limited SFTP access
If someone needs direct access to the files — the agency adapting your theme, for example —, you create an SFTP access under “Access”. You say who it is for and choose how long it is valid: 24 hours, 7 days, 30 days, 90 days or permanent. Permanent is the exception you have to choose explicitly.
Sign-in works with a password we generate, or with an SSH key, which is even safer; then there is no password at all. You see the password exactly once, right after creating the access — “Copy it now — the password won't appear again.” It is stored nowhere, not even in a log. An access sees only this one installation, and “Revoke” takes it away again at any time.
- In the “Developer” tab, open “Access” and click “Create access”.
- Under “1. Who is the access for?” enter a name, for example “Agentur Web Lisboa”, and under “2. How long should it be valid?” choose “7 days”.
- Under “3. What do they sign in with?” choose “Password — we generate it” or “SSH key — even safer” and click “Create”.
- Copy the password straight away with “Copy” and pass it on.
Looking into the database
The “Database” tab shows your installation’s tables on the right with the number of entries and their size — with understandable names, and the real table name next to them. “Technical names” and “Names in plain text” switch between them, and the info icon on each table says what it holds. You see entries as cards rather than rows, with search and “Sort by”.
Here you can only look, not change anything — there simply is no way to. If you really need to intervene in the database, the same tab opens the database tool in the middle, with an access that works only once. Create a restore point with “Back up now” beforehand.