Tag: theme-development

  • 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…

  • Auto-enable WP_DEBUG with a cookie

    Auto-enable WP_DEBUG with a cookie

    A guide on enabling WP_DEBUG in WordPress for theme/plugin development or debugging. Learn how to set it in wp-config.php or use a secret cookie method. Enhance it with additional settings like WP_DEBUG_LOG and SCRIPT_DEBUG. Implement the cookie setup using a custom mu-plugin for improved development efficiency.

  • Disabling plugin deactivation in WordPress

    Disabling plugin deactivation in WordPress

    The problem came up recently about how to make sure plugins activated in the WordPress plugin UI don’t get deactivated if they are necessary for a site to function.  I thought that was an interesting thought puzzle worth spending 15 minutes on, so I came up with this function as a solution: Which can be…