Does DISABLE_WP_CRON prevent plugins from registering new cron tasks?

Is this assumption valid? Or does DISABLE_WP_CRON actually block crons from running, and block plugins from registering new cron events? Yes, setting DISABLE_WP_CRON to true doesn’t actually block WordPress’ crons from running; it just prevents wordpress itself from initiating the events to run when your backend is triggered by a customer viewing your website. I’m … Read more

How to install WordPress with Composer?

Using roots Bedrock for a few years, I gladly recommend it. Core versions are all available and are synced by roots.io technical team. Using WordPress with composer would allow you to have dependencies (WP core, plugins, themes, and other PHP libs) all managed with composer versions. Bedrock will also ensure that no core file is … Read more

Install WordPress using PHP

Please check if PHP is running in safe mode. excel_shell is disabled when PHP is running in safe mode. You can check this running the phpinfo() function. Tip: You could make a install script in bash and execute that from PHP. This way it’s easier to test on the command line first, and then wrap … Read more

ignoring, hidding mu plugins when wp-cli is run

I’m the author of Mobile Smart Pro. I’m in the midst of testing WP-CLI with Mobile Smart Pro, and on line 27 of /wp-content/mu-plugins/ you should add the following test: if (!$mobile_smart) return $pluginList; So the section would look like: `function disablePlugins($pluginList) { if (is_admin()) return $pluginList; // only deactivate on front end global $mobile_smart; … Read more

How to fix old embeded iframes with WP-CLI search-replace

You should probably use something like regex101.com to test this before you run it on a database. You could start off with something like: wp search-replace ‘<iframe ((width|height|frameborder)=”\d+” |allowfullscreen)+?src=”https://wordpress.stackexchange.com/questions/222382/https?:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9]+?)” ((width|height|frameborder)=”\d+” |allowfullscreen)+?>\<\/iframe\>’ ‘https://www.youtu.be/$1′ –regex but I’m not 100% sure of that…

undefined function apache_request_headers()

From quick search I cannot find calls of this function in neither WP core or WP CLI. From quick check of documentation for it it seems that support for it in CLI context is (relatively) recent — starting with PHP 5.5.7. You might want to check if your PHP up to date. Note that CLI … Read more