Halloween Sale 15% off Ends in See the plans

Snippet Library

Developer snippets for WordPress

Snippets for developers: debugging helpers, custom cron schedules, body classes, REST API tweaks and admin tools for checking hooks and queries. Building blocks for people who write code for WordPress every day.

1–16 of 16 snippets “tools”

  • PHP Developer

    Add a Custom WP-CLI Command

    Registers a "wp site-stats" WP-CLI command that prints counts of posts, pages, comments and users, as a template for your own command-line tools.

  • PHP Developer

    Content Types Overview Screen

    Adds Tools > Content Types, a table of every registered post type and taxonomy with its labels, visibility, archive, REST base, URL slug and item count.

  • PHP Developer

    Private Site Statistics REST Endpoint

    Adds a /wp-json/site/v1/stats endpoint that returns post, page, comment and user counts to logged-in editors or application-password clients, for reporting tools and status boards.

  • PHP Developer

    REST API Error Log Under Tools

    Records REST API requests that fail with a 4xx or 5xx status, with the route, method, user and error code, and lists the latest 100 under Tools > REST Errors for debugging integrations.

  • PHP Developer

    Registered Image Sizes Under Tools

    Adds a Tools > Image Sizes screen listing every image size WordPress creates on upload, with its width, height and crop mode, so you can see what themes and plugins have added.

  • PHP Developer

    Rewrite Rules Viewer and URL Tester

    Adds Tools > Rewrite Rules, listing every rewrite rule and showing which rule and query a URL path you enter would match, for debugging 404s and custom permalinks.

  • PHP Developer

    Scheduled Cron Events Viewer

    Adds a Tools > Cron Events screen listing every scheduled WP-Cron event with its next run time, recurrence and hook name, to debug missed or duplicate tasks.

  • PHP Developer

    Searchable Options Viewer Under Tools

    Adds a Tools > Options Viewer screen where administrators can search the options table by name and see each value decoded and pretty-printed, including serialized arrays that Settings > All hides.

  • PHP Developer

    Serve a humans.txt File

    Answers /humans.txt with a plain-text file crediting the people and tools behind the site, generated by WordPress so you do not need to upload anything to the server.

  • PHP Developer

    Transients Viewer Under Tools

    Adds a Tools > Transients screen listing the cached transients stored in the database with their size and expiry time, and lets administrators delete a single one to force a refresh.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.