Skip to main content
Help Center
The GoDaddy Community will undergo maintenance starting on Wednesday, August 4th at 3pm PST / 6pm EST. Learn more
  • GoDaddy Community
  • Managed WordPress Hosting
  • Managed WordPress Hosting

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    Ellipse
    Getting Started

    Remove /?doing_wp_cron from URL

    Hello, I just would like to ask if anyone has a solution to this problem.

     

    We have GoDaddy Managed WordPress Hosting.

    • There was an issue with scheduled jobs not working for our WordPress website

    • I contacted the support, and they modified the wp-config.php by adding 
      define( 'ALTERNATE_WP_CRON', true );
      As we have a huge requirement for the scheduled to work properly in the website (e.g. getting reports automatically.)

    • However, by adding the Alternate WP Cron, the website now includes /?doing_wp_cron to every URL on the website.

    • Disabling Alternate WP Cron, disable schedule jobs on our WordPress website 😞

    Can anyone recommend how to remove /?doing_wp_cron from appearing to website URL without disabling Alternate WP Cron?

    1 ACCEPTED SOLUTION
    Ellipse
    Getting Started

    We have already decided to migrate and solve the issue immediately after immigration.

    View solution in original post

    6 REPLIES 6
    ablake
    Community Team

    Hey @Ellipse,

     

    After a bit of research, I found that the best solution for this without disabling ALTERNATE_WP_CRON is to add a redirect in .htaccess:

     

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


    Sources:

     

    https://newbloghosting.com/why-is-doing_wp_cron-being-added-to-my-urls/

    https://wordpress.stackexchange.com/questions/12777/why-is-doing-wp-cron-being-appended-to-my-urls

     

     

    Fair warning: I haven't tried this and can't vouch for how effective a solution it is or whether or not it will cause any issues with your website.

     

    As always, I recommend doing a full backup of files & database to an external location. Your Managed WordPress backups should work fine if anything goes wrong, but it doesn't hurt to be redundant.

     

    Hope this helps!

     

     

    Angela B - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.
    Ellipse
    Getting Started

    May I know how will edit the HTAccess.

     

    Do I simply add it on the #Wordpress section? or I can put it at the very bottom without causing any issues?

    Yeah, it should be fine to just add it to the bottom.

    Angela B - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.
    Ellipse
    Getting Started

    I have tried adding it at the very bottom and it causes "Too Many Redirect" error.

    There's probably something else creating a redirect. Since this solution uses a redirect, adding it when there's already another redirect happening can loop & cause a "Too Many Redirects" error. 

     

    Could be an SEO plugin or url structure setting. You can read a bit about that stuff here: https://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/

     

    If can't find or don't want to change/disable the other redirect, this might not be a good solution for you after all. If not, the only thing I can recommend would be to call support to see if they have any further advice.

     

    I do hope you're able to get it to work, though.

     

     

    Angela B - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.
    Ellipse
    Getting Started

    We have already decided to migrate and solve the issue immediately after immigration.

    View solution in original post