Blog

🔧 Why is ?doing_wp_cron being added to my URLs

NBH Support
NBH Support
No Comments

Simply said, It’s 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

.htaccess

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.

Hope this will help!

Leave a Comment