Μετάβαση στο περιεχόμενο

Early-bird άδεια εφ’ όρου ζωής: $199 εφάπαξ, μόνο για τους πρώτους 200 αγοραστές. Δείτε την προσφορά

Όλοι οι οδηγοί

Safe mode

Αυτή η σελίδα δεν έχει μεταφραστεί ακόμη, γι' αυτό εμφανίζεται στα αγγλικά.

Safe mode stops all snippets from running, so you can log in and fix one that broke something. There are two ways to turn it on.

Snipfire usually switches off a failing snippet by itself (see How Snipfire keeps your site safe), so you'll rarely need this. Set it up anyway: it takes a minute.

Go to Snipfire → Tools & Safe Mode. Under Safe mode you'll find a private link that looks like this:

https://example.com/wp-admin/admin.php?page=snipfire&snipfire-safe-mode=Xk3…

Save it now in your password manager or bookmarks.

When you open the link:

  • Snippets stop running in your browser only. Visitors still get the site as normal.
  • It stays on (with a cookie) until you close the browser, or until you turn it off.
  • The link works even when a snippet has broken the admin, because Snipfire checks for it before any snippet runs.
  • The editor shows Safe mode is on: no snippets run in your browser.

To turn it off, click Turn safe mode off on the Tools page, or open any page with ?snipfire-safe-mode=off added to the address.

Anyone with the link can switch snippets off in their own browser, but nothing more: they still need to log in to change anything. If the link has leaked, click Create a new link (old one stops working).

Site-wide safe mode (wp-config.php)

If you don't have the link, or you need snippets off for everyone, add this line to wp-config.php (above the line that says That's all, stop editing!):

define( 'SNIPFIRE_SAFE_MODE', true );

No snippet runs for anyone while this line is there. Log in, fix or switch off the broken snippet, then remove the line to switch snippets back on.

You can edit wp-config.php with your host's file manager, SFTP, or SSH.

While safe mode is on

  • The editor works as usual: you can edit, switch on or off, and delete snippets.
  • Shortcodes from Snipfire print nothing (never the raw [shortcode]).
  • Test loads still run when you switch a snippet on, so you can check a fix.

From the command line

wp snipfire safe-mode shows whether safe mode is on and prints your link. wp snipfire safe-mode new-key makes a new link.

With SSH access you can also switch a snippet off without touching wp-config.php. The --exec part turns safe mode on for that one command, so no snippet can get in the way:

wp --exec='define( "SNIPFIRE_SAFE_MODE", true );' snipfire disable 12

Κάτι δεν είναι σαφές ή λείπει; Πείτε μας