MainWP Blog

Troubleshoot WP Cron Job Issues
MainWP How To's
Sebastian Moran

Using WP-CLI to Troubleshoot WP Cron Job Issues on a Child Site

Sometimes you will run into issues on your child sites which are being caused by active cron jobs. Cron jobs are recurring tasks that need to be run on a site. Most of the time, cron jobs are created by the active plugins (e.g., these cron events all running due to WooCommerce): woocommerce_cancel_unpaid_orders woocommerce_cleanup_sessions woocommerce_cleanup_personal_data woocommerce_cleanup_logs woocommerce_scheduled_sales woocommerce_geoip_updater delete_expired_transients delete_version_transients Cron Events There are ways to view all cron jobs on a child site by using a plugin like WP Crontrol. In this post, we are going to use the many options that WP-CLI has related to cron jobs. There

wp profile - WP CLI Command
MainWP How To's
Sebastian Moran

Why Use the wp profile WP-CLI Command?

What is the wp profile Command in WP-CLI? wp profile command is designed for finding where and what is slowing a site down. As with any performance benchmarking, multiple runs will need to be used. Start by running the common commands for wp profile multiple times. This will help you find what is causing WordPress to load slowly on a site. wp profile stage This command will output a number of options in the table. They are broken down as: bootstrap is where WordPress is setting itself up, loading plugins and the main theme, and firing the init hook. main_query

WP-CLI - wp doctor
MainWP How To's
Sebastian Moran

WP-CLI wp doctor Command Why it Might Really Help Your Sites

What is the wp doctor command in WP-CLI? wp doctor lets you easily run a series of configurable checks to diagnose what’s ailing with WordPress. Without wp doctor, your team has to rely on their memory to manually debug problems. With wp doctor, your team saves hours identifying the health of your WordPress installs by codifying diagnosis procedures as a series of checks to run with WP-CLI. It comes with dozens of checks out of the box. name description autoload-options-size Warns when autoloaded options size exceeds the threshold of 900 kb. constant-savequeries-falsy Confirms expected state of the SAVEQUERIES constant. constant-wp-debug-falsy

WP-CLI
MainWP How To's
Sebastian Moran

What is the WP-CLI and why should I use it?

What is the WP-CLI? The WP-CLI is a way of doing anything that you would be able to do in the back-end of a WordPress site in wp-admin, but using command lines. A number of hosts have WP-CLI installed on new servers. One great example is on Cloudways. Common WP-CLI commands If a client site has a white screen issues from an active plugin or theme and you have sFTP/SSH access on the site, then you can change the active plugins. You can also change the site to a new theme, or install a new default theme to test if

Looking for something?