Category: WordPress

  • Wisps, a WordPress Plugin

    Wisps, a WordPress Plugin

    With Wisps, you can have code snippets similar to Gist, Pastebin, or similar code sharing sites. Using the built-in WordPress code editor, you can write snippets to post and share.

  • Debugging WordPress Hooks: Speed

    Debugging WordPress Hooks: Speed

    Learn how to measure the execution time of WordPress hooks with precision by capturing individual callback durations. Find out how to set up a timeline for targeted hooks and track start and stop times for each. Be cautious of potential overhead and conflicts with plugins using hook priorities. Utilize the provided PHP code to implement…

  • WordPress Post Meta and JSON

    WordPress Post Meta and JSON

    Learn about the challenges of storing JSON strings in WordPress post meta. Discover how WordPress’s `wp_unslash()` function can unintentionally interfere with the data. Find out how to safely store JSON by using `wp_slash()` to double-encode it, ensuring data integrity when unslashing.

  • Better Caching in WordPress

    Better Caching in WordPress

    Caching data in WordPress is essential for performance. Using the Transients API is common but using the WP_Object_Cache functions can offer more flexibility, especially for scenarios like API data changes. Additionally, caching too much data can lead to inefficiencies, so optimizing cache object size can significantly improve performance.

  • Page Generation Graph for WordPress

    Page Generation Graph for WordPress

    Discover how to create a personalized page generation graph for your website’s performance tracking. Compare different page types and delve into performance data through URL and time analysis. Find out how to enhance your site’s speed with the custom widgets and options provided. Check out the GitHub repository for the code.

  • Quick Tip: DreamHost cron and WP-CLI

    Quick Tip: DreamHost cron and WP-CLI

    Ensure your WordPress cron events fire correctly on DreamHost by setting the correct PHP version in your code. Be mindful of PHP compatibility issues between your code and the version running via WP-CLI in DreamHost’s cron system to avoid syntax errors like “unexpected ‘?’.” Use the `WP_CLI_PHP` environment variable to specify the PHP version needed…

  • Logging Failed Redirects

    Logging Failed Redirects

    A logging plugin can help track failed redirects in WordPress, preventing default redirects to “/wp-admin/” for un-whitelisted domains. The plugin creates a dashboard widget displaying domains and failed redirect counts, offering insight into redirect issues and simplifying troubleshooting.