Why is ?doing_wp_cron being added to my WordPress URLs

This is simply a sign that you have ALTERNATE_WP_CRON defined in your wp-config.php

In order to do some background processing (like publishing scheduled posts), WordPress redirects you to the URL with ?doing_wp_cron appended.

This is usually triggered by backup plugins such as UpDraft backups or All-In-One WP Migration.

wp-config.php

If you want to disable this, simply open your  wp-config.php file and delete the line containing ALTERNATE_WP_CRON

Another way to hide this is by managing redirection in the .htaccess file.

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{QUERY_STRING} (^|&)doing_wp_cron= [NC]
    RewriteRule (.*) /$1? [R=301,L]
</IfModule>

Additional Cron

This can also be triggered because of an alternate cron job. To work around this, if you have access, you can enable an actual cron process (if your hosting will let you) and disable ALTERNATE_WP_CRON in your wp-config.php.

Last updated byChris Grant (he/him)Chris Grant (he/him) on 12th November 2020